Q&A (please complete the following information)
- OS: ALL
- Browser: ALL
- Version: ALL
- Method of installation: ALL
- Swagger-UI version:Latest/5.32.8
- Swagger/OpenAPI version: Swagger 2 OpenAPI 3.1
Content & configuration
Allow empty only works once. If you select something from the list, and unselect, the empty query parameter does not get attached.
Example Swagger/OpenAPI definition:
{
"name": "status",
"in": "query",
"description": "Find Something. Send status= to clear the status filter.",
"style": "form",
"explode": true,
"allowEmptyValue": true,
"schema": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string",
"description": "Something",
"enum": [
"FOO",
"BAR"
]
}
},
{
"type": "null"
}
]
}
},
Swagger-UI configuration options:
Defaults.
To reproduce...
Steps to reproduce the behavior:
- Have an api-doc similar/including to what I shared above.
- Check the "Allow Empty" checkbox
- Send a request and see that it works /
status= is sent.
- Select then unselect any item in the list. It should be empty again.
- See that
status= is NOT sent.
Expected behavior
status= should continue to be sent after selecting/unselecting everything.
Screenshots
Additional context or thoughts
I have already fixed this here: #10940 :)
Q&A (please complete the following information)
Content & configuration
Allow empty only works once. If you select something from the list, and unselect, the empty query parameter does not get attached.
Example Swagger/OpenAPI definition:
Swagger-UI configuration options:
Defaults.
To reproduce...
Steps to reproduce the behavior:
status=is sent.status=is NOT sent.Expected behavior
status=should continue to be sent after selecting/unselecting everything.Screenshots
Additional context or thoughts
I have already fixed this here: #10940 :)