Skip to content


Browse files Browse the repository at this point in the history
feat: improve json schema validation error output (DEV-456) (#153)
  • Loading branch information
jnussbaum committed Feb 11, 2022
1 parent 03554c2 commit 9f92b66
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion knora/dsplib/utils/
Expand Up @@ -45,7 +45,8 @@ def validate_ontology(input_file_or_json: Union[str, Dict, os.PathLike]) -> bool
validate(instance=data_model, schema=schema)
except jsonschema.exceptions.ValidationError as err:
print('Data model did not pass validation. The error message is:', err.message)
print(f'Data model did not pass validation. The error message is: {err.message}\n'
f'The error occurred at {err.json_path}')
return False
print('Data model is syntactically correct and passed validation.')
return True

0 comments on commit 9f92b66

Please sign in to comment.