GET /config/server/info: Return download schemes as map This is the format that is needed on client-side. Change-Id: I19314e99f4c44cdd49c20a7d1a722d7b83cd0c1e Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
diff --git a/Documentation/rest-api-config.txt b/Documentation/rest-api-config.txt index 0b8e2f8..4a33732 100644 --- a/Documentation/rest-api-config.txt +++ b/Documentation/rest-api-config.txt
@@ -61,20 +61,16 @@ }, "download": { "schemes": [ - { - "name": "ssh", - "url": "ssh://jdoe@gerrithost:29418/${project}", - "is_auth_required": true, - "is_auth_supported": true, + "anonymous http": { + "url": "http://gerrithost:8080/${project}", "commands": { - "Checkout": "git fetch ssh://jdoe@gerrithost:29418/${project} ${ref} \u0026\u0026 git checkout FETCH_HEAD", - "Format Patch": "git fetch ssh://jdoe@gerrithost:29418/${project} ${ref} \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD", - "Pull": "git pull ssh://jdoe@gerrithost:29418/${project} ${ref}", - "Cherry Pick": "git fetch ssh://jdoe@gerrithost:29418/${project} ${ref} \u0026\u0026 git cherry-pick FETCH_HEAD" + "Checkout": "git fetch http://gerrithost:8080/${project} ${ref} \u0026\u0026 git checkout FETCH_HEAD", + "Format Patch": "git fetch http://gerrithost:8080/${project} ${ref} \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD", + "Pull": "git pull http://gerrithost:8080/${project} ${ref}", + "Cherry Pick": "git fetch http://gerrithost:8080/${project} ${ref} \u0026\u0026 git cherry-pick FETCH_HEAD" } }, - { - "name": "http", + "http": { "url": "http://jdoe@gerrithost:8080/${project}", "is_auth_required": true, "is_auth_supported": true, @@ -85,14 +81,15 @@ "Cherry Pick": "git fetch http://jdoe@gerrithost:8080/${project} ${ref} \u0026\u0026 git cherry-pick FETCH_HEAD" } }, - { - "name": "anonymous http", - "url": "http://gerrithost:8080/${project}", + "ssh": { + "url": "ssh://jdoe@gerrithost:29418/${project}", + "is_auth_required": true, + "is_auth_supported": true, "commands": { - "Checkout": "git fetch http://gerrithost:8080/${project} ${ref} \u0026\u0026 git checkout FETCH_HEAD", - "Format Patch": "git fetch http://gerrithost:8080/${project} ${ref} \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD", - "Pull": "git pull http://gerrithost:8080/${project} ${ref}", - "Cherry Pick": "git fetch http://gerrithost:8080/${project} ${ref} \u0026\u0026 git cherry-pick FETCH_HEAD" + "Checkout": "git fetch ssh://jdoe@gerrithost:29418/${project} ${ref} \u0026\u0026 git checkout FETCH_HEAD", + "Format Patch": "git fetch ssh://jdoe@gerrithost:29418/${project} ${ref} \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD", + "Pull": "git pull ssh://jdoe@gerrithost:29418/${project} ${ref}", + "Cherry Pick": "git fetch ssh://jdoe@gerrithost:29418/${project} ${ref} \u0026\u0026 git cherry-pick FETCH_HEAD" } } ], @@ -1001,8 +998,8 @@ |======================= |Field Name |Description |`schemes` | -The supported download schemes as list of link:#download-scheme-info[ -DownloadSchemeInfo] entities. +The supported download schemes as a map which maps the scheme name to a +of link:#download-scheme-info[DownloadSchemeInfo] entity. |`archives` | List of supported archive formats. Possible values are `TGZ`, `TAR`, `TBZ2` and `TXZ`. @@ -1016,8 +1013,6 @@ [options="header",cols="1,^1,5"] |================================= |Field Name ||Description -|`name` || -The name of the download scheme. |`url` || The URL of the download scheme, where '${project}' is used as placeholder for the project name.