{"action":"opened","issue":{"url":"https://api.github.com/repos/epoberezkin/ajv/issues/205","repository_url":"https://api.github.com/repos/epoberezkin/ajv","labels_url":"https://api.github.com/repos/epoberezkin/ajv/issues/205/labels{/name}","comments_url":"https://api.github.com/repos/epoberezkin/ajv/issues/205/comments","events_url":"https://api.github.com/repos/epoberezkin/ajv/issues/205/events","html_url":"https://github.com/epoberezkin/ajv/issues/205","id":158388352,"number":205,"title":"add property to object with additionalProperties: false from switch","user":{"login":"mbroadst","id":312966,"avatar_url":"https://avatars.githubusercontent.com/u/312966?v=3","gravatar_id":"","url":"https://api.github.com/users/mbroadst","html_url":"https://github.com/mbroadst","followers_url":"https://api.github.com/users/mbroadst/followers","following_url":"https://api.github.com/users/mbroadst/following{/other_user}","gists_url":"https://api.github.com/users/mbroadst/gists{/gist_id}","starred_url":"https://api.github.com/users/mbroadst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbroadst/subscriptions","organizations_url":"https://api.github.com/users/mbroadst/orgs","repos_url":"https://api.github.com/users/mbroadst/repos","events_url":"https://api.github.com/users/mbroadst/events{/privacy}","received_events_url":"https://api.github.com/users/mbroadst/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-03T15:06:01Z","updated_at":"2016-06-03T15:06:01Z","closed_at":null,"body":"should this be possible:\r\n```\r\n{\r\n        type: 'object',\r\n        properties: {\r\n          foo: { type: 'array', minItems: 2 },\r\n          bar: { type: 'string' }\r\n        },\r\n        additionalProperties: false,\r\n        required: [ 'foo', 'bar' ],\r\n        switch: [{\r\n          if: { properties: { bar: { constant: 'testing } } },\r\n          then: {\r\n            properties: { baz: { type: 'string' } },\r\n            required: [ 'foo', 'bar', 'baz' ]\r\n          }\r\n        }]\r\n      }\r\n```\r\n\r\nIt seems unclear from the documentation, but shouldn't I technically be able to even set `additionalProperties: true` in the switch's `then`?"}}
{"actor":{"display_login":"mbroadst"}}