Skip to content

Conversation

@copybara-service
Copy link

@copybara-service copybara-service bot commented Dec 17, 2025

Update FieldMask Documentation to Align with AIP

The update behavior for an empty mask described here directly conflicts with https://google.aip.dev/134, which states:

... the service must treat an omitted field mask as an implied field mask equivalent to all fields that are populated (have a non-empty value).

This is confusing, both to human users, and apparently to Gemini, which I noticed wrongly attributed this wording to https://google.aip.dev/161 (which, in actuality, does not mention the empty case at all).

Given the wording in field_mask.proto is over a decade old (written in the original cl/75054082), let's defer to the AIP's recommendation.

Follow suit on requiring a field mask, which https://google.aip.dev/134 precludes:

The [field mask] field must be optional


Note: We could mention AIP's "*" operator here, but personally I think the AIP is a better place to set explicit conventions rather than in the implementation's documentation.

The update behavior for an empty mask described here directly conflicts with https://google.aip.dev/134, which states:
> ... the service **must** treat an omitted field mask as an implied field mask equivalent to all fields that are populated (have a non-empty value).

This is confusing, both to human users, and apparently to Gemini, which I noticed wrongly attributed this wording to https://google.aip.dev/161 (which, in actuality, does not mention the empty case at all).

Given the wording in `field_mask.proto` is over a decade old (written in the original cl/75054082), let's defer to the AIP's recommendation.

Follow suit on requiring a field mask, which https://google.aip.dev/134 precludes:
> The [field mask] field **must** be optional

------

Note: We could mention AIP's "*" operator here, but personally I think the AIP is a better place to set explicit conventions rather than in the implementation's documentation.
PiperOrigin-RevId: 845560964
@copybara-service copybara-service bot changed the title Internal change Update FieldMask Documentation to Align with AIP Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant