Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

Commit

Permalink
Force pydantic 2.0 (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterKraus authored Aug 22, 2023
1 parent 45b3d43 commit 7cdbc7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ invoke
linkml
mongomock
pre-commit
pydantic
pydantic~=2.0
uvicorn
2 changes: 1 addition & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def regenerate_models(_):
for schema in schemas:
print(schema)
schema_path = Path(schema)
gen = pd.PydanticGenerator(schema, verbose=True)
gen = pd.PydanticGenerator(schema, pydantic_version="2", verbose=True)
output = gen.serialize()
with open(MODEL_DIRECTORY / f"{schema_path.name.strip('.yml')}.py", "w") as f:
f.writelines(output)
Expand Down

0 comments on commit 7cdbc7d

Please sign in to comment.