diff options
author | Guido Dassori <guido.dassori@gmail.com> | 2015-10-25 12:24:23 +0100 |
---|---|---|
committer | Guido Dassori <guido.dassori@gmail.com> | 2015-10-25 12:24:23 +0100 |
commit | 928c3d38c7c0ccf18c3f68febde4888652a2e246 (patch) | |
tree | e6296fdccc27376f71df27cc9f4d7c138ac116fc | |
parent | 11666e820041b85423dde05f16ad3f8de7ac6dc2 (diff) | |
download | jsonschema-patch-1.tar.gz |
Add path into extraspatch-1
Invalidating extras doesn't provide the involved property name into ValidationError.path, as other validators seems do.
-rw-r--r-- | jsonschema/_validators.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/jsonschema/_validators.py b/jsonschema/_validators.py index 40fe340..0d9cace 100644 --- a/jsonschema/_validators.py +++ b/jsonschema/_validators.py @@ -30,7 +30,8 @@ def additionalProperties(validator, aP, instance, schema): yield error elif not aP and extras: error = "Additional properties are not allowed (%s %s unexpected)" - yield ValidationError(error % _utils.extras_msg(extras)) + yield ValidationError(error % _utils.extras_msg(extras), + path=(extras)) def items(validator, items, instance, schema): |