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
revalidate models #177
revalidate models #177
Conversation
Codecov Report
@@ Coverage Diff @@
## main #177 +/- ##
=======================================
Coverage 97.75% 97.75%
=======================================
Files 45 45
Lines 4371 4371
Branches 32 32
=======================================
Hits 4273 4273
Misses 98 98 Continue to review full report at Codecov.
|
3f0cf92
to
53d8987
Compare
@tiangolo could you confirm you're happy with this behaviour for fastAPI. Summary of behaviorThe validator checks the input value type - effectively
There's no Note, one potential confusion with this - if you have Perhaps we make them both true by default. @PrettyWood do you agree? Perhaps we could:
??? |
This looks great! Indeed, it solves the use case in FastAPI. This means I won't have to do the hacky trick to "clone" a field for I agree that it makes sense to have both |
I understand it's better for FastAPI but personally would have kept |
Can do, but we'll need a default in pydantic anyway, we don't want to force people to set config on ever model. |
let's keep this as it is and consider defaults in pydantic, further down the road. |
fix #155 and fix #21