Skip to content

docs(aip-134): discriminated-union merge-patch rules - #3

Merged
corbanpro merged 1 commit into
masterfrom
docs/union-merge-patch
Nov 5, 2026
Merged

corbanpro merged 1 commit into
masterfrom
docs/union-merge-patch

Conversation

@corbanpro

@corbanpro corbanpro commented Nov 4, 2026 •

Copy link
Copy Markdown

Summary

  • Document discriminated-union JSON Merge Patch on AIP-134: kind always required, same-kind merge, kind switch with defaults, reject cross-kind keys
  • Cross-link related guidance from AIP-126 where Update / merge-patch behavior is described

Test plan

  • Skim AIP-134 and AIP-126 diffs for clarity and consistency with public BFF PATCH behavior

Note

Add discriminated-union merge-patch rules to AIP-134 and cross-link AIP-126

Docs-only change to the API improvement proposals.

  • 0134.md now requires PATCH updates to discriminated-union fields to include kind. Matching kinds merge present members; a different kind replaces the variant, with product defaults used where available and required fields without defaults supplied by the client.
  • Members invalid for the stated kind must be rejected with a clear client error naming the member and kind. A discriminated-union exception is added to the general recursive merge rules.
  • 0126.md gains an Update (PATCH) section referencing AIP-134. Create, Replace, and response bodies keep full variant shapes in both documents.
  • Behavioral Change: APIs following this guidance must reject union patches without kind and with members outside the stated kind.

Macroscope summarized 46a1aa5.

@corbanpro
corbanpro merged commit e818ad1 into master Nov 5, 2026
1 check passed
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