{"action":"created","issue":{"url":"https://api.github.com/repos/epoberezkin/ajv/issues/47","labels_url":"https://api.github.com/repos/epoberezkin/ajv/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/epoberezkin/ajv/issues/47/comments","events_url":"https://api.github.com/repos/epoberezkin/ajv/issues/47/events","html_url":"https://github.com/epoberezkin/ajv/issues/47","id":106398716,"number":47,"title":"Resolve reference passed to validate method","user":{"login":"redben","id":200361,"avatar_url":"https://avatars.githubusercontent.com/u/200361?v=3","gravatar_id":"","url":"https://api.github.com/users/redben","html_url":"https://github.com/redben","followers_url":"https://api.github.com/users/redben/followers","following_url":"https://api.github.com/users/redben/following{/other_user}","gists_url":"https://api.github.com/users/redben/gists{/gist_id}","starred_url":"https://api.github.com/users/redben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redben/subscriptions","organizations_url":"https://api.github.com/users/redben/orgs","repos_url":"https://api.github.com/users/redben/repos","events_url":"https://api.github.com/users/redben/events{/privacy}","received_events_url":"https://api.github.com/users/redben/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/epoberezkin/ajv/labels/feature","name":"feature","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-09-14T18:16:49Z","updated_at":"2015-09-15T07:32:15Z","closed_at":null,"body":"Is is possible for validate function to resolve ids inside schemas ?\r\nexample :\r\n\r\n```javascript\r\nvar ajv = require('ajv')();\r\n\r\najv.addSchema({\r\n    id: 'my-schema',\r\n    type: 'object',\r\n    definitions: {\r\n        foo: {\r\n            id: 'foo',\r\n            type: 'object',\r\n            required: ['bar']\r\n        }\r\n    }\r\n}, 'my-schema');\r\n\r\n\r\najv.validate(\r\n    'my-schema#/definitions/foo', {\r\n        bar: true\r\n    });\r\n\r\n// throws Error: no schema with key or ref \"my-schema#/definitions/foo\"\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/epoberezkin/ajv/issues/comments/140305148","html_url":"https://github.com/epoberezkin/ajv/issues/47#issuecomment-140305148","issue_url":"https://api.github.com/repos/epoberezkin/ajv/issues/47","id":140305148,"user":{"login":"epoberezkin","id":2769109,"avatar_url":"https://avatars.githubusercontent.com/u/2769109?v=3","gravatar_id":"","url":"https://api.github.com/users/epoberezkin","html_url":"https://github.com/epoberezkin","followers_url":"https://api.github.com/users/epoberezkin/followers","following_url":"https://api.github.com/users/epoberezkin/following{/other_user}","gists_url":"https://api.github.com/users/epoberezkin/gists{/gist_id}","starred_url":"https://api.github.com/users/epoberezkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/epoberezkin/subscriptions","organizations_url":"https://api.github.com/users/epoberezkin/orgs","repos_url":"https://api.github.com/users/epoberezkin/repos","events_url":"https://api.github.com/users/epoberezkin/events{/privacy}","received_events_url":"https://api.github.com/users/epoberezkin/received_events","type":"User","site_admin":false},"created_at":"2015-09-15T07:32:15Z","updated_at":"2015-09-15T07:32:15Z","body":"Thank you :) yes _getSchema, but you need to use resolve function... At the moment it is too tightly coupled to compile, but that's the one."}}