From d4822230f6eaea9c7e884cf0988dd8f2e249ccfe Mon Sep 17 00:00:00 2001 From: Pallab Pain Date: Thu, 25 Jan 2024 16:10:05 +0530 Subject: [PATCH] revert: skips populating default if property not in instance" Refs: ba7eccfbad133e39062e41e02686d997275b44d4 --- riocli/jsonschema/validate.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/riocli/jsonschema/validate.py b/riocli/jsonschema/validate.py index 67da70f6..2c5f24cf 100644 --- a/riocli/jsonschema/validate.py +++ b/riocli/jsonschema/validate.py @@ -25,11 +25,6 @@ def set_defaults(validator, properties, instance, schema): for p, sub_schema in properties.items(): if "default" not in sub_schema: continue - - # Skip if property is not in instance - if p not in instance: - continue - if isinstance(instance, dict): instance.setdefault(p, sub_schema["default"]) if isinstance(instance, list):