-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG][PYTHON-FASTAPI] Generator specifies path parameter default values #16029
Comments
I met the same issue when running |
I'm encountering the same issue, even with the latest version:
I can either remove |
i ran into this and used a custom template file to fix the issue. the contents of my custom
it's hard to see the diff but i changed this:
to this:
|
Bug Report Checklist
Description
The generator adds default values to path parameters, which FastAPI does not like.
openapi-generator version
v7.0.0-beta
OpenAPI declaration file content or url
This yields
This check is explicitly codified in the FastAPI source code:
https://github.com/tiangolo/fastapi/blob/master/fastapi/params.py
i.e.,
Generation Details
Steps to reproduce
Suggest a fix
Ensure default path params are always set to
...
The text was updated successfully, but these errors were encountered: