{"action":"created","issue":{"url":"https://api.github.com/repos/epoberezkin/ajv/issues/364","repository_url":"https://api.github.com/repos/epoberezkin/ajv","labels_url":"https://api.github.com/repos/epoberezkin/ajv/issues/364/labels{/name}","comments_url":"https://api.github.com/repos/epoberezkin/ajv/issues/364/comments","events_url":"https://api.github.com/repos/epoberezkin/ajv/issues/364/events","html_url":"https://github.com/epoberezkin/ajv/issues/364","id":193958251,"number":364,"title":"Support options.loadScheme in synchronous compile()","user":{"login":"angelowang","id":1528739,"avatar_url":"https://avatars.githubusercontent.com/u/1528739?v=3","gravatar_id":"","url":"https://api.github.com/users/angelowang","html_url":"https://github.com/angelowang","followers_url":"https://api.github.com/users/angelowang/followers","following_url":"https://api.github.com/users/angelowang/following{/other_user}","gists_url":"https://api.github.com/users/angelowang/gists{/gist_id}","starred_url":"https://api.github.com/users/angelowang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angelowang/subscriptions","organizations_url":"https://api.github.com/users/angelowang/orgs","repos_url":"https://api.github.com/users/angelowang/repos","events_url":"https://api.github.com/users/angelowang/events{/privacy}","received_events_url":"https://api.github.com/users/angelowang/received_events","type":"User","site_admin":false},"labels":[{"id":429731802,"url":"https://api.github.com/repos/epoberezkin/ajv/labels/question","name":"question","color":"d4c5f9","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-07T04:56:36Z","updated_at":"2016-12-21T12:21:52Z","closed_at":null,"body":"**What version of Ajv you are you using?**\r\n4.9.1\r\n\r\n**What problem do you want to solve?**\r\nWe are using Jenkins to monitor a repo which consists of some json schema and some test json. The json schema files contain references which should be using loadSchema for custom loading.\r\nTo use loadSchema, we have to use compileAsync(), but it's asynchronous, so the node process already exits and no results can be collected.\r\n\r\n**What do you think is the correct solution to problem?**\r\nSupport loadSchema in compile().\r\n\r\n**Will you be able to implement it?**\r\nnot capable enough :)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/epoberezkin/ajv/issues/comments/268510123","html_url":"https://github.com/epoberezkin/ajv/issues/364#issuecomment-268510123","issue_url":"https://api.github.com/repos/epoberezkin/ajv/issues/364","id":268510123,"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":"2016-12-21T12:21:52Z","updated_at":"2016-12-21T12:21:52Z","body":"> These schema files are in various folders, and it's not clear which should be added in which order.\r\n\r\nYes, order in which you pass schemas to addSchema is not important. You can load them all in array/object and then pass via options property `schemas` when you create ajv instance. And then they will compiled when you call getSchema.\r\n\r\n> An alternative is having a simple way to make my main process wait until the compileAsync() finishes, something like Promise.\r\n\r\nYes, also possible."}}
{"actor":{"display_login":"epoberezkin"}}