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

Serving swagger.json from runtime mux? #230

Closed
philipithomas opened this issue Oct 7, 2016 · 5 comments
Closed

Serving swagger.json from runtime mux? #230

philipithomas opened this issue Oct 7, 2016 · 5 comments

Comments

@philipithomas
Copy link
Contributor

It seems that the best practice for serving a swagger.json is to do it at the apex of the API. However, the runtime does not seem to easily support this.

Is there a best practice for this? Does it make sense to create a custom handler for the swagger here?

@johanbrandhorst
Copy link
Collaborator

johanbrandhorst commented Oct 7, 2016

https://grpc.io/blog/coreos/ has a pretty cool example of how to set up your swagger definitions on top of your API server.

@philipithomas
Copy link
Contributor Author

@johanbrandhorst That was actually really easy follow. Maybe I'll PR it into the README

yugui pushed a commit that referenced this issue Oct 13, 2016
Show users how to combine these different projects in a unified way, e.g. how to serve the generated `swagger.json` on the API

Closes #230
@tamalsaha tamalsaha mentioned this issue Mar 30, 2017
1 task
@campoy
Copy link

campoy commented Jul 23, 2019

For anyone looking into this issue and finding the link is broken, apparently CoreOS changed their blogging system and now it's case sensitive!

You can still find the post: https://coreos.com/blog/grpc-protobufs-swagger.html

@johanbrandhorst
Copy link
Collaborator

Thanks Francesc, I've updated my link 😄.

adasari pushed a commit to adasari/grpc-gateway that referenced this issue Apr 9, 2020
Show users how to combine these different projects in a unified way, e.g. how to serve the generated `swagger.json` on the API

Closes grpc-ecosystem#230
@johanbrandhorst
Copy link
Collaborator

Updated the link again to https://grpc.io/blog/coreos/

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

No branches or pull requests

3 participants