Skip to content
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

Adding attribute to ValidationError when additionalProperties is false #579

Closed
mmerce opened this issue Apr 11, 2018 · 1 comment
Closed

Comments

@mmerce
Copy link

mmerce commented Apr 11, 2018

When additionalProperties is set to false, the ValidationError attributes don't contain the key of the attribute that violates the validation. For instance, if schema = {"foo": "string", "additionalProperties": false}, then instance = {"bar": 1, "foo": "1"} will raise the error, but there's no way of knowing that bar was the cause of it. Is there an alternative way of finding that out? We need it in order to be able to filter JSON messages according to the defined schema.

@mmerce
Copy link
Author

mmerce commented Apr 11, 2018

Sorry, probably wrong repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant