grpc-gateway icon indicating copy to clipboard operation
grpc-gateway copied to clipboard

Support tags in service annotations

Open kkolur opened this issue 1 year ago • 5 comments

It seems that the service option in OpenAPI configuration file is not working, or at least I am unable to get it to work.

The protoc compiles and successfully generates the swagger but the tags is not getting updated with the description set by the service tag. Here is OpenAPIServiceOption

I also checked unannotated_echo_service.swagger.yaml and could not find the corresponding service description in unannotated_echo_service.swagger.json (which im assuming is the generated swagger output of unannotated_echo_service.swagger.yaml)

However, in the a_bit_of_everything.proto where the annotations are in the proto file, it seems the tags for the service are properly generated in a_bit_of_everything.swagger.json

kkolur avatar Jul 25 '22 23:07 kkolur

I found this which may indicate that its still a TODO? https://github.com/grpc-ecosystem/grpc-gateway/blob/master/protoc-gen-openapiv2/options/openapiv2.proto#L96

kkolur avatar Jul 26 '22 01:07 kkolur

I think it is just the tags, as you say, not the entire service option. I have updated the title. Would you be interesting in helping implement this?

johanbrandhorst avatar Jul 26 '22 03:07 johanbrandhorst

See also: https://github.com/grpc-ecosystem/grpc-gateway/issues/2751

johanbrandhorst avatar Jul 26 '22 03:07 johanbrandhorst

Hi @johanbrandhorst, can I try to work on this issue?

numacci21 avatar Aug 09 '22 15:08 numacci21

Hi, yes, please feel free to start working on this, thank you!

johanbrandhorst avatar Aug 09 '22 16:08 johanbrandhorst

I would like to contribute to fix this issue. Thank you!!

Rajarshi1998 avatar Sep 09 '22 20:09 Rajarshi1998

We have an open PR already: https://github.com/grpc-ecosystem/grpc-gateway/pull/2858. No need to start work on this.

johanbrandhorst avatar Sep 09 '22 20:09 johanbrandhorst