Skip to content
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

Support for pydantic2 #378

Closed
bohndthi opened this issue Aug 17, 2023 · 5 comments · Fixed by #414
Closed

Support for pydantic2 #378

bohndthi opened this issue Aug 17, 2023 · 5 comments · Fixed by #414

Comments

@bohndthi
Copy link

Since Pydantic V2 has been finally released (https://docs.pydantic.dev/2.0/blog/pydantic-v2-final/) it would be great to add support for it.

@n0nvme
Copy link
Contributor

n0nvme commented Aug 20, 2023

fastapi-code-generator uses datamodel-code-generator to generate pydantic models. New version of datamodel-codegen already have support for pydantic v2, so I guess #379 should fix the issue.

@serjflint
Copy link

@n0nvme you are right, but this package uses the fixed version of datamodel

datamodel-code-generator =  {extras = ["http"], version = "0.16.1"}

@serjflint
Copy link

V2 was introduced in v0.21.0

@coolofficials
Copy link

Any plans for this..?

@shippo-beth
Copy link

I cannot use fastapi 0.103.0 with latest pydantic-settings from extras with your project because of this limitation.

fastapi (0.103.0) depends on pydantic-settings (>=2.0.0), fastapi (0.103.0) requires pydantic (>=2.0b3).
And because fastapi-code-generator (0.4.4) depends on pydantic (>=1.5.1,<2.0.0)

Are there any plans to prioritize this soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants