You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Write mcve.py
2. Browse to OpenAPI schema
3. Observe dropdown fields
4. Execute on the test route
5. See error
6. Apply fix `Environment | None`
7. Reload OpenAPI schema
8. See no dropdown, just text field
9. Execute on the test route
10. See it work, but be deeply saddened that there is no longer a dropdown box and contemplate deleting your entire application.
Description
When using an arbitrary enum as a type (or
Literal
assumedly), it generates a dropdown in the OpenAPI docs.but hitting this endpoint gives a validation error:
This makes sense, but the fix of adding
| None
moves the dropdown field to just a plain textfield.URL to code causing the issue
No response
MCVE
Steps to reproduce
Screenshots
: Environment
: Environment | None
Logs
No response
Litestar Version
2.x
Platform
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 Litestar dashboard
The text was updated successfully, but these errors were encountered: