Clarify the change REST API documentation.
The review REST API doesn't seem to work as documented. The documentation says that the GET review command should return a ChangeInfo object which contains a RevisionInfo object and the RevisionInfo object should contain weblinks, files, actions, etc. This is a true statement although it isn't complete. The missing info is that the user must add special fields to the request to get the additional RevisionInfo. Hopefully this change will clarify the usage of this REST command. Bug: issue 2913 Change-Id: I79f67c7aa986cc9a2fc16da9f8d81d6ec437b14a
This commit is contained in:
@@ -3660,6 +3660,9 @@ confirmation] when adding a group as reviewer that has many members.
|
||||
[[revision-info]]
|
||||
=== RevisionInfo
|
||||
The `RevisionInfo` entity contains information about a patch set.
|
||||
Not all fields are returned by default. Additional fields can
|
||||
be obtained by adding `o` parameters as described in
|
||||
link:#list-changes[Query Changes].
|
||||
|
||||
[options="header",width="50%",cols="1,^1,5"]
|
||||
|===========================
|
||||
@@ -3667,24 +3670,33 @@ The `RevisionInfo` entity contains information about a patch set.
|
||||
|`draft` |not set if `false`|Whether the patch set is a draft.
|
||||
|`has_draft_comments` |not set if `false`|Whether the patch
|
||||
set has one or more draft comments by the calling user. Only set if
|
||||
link:#draft_comments[draft comments] is requested.
|
||||
link:#draft_comments[DRAFT_COMMENTS] option is requested.
|
||||
|`_number` ||The patch set number.
|
||||
|`fetch` ||
|
||||
Information about how to fetch this patch set. The fetch information is
|
||||
provided as a map that maps the protocol name ("`git`", "`http`",
|
||||
"`ssh`") to link:#fetch-info[FetchInfo] entities.
|
||||
"`ssh`") to link:#fetch-info[FetchInfo] entities. This information is
|
||||
only included if a plugin implementing the
|
||||
link:intro-project-owner.html#download-commands[download commands]
|
||||
interface is installed.
|
||||
|`commit` |optional|The commit of the patch set as
|
||||
link:#commit-info[CommitInfo] entity.
|
||||
|`files` |optional|
|
||||
The files of the patch set as a map that maps the file names to
|
||||
link:#file-info[FileInfo] entities.
|
||||
link:#file-info[FileInfo] entities. Only set if
|
||||
link:#current-files[CURRENT_FILES] or link:#all-files[ALL_FILES]
|
||||
option is requested.
|
||||
|`actions` |optional|
|
||||
Actions the caller might be able to perform on this revision. The
|
||||
information is a map of view name to link:#action-info[ActionInfo]
|
||||
entities.
|
||||
|`reviewed` |optional|
|
||||
Indicates whether the caller is authenticated and has commented on the
|
||||
current revision. Only set if link:#reviewed[REVIEWED] option is requested.
|
||||
|'web_links' |optional|
|
||||
Links to the patch set in external sites as a list of
|
||||
link:#web-link-info[WebLinkInfo] entities.
|
||||
link:#web-link-info[WebLinkInfo] entities. Only set if
|
||||
link:#web-links[WEB_LINKS] option is requested.
|
||||
|===========================
|
||||
|
||||
[[rule-input]]
|
||||
|
||||
Reference in New Issue
Block a user