swagger-api / swagger-api/swagger-ui
apiKey pairs not represented well in UI
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
When using apiKey pairs as per: https://swagger.io/docs/specification/authentication/api-keys/
Or in the case of my config below, the Swagger UI still continues to show the two keys as seperate authorizable entries rather than an AND case as they should be handled.

"securityDefinitions": {
"username": {
"type": "apiKey",
"name": "X-Username",
"in": "header"
},
"key": {
"type": "apiKey",
"name": "X-ApiKey",
"in": "header"
}
},
"security": [
{
"username": [
],
"key": [
]
}
]
Experiencing this with the latest version as of posting.
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 reproducing the behavior in Swagger UI with the provided securityDefinitions and security configuration, focusing on how apiKey authorization entries are rendered. Compare the displayed entries with the Swagger authentication documentation. Done means the username and key definitions are represented as one authorization requirement with AND semantics rather than as separate authorizable entries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100