Skip to content

Commit 9d73091

Browse files
authored
converge AIP-161 and AIP-203 update mask guidance for dealing with output only fields (#1249)
There are inconsistencies between AIP-161 and AIP-203 guidance regarding server handling the presence of output fields in update Field Marks. In these scenarios, servers should be flexible to allow re-using the same field masks for updates and read. Updating guidance in AIP-161 to reflect that.
1 parent 0fee667 commit 9d73091

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

aip/general/0161.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,9 @@ subfield), the service **must** ignore any output only fields provided as
137137
input, even if they are cleared or modified.
138138

139139
If a user directly specifies an output only field in an update mask, the
140-
service **should** ignore the output only fields provided as input, even if
140+
service **must** ignore the output only fields provided as input, even if
141141
they are cleared or modified, to permit the same field mask to be used for
142-
input and output. However, the service **may** choose to error with
143-
`INVALID_ARGUMENT` if the field is modified in input.
142+
input and output.
144143

145144
### Invalid field mask entries
146145

@@ -154,4 +153,6 @@ permit deletions.
154153

155154
## Changelog
156155

156+
- **2023-10-18**: Update guidance for presence of output only fields in update
157+
mask.
157158
- **2023-07-17**: Move `update_mask` guidance to AIP-134.

aip/general/0203.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ The use of `OUTPUT_ONLY` indicates that the field is provided in responses, but
129129
that including the field in a message in a request does nothing (the server
130130
**must** clear out any value in this field and **must not** throw an error as a
131131
result of the presence of a value in this field on input). Similarly, services
132-
**must** ignore the presence of output only fields in update field masks.
132+
**must** ignore the presence of output only fields in update field masks (see:
133+
AIP-161).
133134

134135
Additionally, a field **should** only be described as output only if it is a
135136
field in a resource message, or a field of a message farther down the tree.

0 commit comments

Comments
 (0)