{"action":"created","issue":{"url":"https://api.github.com/repos/vlucas/frisby/issues/100","labels_url":"https://api.github.com/repos/vlucas/frisby/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/vlucas/frisby/issues/100/comments","events_url":"https://api.github.com/repos/vlucas/frisby/issues/100/events","html_url":"https://github.com/vlucas/frisby/issues/100","id":34172279,"number":100,"title":"JSON Schema validation with external sub-schema","user":{"login":"bergeroy","id":4060956,"avatar_url":"https://avatars.githubusercontent.com/u/4060956?v=3","gravatar_id":"","url":"https://api.github.com/users/bergeroy","html_url":"https://github.com/bergeroy","followers_url":"https://api.github.com/users/bergeroy/followers","following_url":"https://api.github.com/users/bergeroy/following{/other_user}","gists_url":"https://api.github.com/users/bergeroy/gists{/gist_id}","starred_url":"https://api.github.com/users/bergeroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bergeroy/subscriptions","organizations_url":"https://api.github.com/users/bergeroy/orgs","repos_url":"https://api.github.com/users/bergeroy/repos","events_url":"https://api.github.com/users/bergeroy/events{/privacy}","received_events_url":"https://api.github.com/users/bergeroy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-05-23T12:57:42Z","updated_at":"2015-03-12T11:34:04Z","closed_at":null,"body":"Hi,\r\n\r\nI’m using Frisby to test my REST API.  Frisby is using jsonschema to validate the JSONs returned by a URL.\r\n\r\nThe JSON schema I use to validate my JSON is referencing an external schema via $ref.  In that situation, it seems that the jsonschema validation is always failing with a message similar to:\r\n\r\n    SchemaError: no such schema http://api-portal.anypoint.mulesoft.com/telus/api/kinexchangeapi/schema_domaine.json\r\n\r\nIt seems that to make jsonschema working correctly, we must use addSchema or addSubSchema for every external schema.  Frisby retrieve the file for the main schema but does not retrieve every subschema with a recursive loop and add them to the schema validator.\r\n\r\nThis is the schema I use for validation in Frisby :\r\n\r\n    {\r\n      \"type\":\"object\",\r\n      \"$schema\": \"http://json-schema.org/draft-03/schema\",\r\n      \"title\": \"Liste de domaines\",\r\n      \"required\":false,\r\n      \"properties\": {\r\n        \"domaines\": {\r\n          \"type\":\"array\",\r\n          \"required\":true,\r\n          \"items\": {\r\n            \"$ref\": \"http://api-portal.anypoint.mulesoft.com/telus/api/kinexchangeapi/schema_domaine.json\"\r\n          }\r\n        }\r\n      }\r\n    }\r\n\r\nThank you for your help.\r\n"},"comment":{"url":"https://api.github.com/repos/vlucas/frisby/issues/comments/78463984","html_url":"https://github.com/vlucas/frisby/issues/100#issuecomment-78463984","issue_url":"https://api.github.com/repos/vlucas/frisby/issues/100","id":78463984,"user":{"login":"bergeroy","id":4060956,"avatar_url":"https://avatars.githubusercontent.com/u/4060956?v=3","gravatar_id":"","url":"https://api.github.com/users/bergeroy","html_url":"https://github.com/bergeroy","followers_url":"https://api.github.com/users/bergeroy/followers","following_url":"https://api.github.com/users/bergeroy/following{/other_user}","gists_url":"https://api.github.com/users/bergeroy/gists{/gist_id}","starred_url":"https://api.github.com/users/bergeroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bergeroy/subscriptions","organizations_url":"https://api.github.com/users/bergeroy/orgs","repos_url":"https://api.github.com/users/bergeroy/repos","events_url":"https://api.github.com/users/bergeroy/events{/privacy}","received_events_url":"https://api.github.com/users/bergeroy/received_events","type":"User","site_admin":false},"created_at":"2015-03-12T11:34:04Z","updated_at":"2015-03-12T11:34:04Z","body":"+1\r\nI've been waiting for that feature to be added to Frisby.  Currently, there is no way to validate JSON if the schemas contain external references.\r\n\r\nThanks"}}