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

Adding authentication definitions to generated swagger files #428

Closed
boosh opened this issue Jul 5, 2017 · 4 comments · Fixed by #547
Closed

Adding authentication definitions to generated swagger files #428

boosh opened this issue Jul 5, 2017 · 4 comments · Fixed by #547

Comments

@boosh
Copy link

boosh commented Jul 5, 2017

My API requires authentication for all endpoints. This is defined in a config.yml file that I feed into Google Cloud Endpoints.

I generated a swagger spec from my service's .proto file, and then generated a javascript library for use on the web.

Do you have any plans to support swagger's API keys definitions, or should we monkey-patch them into generated libraries ourselves (if that's even an optionI)?

@c4milo
Copy link

c4milo commented Jul 25, 2017

I had the same issue and I've been monkey patching.

@achew22
Copy link
Collaborator

achew22 commented Dec 14, 2017

@boosh, right now we don't support this since we don't emit OpenAPIv3 definitions. You're welcome to monkey patch it, or to take this opportunity to extend on the work of Ivan and help us by adding support for the subset of OpenAPIv3 you're interested in using. If you want some pointers on that I'm happy to help!

@ivucica
Copy link
Collaborator

ivucica commented Feb 11, 2018

This exists in v2 as well: https://swagger.io/docs/specification/2-0/authentication/api-keys/

We'd need to add security field into grpc.gateway.protoc_gen_swagger.options.Operation. We'd also need to add security and securityDefinitions into grpc.gateway.protoc_gen_swagger.options.Swagger.

@ivucica
Copy link
Collaborator

ivucica commented Feb 11, 2018

I hope this is what you had in mind :-)

adasari pushed a commit to adasari/grpc-gateway that referenced this issue Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants