Skip to content
Discussion options

You must be logged in to vote

AFAIK it's not documented, but schema_extra parameter of SQLModel's Field is for passing parameters that are not present in the Field, but supported by Pydantic's Field.

For example, there is no validation_alias parameter, but you can pass it the following way:

id_: in = Field(schema_extra={"validation_alias": "item_id"})

Replies: 7 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@chenkovsky
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@KimigaiiWuyi
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by YuriiMotov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
7 participants