We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using create_model with __root__ like this:
__root__
resp_model = create_model( callback.__name__ + "-return", __root__=(return_annotation, ...), )
raises the following error in Pydantic v2:
TypeError: To define root models, use pydantic.RootModel rather than a field called 'root'
Pydantic v2 removed support for defining root models via __root__ in create_model. It now requires using pydantic.RootModel.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Using create_model with
__root__
like this:raises the following error in Pydantic v2:
TypeError: To define root models, use pydantic.RootModel rather than a field called 'root'
Pydantic v2 removed support for defining root models via
__root__
in create_model. It now requires using pydantic.RootModel.The text was updated successfully, but these errors were encountered: