Skip to content
New issue

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

model_config Parameter in pydantic_model_creator Not Effective in Sub Models #1686

Open
yuanshibtc opened this issue Jul 30, 2024 · 0 comments

Comments

@yuanshibtc
Copy link

When using pydantic_model_creator to create schemas, I want to set the json_encoders in the schema via the model_config parameter. Additionally, I want the same json_encoders to be used in sub models. However, the json_encoders are not effective in the sub models.

I noticed that in _pydantic_recursion_protector, the model_config is not passed to the sub models. How can I ensure that the json_encoders in model_config are applied to sub models?
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant