Skip to content

AIP-203: How should we communicate field_behavior in a oneof? #1147

@noahdietz

Description

@noahdietz

#299 attempted to take a stance on use of field_behavior = REQUIRED on oneof fields, but it is wrong. oneof and field_behavior = REQUIRED/OPTIONAL answer different questions and impact different things. One is a serialization/wire format tool, the other is a documentation of service behavior.

That said, we still need a way to communicate service expectations of oneof fields. Unfortunately, protobuf does not have a means of annotating the oneof statement itself, leaving us with field or message level annotations, each with their own issues.

cc @toumorokoshi tracking our internal discussion from a few weeks ago.

Metadata

Metadata

Assignees

No one assigned

    Labels

    aip: amendmentThis AIP should be amended to add something.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions