1268896Sbapt[ 2268896Sbapt { 3268896Sbapt "description": 4268896Sbapt "additionalProperties being false does not allow other properties", 5268896Sbapt "schema": { 6268896Sbapt "properties": {"foo": {}, "bar": {}}, 7268896Sbapt "patternProperties": { "^v": {} }, 8268896Sbapt "additionalProperties": false 9268896Sbapt }, 10268896Sbapt "tests": [ 11268896Sbapt { 12268896Sbapt "description": "no additional properties is valid", 13268896Sbapt "data": {"foo": 1}, 14268896Sbapt "valid": true 15268896Sbapt }, 16268896Sbapt { 17268896Sbapt "description": "an additional property is invalid", 18268896Sbapt "data": {"foo" : 1, "bar" : 2, "quux" : "boom"}, 19268896Sbapt "valid": false 20268896Sbapt }, 21268896Sbapt { 22268896Sbapt "description": "ignores non-objects", 23268896Sbapt "data": [1, 2, 3], 24268896Sbapt "valid": true 25268896Sbapt }, 26268896Sbapt { 27268896Sbapt "description": "patternProperties are not additional properties", 28268896Sbapt "data": {"foo":1, "vroom": 2}, 29268896Sbapt "valid": true 30268896Sbapt } 31268896Sbapt ] 32268896Sbapt }, 33268896Sbapt { 34268896Sbapt "description": 35268896Sbapt "additionalProperties allows a schema which should validate", 36268896Sbapt "schema": { 37268896Sbapt "properties": {"foo": {}, "bar": {}}, 38268896Sbapt "additionalProperties": {"type": "boolean"} 39268896Sbapt }, 40268896Sbapt "tests": [ 41268896Sbapt { 42268896Sbapt "description": "no additional properties is valid", 43268896Sbapt "data": {"foo": 1}, 44268896Sbapt "valid": true 45268896Sbapt }, 46268896Sbapt { 47268896Sbapt "description": "an additional valid property is valid", 48268896Sbapt "data": {"foo" : 1, "bar" : 2, "quux" : true}, 49268896Sbapt "valid": true 50268896Sbapt }, 51268896Sbapt { 52268896Sbapt "description": "an additional invalid property is invalid", 53268896Sbapt "data": {"foo" : 1, "bar" : 2, "quux" : 12}, 54268896Sbapt "valid": false 55268896Sbapt } 56268896Sbapt ] 57268896Sbapt }, 58268896Sbapt { 59268896Sbapt "description": "additionalProperties are allowed by default", 60268896Sbapt "schema": {"properties": {"foo": {}, "bar": {}}}, 61268896Sbapt "tests": [ 62268896Sbapt { 63268896Sbapt "description": "additional properties are allowed", 64268896Sbapt "data": {"foo": 1, "bar": 2, "quux": true}, 65268896Sbapt "valid": true 66268896Sbapt } 67268896Sbapt ] 68268896Sbapt } 69268896Sbapt] 70