{"action":"closed","issue":{"url":"https://api.github.com/repos/Knetic/presilo/issues/27","labels_url":"https://api.github.com/repos/Knetic/presilo/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/Knetic/presilo/issues/27/comments","events_url":"https://api.github.com/repos/Knetic/presilo/issues/27/events","html_url":"https://github.com/Knetic/presilo/issues/27","id":128478624,"number":27,"title":"Lazy-link schemas","user":{"login":"Knetic","id":5728164,"avatar_url":"https://avatars.githubusercontent.com/u/5728164?v=3","gravatar_id":"","url":"https://api.github.com/users/Knetic","html_url":"https://github.com/Knetic","followers_url":"https://api.github.com/users/Knetic/followers","following_url":"https://api.github.com/users/Knetic/following{/other_user}","gists_url":"https://api.github.com/users/Knetic/gists{/gist_id}","starred_url":"https://api.github.com/users/Knetic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Knetic/subscriptions","organizations_url":"https://api.github.com/users/Knetic/orgs","repos_url":"https://api.github.com/users/Knetic/repos","events_url":"https://api.github.com/users/Knetic/events{/privacy}","received_events_url":"https://api.github.com/users/Knetic/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Knetic/presilo/labels/feature","name":"feature","color":"5319e7"}],"state":"closed","locked":false,"assignee":{"login":"Knetic","id":5728164,"avatar_url":"https://avatars.githubusercontent.com/u/5728164?v=3","gravatar_id":"","url":"https://api.github.com/users/Knetic","html_url":"https://github.com/Knetic","followers_url":"https://api.github.com/users/Knetic/followers","following_url":"https://api.github.com/users/Knetic/following{/other_user}","gists_url":"https://api.github.com/users/Knetic/gists{/gist_id}","starred_url":"https://api.github.com/users/Knetic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Knetic/subscriptions","organizations_url":"https://api.github.com/users/Knetic/orgs","repos_url":"https://api.github.com/users/Knetic/repos","events_url":"https://api.github.com/users/Knetic/events{/privacy}","received_events_url":"https://api.github.com/users/Knetic/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Knetic/presilo/milestones/2","html_url":"https://github.com/Knetic/presilo/milestones/Linking%20and%20remote%20resources","labels_url":"https://api.github.com/repos/Knetic/presilo/milestones/2/labels","id":1540682,"number":2,"title":"Linking and remote resources","description":"All the methods of parsing which don't involve a fully-baked schema that sits in a single file.","creator":{"login":"Knetic","id":5728164,"avatar_url":"https://avatars.githubusercontent.com/u/5728164?v=3","gravatar_id":"","url":"https://api.github.com/users/Knetic","html_url":"https://github.com/Knetic","followers_url":"https://api.github.com/users/Knetic/followers","following_url":"https://api.github.com/users/Knetic/following{/other_user}","gists_url":"https://api.github.com/users/Knetic/gists{/gist_id}","starred_url":"https://api.github.com/users/Knetic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Knetic/subscriptions","organizations_url":"https://api.github.com/users/Knetic/orgs","repos_url":"https://api.github.com/users/Knetic/repos","events_url":"https://api.github.com/users/Knetic/events{/privacy}","received_events_url":"https://api.github.com/users/Knetic/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":2,"state":"open","created_at":"2016-01-25T07:29:34Z","updated_at":"2016-01-26T06:08:21Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-01-25T07:28:00Z","updated_at":"2016-01-26T06:08:21Z","closed_at":"2016-01-26T06:08:21Z","body":"Some schemas may contain references to schemas which have not been parsed yet. This is more common in Google Discovery API cases, where there is no specific root schema, but rather a flat list of schemas. Currently, if a schema cannot be found during parse, an error is returned and parsing is aborted. \r\n\r\nInstead, during parsing, whenever an unresolved schema reference is made, it should be set to a `TypeSchema`-compliant type which can identify itself as an unresolved reference schema, with the reference string given as the ID (`TypeSchema` will need a new method `IsResolved()bool`).\r\n\r\nSince references (resolved or not) are always leaves in the parsed schema tree(s), after parsing all the provided schema data the parser will need to run through the entire tree to resolve any outstanding unresolved references. If the references cannot be found at this point, errors are warranted.\r\n\r\nNote that this changes how the general parsing logic works, and requires the changes in 8ccb19ae54ba400a921c7749413f07e84c18a2be to change the contracts to be as follows:\r\n\r\n- `ParseSchemaStream` and `ParseSchemaFile` must return a completely-resolved TypeSchema (or an error indicating that it wasn't).\r\n- `ParseSchemaStreamContinue` must _not_ guarantee schema resolution, and a new method will need to be called to finalize the unresolved links."}}