swagger-api / swagger-api/swagger-ui
refresh with Authorization header
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
Is your feature request related to a problem?
Some APIs provide role-specific endpoints and functions. For example, PostgREST does this - if a user is not authorized to use an endpoint, it won't show up in the OpenAPI spec. Such endpoints don't show up in Swagger UI and thus cannot be explored or tested with Swagger UI.
Setting authorization (e.g. Bearer header) in the Swagger UI does not reload the OpenAPI/Swagger spec file, and a reload of the web-page clears the header.
Describe the solution you'd like
Either automatically reload the spec when authorization has been added, or add a button that does that (probably within the Authorize pop-up window).
Describe alternatives you've considered
Tried reloading, see above.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Swagger UI Authorize pop-up and the OpenAPI/Swagger spec loading flow described in the issue. Verify the role-dependent endpoint behavior with an authorization header; done when adding authorization can refresh the spec, either automatically or through a control in the Authorize window.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, openapi
- Domain
- api, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100