Closed nsheff closed 8 months ago
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
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.
To track SQLmodel update to pydantic 2: https://github.com/tiangolo/sqlmodel/issues/532
Models can be updated now because sqlmodel has been updated to pydantic v2.
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.