-
-
Notifications
You must be signed in to change notification settings - Fork 589
error object properties "schema" and "relative_schema_path" seem to be inconsistent #191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It also doesn't look like there is any reliable way to get the full path of the element causing the problem; this should be |
Sorry, I thought I replied here, but yeah the first thing certainly doesn't look right. Any chance you might have hunted down where the problem is? The second thing (getting the full path to your problem) is likely another instance of #119. |
nope, sorry. |
@jason-s, what is the desired output ? |
Since the
the
and not
The point is that if I take the schema path and find the value located there, it should be consistent with what As for my desired output, I want something that points me to |
9567c58 Merge pull request #189 from blackivory86/uri_formats 1066f7f Merge pull request #192 from furstenheim/master 0b71ddd Update README.md 82db537 Merge pull request #191 from korzio/master 1aecb7b feat(const): Add validation tests for arrays b9d4dbd set unique descriptions for test-cases aaa3ef7 adds more valid and invalid URI testcases 728066f Merge pull request #188 from json-schema-org/sequences-and-objects c47341a Flesh out some more ignore cases for object validators. f339360 make test descriptions unique and no longer than 60 chars 6820a83 Merge branch 'CroniD-master' aaa32d8 test: update "json-pointer" format to exclude fragments 85a552f added some more tests for json-pointer format b7b79fc extended tests for json-pointer format git-subtree-dir: json git-subtree-split: 9567c588bc9d1705b4840ee9d9f3f268f40c1e68
I need to parse a
jsonschema.exceptions.ValidationError
object to help produce a more useful error message to my customers, but I am not sure that the fields of theValidationError
object are correct.Test case: https://gist.github.com/jason-s/6d2b3418f4edb7fc8064
Raw object (in yaml format, but jsonschema is representation-agnostic -- thank you, it means I can use it for yaml files):
The validator correctly find that
44hoho
is not a legal property name; it doesn't matchpatternProperties
and in my schema I haveadditionalProperties
=false
.The problem is that the error object's
relative_schema_path
andschema
seem inconsistent.My test case prints:
Note that the
schema
attribute is a sub-portion of the schema object, but the relative schema path is from the root schema.The text was updated successfully, but these errors were encountered: