Here, we rewrite jsonpath so that for type="required" errors it ends in the missing field's name. I think that (regardless of having solved the hash problem) this should be matched by rewriting instance for required errors in the same way. Otherwise, we will end up with output like:
# check({"resources": [{"title": "Title"}]}, error=True)
At package.resources[0].name:
|
| name: {'title': 'Title'}
| ^^^^^^^^^^^^^^^^^^
'name' is a required property
It would be nice if this could happen here and not in _create_issue, but I don't know off the top of my head if that would be problematic for any logic that relies on instance on SchemaErrors.
Originally posted by @martonvago in #208 (comment)
Interesting, do you think this is something that can be solved in a separate PR? It's not immediately clear how to differentiate the two errors I get from running your example:
The first one seems correct whereas the second one has the issue you highlighted.
Originally posted by @joelostblom in #208 (comment)
Originally posted by @martonvago in #208 (comment)
Originally posted by @joelostblom in #208 (comment)