From 21a6c21717efb0899e53281b9c08d8140c2f95cf Mon Sep 17 00:00:00 2001 From: Shawn Pearce Date: Wed, 23 Apr 2014 12:35:10 -0700 Subject: [PATCH] Update project REST API documentation to remove kind, add state The kind field is no longer included in ProjectInfo. Document the state enum that is usually included. Change-Id: I86a75fde48f7147ac30e1ee23a11e6475366ab48 --- Documentation/rest-api-access.txt | 1 - Documentation/rest-api-projects.txt | 22 +++------------------- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/Documentation/rest-api-access.txt b/Documentation/rest-api-access.txt index 3ff3595ef5..42214fed4f 100644 --- a/Documentation/rest-api-access.txt +++ b/Documentation/rest-api-access.txt @@ -268,7 +268,6 @@ The entries in the map are sorted by project name. "MyProject": { "revision": "61157ed63e14d261b6dca40650472a9b0bd88474", "inherits_from": { - "kind": "gerritcodereview#project", "id": "All-Projects", "name": "All-Projects", "description": "Access inherited by all other projects." diff --git a/Documentation/rest-api-projects.txt b/Documentation/rest-api-projects.txt index 418b93c08f..d1bceb1163 100644 --- a/Documentation/rest-api-projects.txt +++ b/Documentation/rest-api-projects.txt @@ -35,21 +35,17 @@ by project name. )]}' { "external/bison": { - "kind": "gerritcodereview#project", "id": "external%2Fbison", "description": "GNU parser generator" }, "external/gcc": { - "kind": "gerritcodereview#project", "id": "external%2Fgcc", }, "external/openssl": { - "kind": "gerritcodereview#project", "id": "external%2Fopenssl", "description": "encryption\ncrypto routines" }, "test": { - "kind": "gerritcodereview#project", "id": "test", "description": "\u003chtml\u003e is escaped" } @@ -81,11 +77,9 @@ List all projects that start with `platform/`: )]}' { "platform/drivers": { - "kind": "gerritcodereview#project", "id": "platform%2Fdrivers", }, "platform/tools": { - "kind": "gerritcodereview#project", "id": "platform%2Ftools", } } @@ -132,11 +126,11 @@ describes the project. )]}' { - "kind": "gerritcodereview#project", "id": "plugins%2Freplication", "name": "plugins/replication", "parent": "Public-Plugins", - "description": "Copies to other servers using the Git protocol" + "description": "Copies to other servers using the Git protocol", + "state": "ACTIVE" } ---- @@ -176,7 +170,6 @@ describes the created project. )]}' { - "kind": "gerritcodereview#project", "id": "MyProject", "name": "MyProject", "parent": "All-Projects", @@ -798,21 +791,18 @@ returned that describe the child projects. )]}' [ { - "kind": "gerritcodereview#project", "id": "plugins%2Freplication", "name": "plugins/replication", "parent": "Public-Plugins", "description": "Copies to other servers using the Git protocol" }, { - "kind": "gerritcodereview#project", "id": "plugins%2Freviewnotes", "name": "plugins/reviewnotes", "parent": "Public-Plugins", "description": "Annotates merged commits using notes on refs/notes/review." }, { - "kind": "gerritcodereview#project", "id": "plugins%2Fsingleusergroup", "name": "plugins/singleusergroup", "parent": "Public-Plugins", @@ -841,35 +831,30 @@ are not resolved further. )]}' [ { - "kind": "gerritcodereview#project", "id": "gerrit", "name": "gerrit", "parent": "Public-Projects", "description": "Gerrit Code Review" }, { - "kind": "gerritcodereview#project", "id": "plugins%2Freplication", "name": "plugins/replication", "parent": "Public-Plugins", "description": "Copies to other servers using the Git protocol" }, { - "kind": "gerritcodereview#project", "id": "plugins%2Freviewnotes", "name": "plugins/reviewnotes", "parent": "Public-Plugins", "description": "Annotates merged commits using notes on refs/notes/review." }, { - "kind": "gerritcodereview#project", "id": "plugins%2Fsingleusergroup", "name": "plugins/singleusergroup", "parent": "Public-Plugins", "description": "GroupBackend enabling users to be directly added to access rules" }, { - "kind": "gerritcodereview#project", "id": "Public-Plugins", "name": "Public-Plugins", "parent": "Public-Projects", @@ -903,7 +888,6 @@ describes the child project. )]}' { - "kind": "gerritcodereview#project", "id": "plugins%2Freplication", "name": "plugins/replication", "parent": "Public-Plugins", @@ -1490,7 +1474,6 @@ The `ProjectInfo` entity contains information about a project. [options="header",width="50%",cols="1,^2,4"] |=========================== |Field Name ||Description -|`kind` ||`gerritcodereview#project` |`id` ||The URL encoded project name. |`name` | not set if returned in a map where the project name is used as map key| @@ -1500,6 +1483,7 @@ The name of the parent project. + `?-` if the parent project is not visible (`` is a number which is increased for each non-visible project). |`description` |optional|The description of the project. +|`state` |optional|`ACTIVE`, `READ_ONLY` or `HIDDEN`. |`branches` |optional|Map of branch names to HEAD revisions. |===========================