swagger-api / swagger-api/swagger-ui
Header parameter "Authorisation" is not send to the server.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
Hi,
We are working on the swagger page containing our token refresh endpoint. To access this endpoint no authorisation is needed. @authentication_classes([]) Because of course you have to access it if your token is expired and thus not valid.
But our endpoint in Django reuires the HTTP_AUTHORISATION header to be set to get the old token there.
We tried to set an AUTHORISATION header parameter with def_spectacular. But it is not send to the server as you can see in the curl example. Why?
If we name the header parameter differently, it is send to the server.
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 reported token-refresh request in Swagger UI with a custom Authorisation header and compare the generated curl command with a differently named header. Trace the request-generation path from the UI controls or configuration described in the issue; done means the named header is included in the request while differently named headers retain their existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, openapi
- Domain
- api, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100