Raghuram Devarakonda
unread,Apr 8, 2020, 2:14:14 PM4/8/20Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to grp...@googlegroups.com
Hi,
I am using grpc-gateway to generate Swagger spec and it is generally
working very well. However, I am having trouble with marking some
fields as "read only" so that they don't show up in the request body
schema in Swagger UI.
Here is how I am configuring a field as "read only":
"string id = 2 [(grpc.gateway.protoc_gen_swagger.options.openapiv2_field)
= {read_only: true}];"
This seems to work for scalar types but not for structs. For example,
the following:
"Status status = 3
[(grpc.gateway.protoc_gen_swagger.options.openapiv2_field) =
{read_only: true}];
Doesn't work. "status" field still shows up in the request body
schema. Am I missing something here? Any help is greatly appreciated.
Thanks,
Raghu