OpenAPITools / OpenAPITools/openapi-generator
[REQ] Support pydantic v2 in python-fastapi generator
Open
Nobody has claimed this yet.
Enhancement: Feature
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
The python-fastapi generator constructs models with pydantic v1.
Describe the solution you'd like
It would be nice to have an option to use pydantic v2, such as discussed in this comment.
Describe alternatives you've considered
I've considered using the python generator but it doesn't match my use-case as seemlessly as the python-fastapi generator.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the python-fastapi generator and the linked discussion in PR 16549 first. Define how the requested option should affect generated models, then verify that pydantic v2 output works while the existing pydantic v1 path remains available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fastapi, python
- Domain
- api, backend, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100