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
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
When generating a FastAPI endpoint that receives an enum parameter, the value is not properly validated before being passed to the implementation. Currently, the parameter is typed as a string instead of using an enum class, and the enum class is not generated.
Bug Report Checklist
Description
When generating a FastAPI endpoint that receives an enum parameter, the value is not properly validated before being passed to the implementation. Currently, the parameter is typed as a string instead of using an enum class, and the enum class is not generated.
openapi-generator version
v7.9.0
OpenAPI declaration file content or url
https://gist.github.com/reyescabello/6cd965708fd0b03e8eadb9f3c0c0a899#file-query_param_example-yml
Generation Details
Generated with jar:
java -jar openapi-generator-cli.jar generate -i openapi.yml -g python-fastapi -o openapi_server
Steps to reproduce
The generated code is:
The expected code is something like this:
Related issues/PRs
I think this may be related to this other issue about query params typing:
#20115
Suggest a fix
The text was updated successfully, but these errors were encountered: