diff options
Diffstat (limited to 'resources/libraries/python/model/validate.py')
-rw-r--r-- | resources/libraries/python/model/validate.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/resources/libraries/python/model/validate.py b/resources/libraries/python/model/validate.py index ee82d3289f..85c4b993c9 100644 --- a/resources/libraries/python/model/validate.py +++ b/resources/libraries/python/model/validate.py @@ -52,10 +52,11 @@ def validate(file_path, validator): :param validator: Validator instance to use for validation. :type file_path: str :type validator: jsonschema.validators.Validator - :raises RuntimeError: If schema validation fails. + :raises ValidationError: If schema validation fails. """ with open(file_path, "rt", encoding="utf-8") as file_in: instance = json.load(file_in) error = jsonschema.exceptions.best_match(validator.iter_errors(instance)) if error is not None: + print(json.dumps(instance, indent=4)) raise error |