How to use self-referencing RootModel?
#7967
Closed
WilliamDEdwards
started this conversation in
Pydantic V2
Replies: 1 comment
-
|
Found the issue. It should not be: ... but an assignment and a literal: |
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
Uh oh!
There was an error while loading. Please reload this page.
-
In Pydantic v1, I did this:
In Pydantic v2, this:
... tells me to use a
RootModel:... but using a
RootModeldoes not play well with self-referencing:... causes:
... as do
'NestedPathsDict'andfrom __future__ import annotations.Beta Was this translation helpful? Give feedback.
All reactions