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

feat(AIP-203): Disallow OUTPUT_ONLY fields with OPTIONAL/REQUIRED sub… #1276

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Nov 27, 2023

  1. feat(AIP-203): Disallow OUTPUT_ONLY fields with OPTIONAL/REQUIRED sub…

    …-fields
    
    Nested messages allow avoiding code duplication, where the same type can be shared
    by multiple messages. Given that field behavior annotations are also required for
    nested messages, field behavior must also implicitly be shared. Annotating a field
    with `OUTPUT_ONLY`, when the field is a sub-message declaring `REQUIRED` and/or
    `OPTIONAL` fields, forces clients to treat this sub-message differently depending
    on the context it is used in. Forcing services to consistently separate output
    fields from user-defined fields avoids this problem. Additionally, there is little
    value in annotating sub-fields of `OUTPUT_ONLY` fields as either `REQUIRED` or
    `OPTIONAL`, since the consequences of breaking this contract by services still
    have to be handled by clients.
    andrei-scripniciuc committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    b5a7e9e View commit details
    Browse the repository at this point in the history