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 root_validator issues with optional fields and made meta optional #145
Conversation
Codecov Report
@@ Coverage Diff @@
## master #145 +/- ##
=======================================
Coverage 85.79% 85.79%
=======================================
Files 39 39
Lines 1830 1830
=======================================
Hits 1570 1570
Misses 260 260
Continue to review full report at Codecov.
|
Right! That makes sense - sort of :)
This is fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good fix. Thanks @ml-evs.
I have only a small change request for consistency.
I have just pushed the fix myself - I hope you agree with it as well? I will just wait for your input and otherwise merge it. |
Cheers @CasperWA, I've just been even pickier with the language :P Hope you still accept! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great with extra nit-picky pickyness @ml-evs 😅
After some fiddling, it seems like all that needed to be done was set
pre=True
in the remaining root validators, otherwise "data" seems to get validated first and popped from the response dict? (unsure)I've also had to make
meta
optional forEntryResponseOne
andEntryResponseMany
, which changes the openapi spec. I'm not sure how I feel about this...