{"action":"created","issue":{"url":"https://api.github.com/repos/lbovet/docson/issues/29","labels_url":"https://api.github.com/repos/lbovet/docson/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/lbovet/docson/issues/29/comments","events_url":"https://api.github.com/repos/lbovet/docson/issues/29/events","html_url":"https://github.com/lbovet/docson/issues/29","id":96986485,"number":29,"title":"$ref issues","user":{"login":"McFoggy","id":1119660,"avatar_url":"https://avatars.githubusercontent.com/u/1119660?v=3","gravatar_id":"","url":"https://api.github.com/users/McFoggy","html_url":"https://github.com/McFoggy","followers_url":"https://api.github.com/users/McFoggy/followers","following_url":"https://api.github.com/users/McFoggy/following{/other_user}","gists_url":"https://api.github.com/users/McFoggy/gists{/gist_id}","starred_url":"https://api.github.com/users/McFoggy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/McFoggy/subscriptions","organizations_url":"https://api.github.com/users/McFoggy/orgs","repos_url":"https://api.github.com/users/McFoggy/repos","events_url":"https://api.github.com/users/McFoggy/events{/privacy}","received_events_url":"https://api.github.com/users/McFoggy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-07-24T07:23:27Z","updated_at":"2015-09-03T11:25:20Z","closed_at":null,"body":"Hi,\r\n\r\nI am integrating docson with [RAML](http://raml.org/) (both [api-console](http://raml.org/projects.html#tools-api-console) & [api-designer](http://raml.org/projects.html#tools-api-designer)).\r\n\r\nI am facing issues while rendering simple json-schemas that are only a reference to an externally defined one (ie their own json files).\r\nI have built a simple demo app that shows my problems : https://github.com/McFoggy/docson-reference-demo.\r\n\r\n![image](https://cloud.githubusercontent.com/assets/1119660/8869532/12dc8d30-31e5-11e5-9703-fe3d4897e7a6.png)\r\n\r\n## Problems\r\n\r\n1. schemas loaded using '$ref' at the root do not load correctly: click on any `ref` link and `Load from schema`\r\n\r\n2. when ID is defined on a schema, the context is lost when loading a sub schema: click on latest `refWithId` and `Load from schema`. The referenced `address.json` is in 404 because loaded from a bad URL\r\n\r\nI would really appreciate some feedback in order to either establish that either I am doing something totally wrong or that I am facing a bug."},"comment":{"url":"https://api.github.com/repos/lbovet/docson/issues/comments/137411856","html_url":"https://github.com/lbovet/docson/issues/29#issuecomment-137411856","issue_url":"https://api.github.com/repos/lbovet/docson/issues/29","id":137411856,"user":{"login":"cneijenhuis","id":2638512,"avatar_url":"https://avatars.githubusercontent.com/u/2638512?v=3","gravatar_id":"","url":"https://api.github.com/users/cneijenhuis","html_url":"https://github.com/cneijenhuis","followers_url":"https://api.github.com/users/cneijenhuis/followers","following_url":"https://api.github.com/users/cneijenhuis/following{/other_user}","gists_url":"https://api.github.com/users/cneijenhuis/gists{/gist_id}","starred_url":"https://api.github.com/users/cneijenhuis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cneijenhuis/subscriptions","organizations_url":"https://api.github.com/users/cneijenhuis/orgs","repos_url":"https://api.github.com/users/cneijenhuis/repos","events_url":"https://api.github.com/users/cneijenhuis/events{/privacy}","received_events_url":"https://api.github.com/users/cneijenhuis/received_events","type":"User","site_admin":false},"created_at":"2015-09-03T11:25:20Z","updated_at":"2015-09-03T11:25:20Z","body":"@rom1504 The References are defined in another draft, there it says:\r\n\r\n> Any members other than \"$ref\" in a JSON Reference object SHALL be ignored.\r\n> - http://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03#section-3\r\n\r\nSo, yeah, it's not an invalid Reference-object but `$schema` would be ignored... Therefore it doesn't make a difference whether you add `$schema` or not.\r\n\r\n@McFoggy You are right. I understood this sentence wrong: ```This keyword MUST be located at the root of a JSON Schema.``` I understood it as in \"You must include the keyword at the root\". But it probably means \"If you include the keyword, it must be located at the root\"."}}