{"action":"created","issue":{"url":"https://api.github.com/repos/thephpleague/json-guard/issues/41","repository_url":"https://api.github.com/repos/thephpleague/json-guard","labels_url":"https://api.github.com/repos/thephpleague/json-guard/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/thephpleague/json-guard/issues/41/comments","events_url":"https://api.github.com/repos/thephpleague/json-guard/issues/41/events","html_url":"https://github.com/thephpleague/json-guard/pull/41","id":172139135,"number":41,"title":"Improve dereferencing resolution scopes","user":{"login":"yuloh","id":9440455,"avatar_url":"https://avatars.githubusercontent.com/u/9440455?v=3","gravatar_id":"","url":"https://api.github.com/users/yuloh","html_url":"https://github.com/yuloh","followers_url":"https://api.github.com/users/yuloh/followers","following_url":"https://api.github.com/users/yuloh/following{/other_user}","gists_url":"https://api.github.com/users/yuloh/gists{/gist_id}","starred_url":"https://api.github.com/users/yuloh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuloh/subscriptions","organizations_url":"https://api.github.com/users/yuloh/orgs","repos_url":"https://api.github.com/users/yuloh/repos","events_url":"https://api.github.com/users/yuloh/events{/privacy}","received_events_url":"https://api.github.com/users/yuloh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/thephpleague/json-guard/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-19T14:06:56Z","updated_at":"2016-08-22T16:03:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/thephpleague/json-guard/pulls/41","html_url":"https://github.com/thephpleague/json-guard/pull/41","diff_url":"https://github.com/thephpleague/json-guard/pull/41.diff","patch_url":"https://github.com/thephpleague/json-guard/pull/41.patch"},"body":"This PR improves dereferencing when the schema does not have an ID, or when a nested ID is an absolute URI.\r\n\r\nThese are the parts of the spec this addresses:\r\n\r\n> The initial resolution scope of a schema is the URI of the schema itself, if any, or the empty URI if the schema was not loaded from a URI.\r\n\r\n> The \"id\" keyword (or \"id\", for short) is used to alter the resolution scope. When an id is encountered, an implementation MUST resolve this id against the most immediate parent scope. The resolved URI will be the new resolution scope for this subschema and all its children, until another id is encountered.\r\n\r\nAnd this part of the example:\r\n```json\r\n{\r\n    \"id\": \"http://x.y.z/rootschema.json#\",\r\n    \"schema1\": {\r\n        \"id\": \"#foo\"\r\n    },\r\n    \"schema2\": {\r\n        \"id\": \"otherschema.json\",\r\n        \"nested\": {\r\n            \"id\": \"#bar\"\r\n        },\r\n        \"alsonested\": {\r\n            \"id\": \"t/inner.json#a\"\r\n        }\r\n    },\r\n    \"schema3\": {\r\n        \"id\": \"some://where.else/completely#\"\r\n    }\r\n}\r\n```\r\n\r\n```\r\n#/schema3 should resolve to:\r\nsome://where.else/completely#\r\n```\r\n\r\nThere aren't any tests in the official test suite for either of these scenarios, so we need to add some.\r\n\r\nReferences:\r\n\r\nhttps://spacetelescope.github.io/understanding-json-schema/structuring.html#the-id-property\r\nhttp://json-schema.org/latest/json-schema-core.html#anchor26"},"comment":{"url":"https://api.github.com/repos/thephpleague/json-guard/issues/comments/241461844","html_url":"https://github.com/thephpleague/json-guard/pull/41#issuecomment-241461844","issue_url":"https://api.github.com/repos/thephpleague/json-guard/issues/41","id":241461844,"user":{"login":"yuloh","id":9440455,"avatar_url":"https://avatars.githubusercontent.com/u/9440455?v=3","gravatar_id":"","url":"https://api.github.com/users/yuloh","html_url":"https://github.com/yuloh","followers_url":"https://api.github.com/users/yuloh/followers","following_url":"https://api.github.com/users/yuloh/following{/other_user}","gists_url":"https://api.github.com/users/yuloh/gists{/gist_id}","starred_url":"https://api.github.com/users/yuloh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuloh/subscriptions","organizations_url":"https://api.github.com/users/yuloh/orgs","repos_url":"https://api.github.com/users/yuloh/repos","events_url":"https://api.github.com/users/yuloh/events{/privacy}","received_events_url":"https://api.github.com/users/yuloh/received_events","type":"User","site_admin":false},"created_at":"2016-08-22T16:03:18Z","updated_at":"2016-08-22T16:03:18Z","body":"Added a test to the official test suite for [changed scope with absolute references](https://github.com/json-schema-org/JSON-Schema-Test-Suite/pull/122)."}}
{"actor":{"display_login":"yuloh"}}