-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Authorization headers aren't specified in Swagger.json #309
Comments
I think several folks post-process the generated swagger docs and merge in overrides. That said contributions in the form of allowing greater control of openapi output are welcomed. As an example, I merge together multiple services as: cat *.swagger.json | jq --slurp 'reduce .[] as $$item ({}; . * $$item)' > apis.json but with a lexigraphically-last file with overrides ( |
Thanks Travis! |
It can be done using
Then add security header reqs in all services wherever needed (ref)
Don't forget to |
Currently we're using the swagger generated by grpc-gateway to generate client sdk's. And it works splendidly until we add authorization to the mix. Since the outputted swagger doesn't contain information regarding headers or authorization, neither does the outputted SDK's.
That means they're essentially useless (at least it is in typescript), since the headers can't be added globally.
A example of what's needed in swagger can be found here:
http://stackoverflow.com/questions/32910065/how-can-i-represent-authorization-bearer-token-in-a-swagger-spec-swagger-j
I'm new to grpc-gateway, so I might be missing something obvious.
The text was updated successfully, but these errors were encountered: