{"action":"closed","issue":{"url":"https://api.github.com/repos/epoberezkin/ajv/issues/26","labels_url":"https://api.github.com/repos/epoberezkin/ajv/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/epoberezkin/ajv/issues/26/comments","events_url":"https://api.github.com/repos/epoberezkin/ajv/issues/26/events","html_url":"https://github.com/epoberezkin/ajv/issues/26","id":98449952,"number":26,"title":"With removeAdditional schemas can't be validated against schema different from draft 4 meta-schema","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},"labels":[{"url":"https://api.github.com/repos/epoberezkin/ajv/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-31T18:50:40Z","updated_at":"2015-08-08T09:56:30Z","closed_at":"2015-08-08T09:56:30Z","body":"When schema is added, before it is compiled, it is validated against schema in `$schema` property (unless `validateSchema` option is false). If $schema property is not present draft 4 meta-schema is used.\r\n\r\nIf validator instance has `removeAdditional` option this schema validation may cause changing the schema (for draft 4 meta-schema it is prevented - it is compiled without this option even if this option is present).\r\n\r\nThe solution is to add `removeAdditional` option to `validate` method rather than to validator instance."}}