You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I think this is a bug, but I'm not sure. Maybe I am missing something and the mistake is on my side.
Apologies in advance.
Describe the bug
When I generate my pydantic validators from a json schema and try to import the model class, I get this error:
PydanticUserError: RootModel does not support setting model_config['extra']
I enabled the --allow-extra-fields option. Apparently, this is not allowed for root models.
Hello,
I think this is a bug, but I'm not sure. Maybe I am missing something and the mistake is on my side.
Apologies in advance.
Describe the bug
When I generate my pydantic validators from a json schema and try to import the model class, I get this error:
PydanticUserError:
RootModel
does not support settingmodel_config['extra']
I enabled the --allow-extra-fields option. Apparently, this is not allowed for root models.
I import the class like this:
To Reproduce
Example schema:
Used commandline:
That's the generated model file:
Expected behavior
Import the model without error
Version:
The text was updated successfully, but these errors were encountered: