Skip to content

Bearer auth security type adds empty Authorization component #411

Closed
@IanVS

Description

@IanVS

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

git clone https://github.com/IanVS/repro-docusaurus-openapi-issue.git
git checkout bearer-auth
npm i
npx docusaurus gen-api-docs all
npm start

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

image

Context

Not a huge deal, just strange to show a thing that does nothing.

Your Environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions