Add rule to validate field doesn't have both proto3 "optional" and "REQUIRED" annotation
Closed this issue · 0 comments
aohren commented
gapic-generator errors on fields that have both the protoe3 optional keyword and a (google.api.field_behavior) = REQUIRED annotation.
For example, given the following field definition in a .proto file:
optional string language = 14 [(google.api.field_behavior) = REQUIRED];
The following error occurs during GAPIC generation:
ERROR: toplevel: oneof field language cannot be required (in method GenerateKeywordIdeas)
It would be good to have linter rules for API-203 flag this.