{"action":"created","issue":{"url":"https://api.github.com/repos/Julian/jsonschema/issues/191","labels_url":"https://api.github.com/repos/Julian/jsonschema/issues/191/labels{/name}","comments_url":"https://api.github.com/repos/Julian/jsonschema/issues/191/comments","events_url":"https://api.github.com/repos/Julian/jsonschema/issues/191/events","html_url":"https://github.com/Julian/jsonschema/issues/191","id":53544025,"number":191,"title":"error object properties \"schema\" and \"relative_schema_path\" seem to be inconsistent","user":{"login":"jason-s","id":738893,"avatar_url":"https://avatars.githubusercontent.com/u/738893?v=3","gravatar_id":"","url":"https://api.github.com/users/jason-s","html_url":"https://github.com/jason-s","followers_url":"https://api.github.com/users/jason-s/followers","following_url":"https://api.github.com/users/jason-s/following{/other_user}","gists_url":"https://api.github.com/users/jason-s/gists{/gist_id}","starred_url":"https://api.github.com/users/jason-s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jason-s/subscriptions","organizations_url":"https://api.github.com/users/jason-s/orgs","repos_url":"https://api.github.com/users/jason-s/repos","events_url":"https://api.github.com/users/jason-s/events{/privacy}","received_events_url":"https://api.github.com/users/jason-s/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Julian/jsonschema/labels/Bug","name":"Bug","color":"e10c02"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-06T18:08:48Z","updated_at":"2015-01-21T19:28:58Z","closed_at":null,"body":"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 the `ValidationError` object are correct.\r\n\r\nTest case: https://gist.github.com/jason-s/6d2b3418f4edb7fc8064\r\n\r\nRaw object (in yaml format, but jsonschema is representation-agnostic -- thank you, it means I can use it for yaml files):\r\n\r\n```\r\ndebug:\r\n  foo:\r\n    bar:\r\n      jiminy: cricket\r\n      mickey: mouse\r\n      44hoho: twinkie\r\n```\r\n\r\nThe validator correctly find that `44hoho` is not a legal property name; it doesn't match `patternProperties` and in my schema I have `additionalProperties` = `false`.\r\n\r\nThe problem is that the error object's `relative_schema_path` and `schema` seem inconsistent.\r\n\r\nMy test case prints:\r\n\r\n```\r\nparent         : None\r\nrelative_path  : deque(['debug', 'foo', 'bar'])\r\nrelative_schema_path: deque(['properties', 'debug', 'properties', 'foo', 'properties', 'bar', 'additionalProperties'])\r\ninstance       : {'jiminy': 'cricket', 'mickey': 'mouse', '44hoho': 'twinkie'}\r\nschema_path    : deque(['properties', 'debug', 'properties', 'foo', 'properties', 'bar', 'additionalProperties'])\r\nvalidator      : additionalProperties\r\ncontext        : []\r\npath           : deque(['debug', 'foo', 'bar'])\r\nmessage        : Additional properties are not allowed ('44hoho' was unexpected)\r\nschema         : {'additionalProperties': False, 'type': 'object', 'patternProperties': {'^[^\\\\d\\\\W]\\\\w*$': {'type': 'string'}}}\r\ncause          : None\r\nvalidator_value: False\r\n```\r\n\r\nNote that the `schema` attribute is a sub-portion of the schema object, but the relative schema path is from the root schema."},"comment":{"url":"https://api.github.com/repos/Julian/jsonschema/issues/comments/70904517","html_url":"https://github.com/Julian/jsonschema/issues/191#issuecomment-70904517","issue_url":"https://api.github.com/repos/Julian/jsonschema/issues/191","id":70904517,"user":{"login":"jason-s","id":738893,"avatar_url":"https://avatars.githubusercontent.com/u/738893?v=3","gravatar_id":"","url":"https://api.github.com/users/jason-s","html_url":"https://github.com/jason-s","followers_url":"https://api.github.com/users/jason-s/followers","following_url":"https://api.github.com/users/jason-s/following{/other_user}","gists_url":"https://api.github.com/users/jason-s/gists{/gist_id}","starred_url":"https://api.github.com/users/jason-s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jason-s/subscriptions","organizations_url":"https://api.github.com/users/jason-s/orgs","repos_url":"https://api.github.com/users/jason-s/repos","events_url":"https://api.github.com/users/jason-s/events{/privacy}","received_events_url":"https://api.github.com/users/jason-s/received_events","type":"User","site_admin":false},"created_at":"2015-01-21T19:28:58Z","updated_at":"2015-01-21T19:28:58Z","body":">Any chance you might have hunted down where the problem is?\r\n\r\nnope, sorry."}}