Skip to content
Discussion options

You must be logged in to vote

This is only related to schema_extra={"strict": True}.
It has already been reported here: #816

In your first code example you use schema_extra={"validation_alias": "test"} and in this case everything works as expected.
You have

E           pydantic_core._pydantic_core.ValidationError: 1 validation error for TestModel
E           test
E             Field required [type=missing, input_value={'timestamp': datetime.da...time(2023, 1, 1, 12, 0)}, input_type=dict]
E               For further information visit https://errors.pydantic.dev/2.11/v/missing

(missing value for required field test)

That's because you specified validation_alias and now Pydantic expects to find value for timestamp field…

Replies: 2 comments

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
3 participants