swagger-api / swagger-api/swagger-ui

Available authorizations popup is empty for referenced security scheme

Open
#6,159 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cat: auth cat: docker type: bug
Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

Q&A (please complete the following information)

  • OS: [Windows [10]
  • Browser: [Chrome, Firefox]
  • Version: [latest]
  • Method of installation: [Docker]
  • Swagger-UI version: [latest]
  • Swagger/OpenAPI version: [OpenAPI 3.0]
Content & configuration

The example can be found at:
https://github.com/jakubmalek/swagger-ui-security-ref-example

Describe the bug you're encountering
  • The "Available authorizations" popup is empty.
  • No errors in the console
To reproduce...
  1. git clone https://github.com/jakubmalek/swagger-ui-security-ref-example.git
  2. docker build -t jakubmalek/swagger-ui-example:latest .
  3. docker run -p 8080:8080 --name swagger-ui-example -d -it jakubmalek/swagger-ui-example:latest
  4. Open http://localhost:8080 in the browser
  5. Click on "Authorize" button
Expected behavior

Authorization popup with form to be shown.

Screenshots

image

image

Additional context or thoughts

When security schema is embedded in the API specification it's working.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Clone and run the referenced swagger-ui-security-ref-example with Docker, then open the Authorize popup and compare it with a specification where the security scheme is embedded. Trace how Swagger UI resolves referenced security schemes and verify that the popup displays the expected authorization form without console errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, openapi
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.