gapic-generator-python icon indicating copy to clipboard operation
gapic-generator-python copied to clipboard

allow `optional` proto fields that are annotated as `REQUIRED`

Open vchudnov-g opened this issue 2 years ago • 1 comments

Unit tests fail when a field is proto3-optional but has (google.api.field_behavior)=REQUIRED. In spite of the fact the names sound like they are referring to the same thing, they're not, in fact. The former tracks field presence, while the latter tracks the service's expectation. See https://google.aip.dev/149#field-behavior-and-optional.

vchudnov-g avatar Sep 18 '23 22:09 vchudnov-g

Note that his also seems to apply to optional REQUIRED fields. I had captured this in my notes but apparently it didn't get fixed here.

vchudnov-g avatar Jun 24 '24 22:06 vchudnov-g