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

Updating examples to pydantic v2 #72

Closed
Tracked by #86
nsheff opened this issue Sep 5, 2023 · 4 comments
Closed
Tracked by #86

Updating examples to pydantic v2 #72

nsheff opened this issue Sep 5, 2023 · 4 comments
Assignees
Milestone

Comments

@nsheff
Copy link
Member

nsheff commented Sep 5, 2023

with pydantic 2, fastapi seems to have a new way to define examples using JSONschema.

In bedhost, there's actually a lot of complexity to the code around examples, and validation. I propose we scrap all the old code, introduce a requirement of python 3.10 + pydantic v2, and refactor all the examples and validation code to follow the new approach.

@khoroshevskyi
Copy link
Member

I think, we can't use pydantic v2 at this point because we are using sqlmodel, which is based on pydantic v1, and there will be conflicts

@nsheff
Copy link
Member Author

nsheff commented Sep 8, 2023

hm. good point, we might need to wait until sqlmodel is compatible with pydantic v2. I think it should happen in the next few months.

@nsheff
Copy link
Member Author

nsheff commented Oct 3, 2023

To track SQLmodel update to pydantic 2: fastapi/sqlmodel#532

@nsheff nsheff added this to the v0.3.0 milestone Feb 16, 2024
@nsheff
Copy link
Member Author

nsheff commented Feb 16, 2024

Models can be updated now because sqlmodel has been updated to pydantic v2.

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

No branches or pull requests

3 participants