Skip to content

feat: align FieldMask features with standard Protocol Buffer libraries - #1660

Merged
noahdietz merged 2 commits into
masterfrom
fieldmask-features
Oct 15, 2026
Merged

noahdietz merged 2 commits into
masterfrom
fieldmask-features

Conversation

@noahdietz

@noahdietz noahdietz commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Clarify support boundaries for google.protobuf.FieldMask across AIP-134, AIP-157, and AIP-161 to align with standard Protocol Buffer runtime library capabilities. Also clarify HTTP transcoding and query parameter encoding behavior in AIP-127.

Changes

  • AIP-127 (HTTP and gRPC Transcoding):
    • Add general note referencing google.api.http documentation for detailed request transcoding behavior across path, body, and query parameters.
    • Reference Protocol Buffers canonical JSON encoding for how request fields and types are encoded, especially well-known types (such as FieldMask).
    • Explicitly document that request fields not bound to the URL path or body are passed as URL query parameters.
  • AIP-134 (Standard Update):
    • Retain the requirement that standard update methods must support * for full resource replacement (the equivalent of PUT).
    • Document that * is an API-level convention that is not recognized by standard Protocol Buffer runtime libraries.
    • Note that services supporting * are responsible for handling full replacement directly in their service implementation, rather than relying on standard Protocol Buffer field mask helper utilities.
    • Clarify that an empty update_mask (paths: []) should be treated as a no-op returning the existing resource unmodified.
  • AIP-157 (Partial Responses):
    • Invert structure to make View enumeration the primary recommended pattern for partial responses.
    • Clarify that wildcard * in field mask parameters is an infrastructure-level convention not supported by standard Protocol Buffer runtime libraries.
    • Note that intermediary proxies may normalize or omit mask paths, and that services should generally treat empty read masks as requesting all fields (or the default view).
    • Discourage non-terminal repeated fields in read masks.
  • AIP-161 (Field Masks):
    • Clarify that standard Protocol Buffer runtime libraries validate paths directly against message definitions and require repeated fields to be terminal in a path.
    • Move non-canonical features (map key traversal with dot notation / backticks and mid-path collection wildcards) to a dedicated "Non-standard extensions" section, noting that standard runtime libraries do not support them.

Internal tracking bug http://b/562618985

Clarify support boundaries for google.protobuf.FieldMask across AIP-134,
AIP-157, and AIP-161 in response to standard Protocol Buffer library
capabilities. Also clarify HTTP transcoding and query parameter encoding
behavior in AIP-127.

* AIP-127:
  - Add general note referencing google.api.http documentation for detailed
    transcoding behavior across the entire request (path, body, query parameters).
  - Reference Protocol Buffers canonical JSON encoding for how request fields and
    types are encoded, especially well-known types (such as FieldMask).
  - Explicitly document that request fields not bound to the URL path or body
    are passed as URL query parameters.
* AIP-134:
  - Retain the requirement that standard update methods must support '*' for
    full resource replacement.
  - Document that '*' is an API-level convention that is not recognized by
    standard Protocol Buffer runtime libraries.
  - Note that services supporting '*' are responsible for handling full
    replacement directly in their service implementation.
  - Clarify that an empty update_mask (paths: []) should be treated as a no-op.
* AIP-157:
  - Invert structure to make View enumeration the primary recommended pattern
    for partial responses.
  - Clarify that wildcard '*' in field mask parameters is an infrastructure-level
    convention not supported by standard Protocol Buffer runtime libraries.
  - Note that intermediary proxies may normalize or omit mask paths, and that
    services should generally treat empty read masks as requesting all fields.
  - Discourage non-terminal repeated fields in read masks.
* AIP-161:
  - Clarify that standard Protocol Buffer runtime libraries validate paths
    directly against message definitions and require repeated fields to be
    terminal in a path.
  - Move non-canonical features (map key traversal with dot notation / backticks
    and mid-path collection wildcards) to a non-standard extensions section,
    noting that standard runtime libraries do not support them.
@noahdietz
noahdietz marked this pull request as ready for review October 14, 2026 22:39
@noahdietz
noahdietz requested a review from a team as a code owner October 14, 2026 22:39
@noahdietz
noahdietz requested a review from slevenick October 14, 2026 22:39
Comment thread aip/general/0161.md Outdated
@noahdietz
noahdietz enabled auto-merge (squash) October 15, 2026 22:28
@noahdietz
noahdietz merged commit 2ccc61a into master Oct 15, 2026
8 checks passed
@noahdietz
noahdietz deleted the fieldmask-features branch October 15, 2026 22:32
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.

2 participants