Bug: Inablity to select same value multiple times for a list of Enum parameter in get request
abhishek-compro opened this issue · 1 comments
abhishek-compro commented
Description
I want to be able to select the same option multiple times in the array of Enum type but I am unable to do so as shown in the screenshot.
URL to code causing the issue
No response
MCVE
from enum import Enum
from litestar import Litestar, get
class A(Enum):
x = "x"
y = "y"
z = "z"
@get("/")
def select_multiple_enums(a_list: list[A]) -> list[A]:
return a_list
app = Litestar(route_handlers=[select_multiple_enums])
Steps to reproduce
1. Write the above code in a file called `app.py`
2. Run it using `litestar run -dr`
Screenshots
No response
Logs
No response
Litestar Version
litestar==2.12.1
Platform
- Linux
- Mac
- Windows
- Other (Please specify in the description above)
Note
While we are open for sponsoring on GitHub Sponsors and
OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.
Check out all issues funded or available for funding on our Polar.sh dashboard
- If you would like to see an issue prioritized, make a pledge towards it!
- We receive the pledge once the issue is completed & verified
- This, along with engagement in the community, helps us know which features are a priority to our users.
provinzkraut commented
This is not a bug in Litestar but a limitation of Swagger: swagger-api/swagger-ui#8583