-
Notifications
You must be signed in to change notification settings - Fork 149
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
Always HTTP 400 if marshmallow==3.0.0b13 #492
Comments
You all right @wjehenddher, it makes sense, I tested your suggestioh and it worked as expected, however, I wonder why I can't simply use the |
That's indeed the bummer, @calopez. Your "custom schema" sits on top of cornice's schema that deals with I.e, cornice creates multiple schemas to handle all parts of the request and delegates onto "custom schemas" depending on which Perhaps a configuration setting in |
This should be fixed in PR #495 . I've reintroduced compatibility across both versions - in my opinion we should fall back to unknown=EXCLUDE again and cornice should drop the keys that are not explictly enabled. I think we could also add an option to override meta from schema Meta - but I'm not 100% sure what potential implications that could have so I didn't add that functionality. |
Hi,
Just ran across this:
The reason is marshmallow 3.0.0b13 marshmallow-code/marshmallow#911
Perhaps
unknown = marshmallow.EXCLUDE
is now needed here:cornice/cornice/validators/_marshmallow.py
Lines 56 to 58 in fcda515
The catch is that marshmallow wants to be more strict (than before) so relaxing it seems questionable.
Up to marshmallow 3.0.0b12, it all worked well. In 3.0.0b13, the
unknown=EXCLUDE
fixes the issue.The text was updated successfully, but these errors were encountered: