LookupError
on JSON schema generation for annotated self-referencing TypedDict
#8704
Open
1 task done
Labels
bug V2
Bug related to Pydantic V2
Initial Checks
Description
Hey there!
I have a self-referencing
TypedDict
that I would like to annotate withField
, so that only one of the keys are required.The model works well, but it throws an exception while generating a JSON schema for the
PetMapping.pets
property:This model looks weird, but unfortunately I have to keep this structure for backward compatibility.
This problem does not exist on or before
2.3.0
.Example Code
Python, Pydantic & OS Version
The text was updated successfully, but these errors were encountered: