swagger-api / swagger-api/swagger-ui
Json fetch request is not fired on authorization/logout
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
Swagger-ui version 3.12.1.
I need to show/hide some endpoints based on the authorization. I.e. after user makes authorization, it should ask server for json and server should return json for authorized user. If user logs out, it should ask for json for anonymous user. To make it happen, swagger-ui should fetch json from server on auth/logout. It worked in prev versions.
Steps to reproduce:
- Navigate to http://petstore.swagger.io/
- Click Authorize
- Fill in api_key auth method with any token and click Authorize, click close.
Expect: swagger-ui should call specActions.download() to download json once again after logged in
Actual: json is not updated
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
Reproduce the flow at http://petstore.swagger.io/ by authorizing with an api_key, then inspect the authorization and logout paths around specActions.download(). Done means the JSON is fetched again after authorization and after logout, so the displayed endpoints update for the current user.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- authentication, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100