Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX(AIP-157): clarify distinction between request and request message #1174

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions aip/general/0157.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,15 @@ APIs **may** support partial responses in one of two ways:
### Field masks parameter

Field masks (`google.protobuf.FieldMask`) can be used for granting the user
fine-grained control over what fields are returned. An API **should** support the mask in a side channel.
For example, the parameter can be specified either using an HTTP query
fine-grained control over what fields are returned. An API **should** support the mask being specified
in a side channel. For example, the parameter can be specified either using an HTTP query
parameter, an HTTP header, or a [gRPC metadata entry][1]. Google Cloud APIs specify field masks as a [system parameter][0].

Field masks **should not** be specified in the [request](./0157.md#read-masks-as-a-request-field).
Field masks **should not** be specified as a field on the [request message](./0157.md#read-masks-as-a-request-field).

- The value of the field mask parameter **must** be a `google.protobuf.FieldMask`.
- The value of the field mask parameter **must** be interpreted as a repeated `google.protobuf.FieldMask`.
- The field mask parameter **must** be optional:
- An explicit value of `"*"` **should** be supported, and **must** return all
fields.
- An explicit value of `"*"` **should** be supported, and **must** return all fields.
- If the field mask parameter is omitted, it **must** default to `"*"`, unless otherwise documented.
- An API **may** allow read masks with non-terminal repeated fields (unlike
update masks), but is not obligated to do so.
Expand Down Expand Up @@ -89,4 +88,4 @@ enum BookView {

[0]: https://cloud.google.com/apis/docs/system-parameters
[1]: https://grpc.io/docs/what-is-grpc/core-concepts/#metadata
[AIP-126]: ./0126.md
[AIP-126]: ./0126.md