Closed mattbailey closed 5 years ago
cc @lizan seems like an interesting potential enhancement.
Is there a current-best-practice way to inspect the request/response shape of the generated API transcoding filter?
Yeah it is an interesting enhancement. @mattbailey can we just re-use the protoc-gen-swagger
from grpc-gateway, and serve the generated openapi.json
, if so probably just add docs for that is enough.
Yeah it is an interesting enhancement. @mattbailey can we just re-use the
protoc-gen-swagger
from grpc-gateway, and serve the generatedopenapi.json
, if so probably just add docs for that is enough.
@lizan that was my initial approach, but I have no way of knowing that protoc-gen-swagger
, which is intended to document protoc-gen-gateway's transcoding, produces the same API. Although it was modeled after it, gRPC-JSON doesn't use protoc-gen-gateway
under the hood right?
Might be enough for a stop-gap, but I'd be worried changes in envoy or protoc-gen-gateway/swagger
either do now, or may in the future, create subtle changes in the transcoder or the swagger.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.
Any more thought on this? Would be interested in it
I think this is even more relevant now with the addition of the auto_mapping
feature: https://www.envoyproxy.io/docs/envoy/latest/api-v2/config/filter/http/transcoder/v2/transcoder.proto.html?highlight=auto_mapping
Since protoc-gen-swagger apparently just leaves endpoints out entirely if they don't have annotations.
@lizan @mattbailey is there any update on this? I'd be happy with some documentation on how to generate this manually for now. Though, I don't think that that exists at the moment.
@lizan @mattbailey is there any update on this? I'd be happy with some documentation on how to generate this manually for now. Though, I don't think that that exists at the moment.
I am still using the protoc-gen-swagger from https://github.com/grpc-ecosystem/grpc-gateway/tree/master/protoc-gen-swagger which has been mostly effective, but their are blind spots, e.g.: https://github.com/envoyproxy/envoy/issues/3383
@mattbailey Fix for #3383 is merged yesterday.
@mattbailey Fix for #3383 is merged yesterday.
Yeah, and it's awesome, been watching it, I just haven't checked whether it maps to what is generated by protoc-gen-swagger yet.
OK, thanks. It'd be great to have something simpler than using protoc-gen-swagger, but that's a good start for now.
Any update on this? we are using envoy proxy to convert gRPC to REST and we need to have swagger based interactive API documentation
I'm still personally using protoc-gen-swagger, and we've centralized our proto files which seems to have a number of benefits. It still would be extremely handy, of course.
it still relevant in 2022, any updates?
it still relevant in 2022, any updates?
May be usefull - resolved by gnostic tool.Using protoc-gen-openapi it can produce openapi spec from proto file
Title: Generating swagger or openapi json from gRPC-JSON transcoder
Description:
Relevant Links: