-
Notifications
You must be signed in to change notification settings - Fork 58
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
Validate extra keys in data #96
Comments
Hi! There are no ready to use feature for this. But you can extend your schema validation (read here https://marshmallow.readthedocs.io/en/latest/extending.html) with post/preprocessing and checking for invalid keys. |
@maximdanilchenko This won't help.. The problem with the webargs itself: it parses arguments and then calls schema.load(...) for already parsed arguments (there are no extra fields after arguments parsing), so basically webargs library ignores "unknown" schema parameter Does anything block webargs update in aiohttp_apispec? |
should be closed with #112 |
Hey!
Is it possible to validate extra keys in data?
For example:
If i try to patch with body
{"id": 1, "name": "task", "extra_key": 1}
then error will not be raised, how to raiseValidationError
on this case too? Thanks.The text was updated successfully, but these errors were encountered: