#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.
#299 attempted to take a stance on use of
field_behavior = REQUIREDononeoffields, but it is wrong.oneofandfield_behavior = REQUIRED/OPTIONALanswer 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
oneoffields.Unfortunately, protobuf does not have a means of annotating theoneofstatement 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.