-
Notifications
You must be signed in to change notification settings - Fork 272
Bearer auth security type adds empty Authorization component #411
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
Comments
|
Hi @IanVS, thanks for reporting this issue. It's in our backlog to address with the goal to provide full coverage of all auth/security-scheme types. |
Upon second inspection, it looks like the security scheme defined in your repro is missing a Something like: if (options[selected]?.type === undefined) {
return null;
} |
I followed the example from https://swagger.io/docs/specification/authentication/bearer-authentication/
What is it that is missing? (I'm still learning the ins and outs of openapi). |
You're correct, nothing is missing in your usage. I believe what is happening is that options is the union of |
Describe the bug
When using bearer auth, there's an un-expandable
Authorization
box shown above the demo request box.Expected behavior
Either it should show something useful, or just go away, I guess. Would be nice to show the description that I've added for the bearer auth, I suppose. Even better if I can customize this description per path+method, but I don't think that's part of the openapi spec.
Current behavior
An empty, unclickable box is shown.
Steps to reproduce
Navigate to
/docs/petstore/add-pet
Notice that there is an "Authorization" box, that looks clickable, but does not expand to show anything.
Honestly I'd love to be able to show the api token's "scopes" that are required (we use scoped keys), but I know that scopes are only supported by oidc and oauth. :(
Screenshots
Context
Not a huge deal, just strange to show a thing that does nothing.
Your Environment
The text was updated successfully, but these errors were encountered: