swagger-api / swagger-api/swagger-ui
`format`s of query parameters are not shown for array-type parameters
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
| Q | A |
|---|---|
| Bug or feature request? | bug |
| Which Swagger/OpenAPI version? | any |
| Which Swagger-UI version? | 3.14.0 |
| How did you install Swagger-UI? | dist/ |
| Which browser & version? | any |
| Which operating system? | any |
Demonstration API definition
{
"swagger": "2.0",
"paths": {
"/v1/log/login/search": {
"get": {
"produces": [
"application/json;charset=utf-8"
],
"parameters": [
{
"items": {
"format": "uuid",
"type": "string"
},
"in": "query",
"name": "targetUserIds",
"collectionFormat": "multi",
"type": "array",
"description": "`UserId` | `uuid`"
}
]
}
}
}
}
Configuration (browser query string, constructor, config.yaml)
{
displayRequestDuration: true,
tagsSorter: 'alpha',
operationsSorter: 'alpha',
showCommonExtensions: true,
url: window.location.origin + "/swagger.json",
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
}
No query string.
Expected Behavior
Array-type parameters’ formats being rendered somewhere.
Current Behavior
After #4245 and #4231, formats are shown correctly for non-array query parameters. However array ones get just array[string], which is not what is defined in the API above:

/cc @heldersepu @hkosova @shockey
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 with Swagger UI's parameter rendering using the demonstration Swagger 2.0 definition, focusing on an array query parameter whose item has format uuid. Compare it with the existing non-array format behavior and verify that the rendered array parameter exposes the item format rather than only array[string].
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100