When I run the python jsonschema validator it formats error messages in a very lengthy way. It seems that first it cites the whole schema, where the error has occured, after that mentioned the problematic element and finally tells the error message itself.
If the problem is in the root schema, the resulting message become very verbose. What values do you put in -F
key when you run the validator?
It seems that I figured it out. The formatting string to -F
option must be in the form suitable to pass it to python format function. So we can use the properties of the error variable, which are listed here.
Here is an example:
jsonschema hbp_prov_schema_v3.json \
-i tests/hbp_prov_example_real.json \
-F "ERROR: {error.path} {error.message}
"
This will provide a lot more readable output.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With