From c57de32ac16e809469e22b977719dc38f2c47431 Mon Sep 17 00:00:00 2001 From: willson-chen Date: Thu, 9 Jul 2020 20:35:04 +0800 Subject: [PATCH] fix issue 191 first problem --- jsonschema/validators.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jsonschema/validators.py b/jsonschema/validators.py index 13a96647f..f3db1b978 100644 --- a/jsonschema/validators.py +++ b/jsonschema/validators.py @@ -333,7 +333,9 @@ def iter_errors(self, instance, _schema=None): instance=instance, schema=_schema, ) - if k not in {u"if", u"$ref"}: + if k == "additionalProperties" and v in (True, False): + pass + elif k not in {u"if", u"$ref"}: error.schema_path.appendleft(k) yield error finally: