You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to this, protoc-gen-openapiv2 can mark fields as required based on the google.api.field_behavior field option. But when I tried doing so, it does not mark the fields as required.
Note that the fields are only marked as required if I use specify them as required by using grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema.
🐛 Bug Report
According to this,
protoc-gen-openapiv2
can mark fields as required based on thegoogle.api.field_behavior
field option. But when I tried doing so, it does not mark the fields as required.Note that the fields are only marked as required if I use specify them as required by using
grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema
.To Reproduce
My proto file
myproto.proto
Generate spec via:
protoc -I /opt/include -I . --openapiv2_out=logtostderr=true,json_names_for_fields=true:gen myproto.proto
Expected behavior
Actual Behavior
Your Environment
What am I missing? Is
google.api.field_behavior
not supported by protoc-gen-openapiv2?The text was updated successfully, but these errors were encountered: