Replies: 2 comments
-
I have some other uses for json_schema_extra, and right now this is preventing me from moving forward with SQLModel... :( |
Beta Was this translation helpful? Give feedback.
0 replies
-
Any update on this? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First Check
Commit to Help
Example Code
Description
I've got a case where I want to set some valid enum values in a schema, and this should be doable with
json_schema_extra
. Except it's a Pydantic v2 feature, and SQLModel only seems to support the v1 version (see also https://docs.pydantic.dev/latest/migration/#changes-to-pydanticfield). I found a hacky workaround (see example), but it's kinda terribleOperating System
macOS
Operating System Details
No response
SQLModel Version
0.0.14
Python Version
3.10
Additional Context
Running pydantic 2.5.3
Beta Was this translation helpful? Give feedback.
All reactions