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
Fix Json strategy serialization failure #4005
Fix Json strategy serialization failure #4005
Conversation
5ce6912
to
f18f623
Compare
please review |
f18f623
to
f669c91
Compare
f669c91
to
571e0bb
Compare
Thanks @SergioSim for the patch 👍 Please update |
571e0bb
to
31ab8be
Compare
Thanks for the review @hramezani 👍 Added the please review |
Thanks @SergioSim for updating. Just a small improvement in the change file. Please update |
When generating a pydantic model having nested Json fields with hypothesis, a JSON serialization exception was raised.
6a5dd1e
to
1ec0a47
Compare
Thanks for your feedback @hramezani 👍 Updated the change file. Please review |
thanks so much. |
When generating pydantic models having nested
Json
fields withhypothesis, a JSON serialization exception was raised.
Change Summary
Changed the
resolve_json
function inpydantic/_hypothesis_plugin.py
to use the pydantic json serializer if the type passed to theJson
field is a subclass ofpydantic.BaseModel
.Related issue number
fix #4004
Checklist
Documentation reflects the changes where applicablechanges/<pull request or issue id>-<github username>.md
file added describing change(see changes/README.md for details)