Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support specifying servers in the swagger generator #891

Closed
PassKit opened this issue Mar 4, 2019 · 3 comments
Closed

Support specifying servers in the swagger generator #891

PassKit opened this issue Mar 4, 2019 · 3 comments

Comments

@PassKit
Copy link

PassKit commented Mar 4, 2019

Currently it is not possible to specify servers in grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger.

This necessitates a manual edit of the JSON before it can be published as documentation.

@johanbrandhorst
Copy link
Collaborator

Hi, thanks for raising this issue. How can I help you contribute a fix for this?

@bentranter
Copy link

Hey @johanbrandhorst, it looks like the reporter of this issue was expecting the OpenAPI v3 definitions (seen in the latest Swagger spec) which contains a servers array, whereas gRPC Gateway only supports Swagger v2, which doesn't contain a servers array, but rather only allows users to define host, basePath, and schemes fields. I think this issue can be closed.

@johanbrandhorst
Copy link
Collaborator

Great spot @bentranter, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants