1268896Sbapt[ 2268896Sbapt { 3268896Sbapt "description": "allOf", 4268896Sbapt "schema": { 5268896Sbapt "allOf": [ 6268896Sbapt { 7268896Sbapt "properties": { 8268896Sbapt "bar": {"type": "integer"} 9268896Sbapt }, 10268896Sbapt "required": ["bar"] 11268896Sbapt }, 12268896Sbapt { 13268896Sbapt "properties": { 14268896Sbapt "foo": {"type": "string"} 15268896Sbapt }, 16268896Sbapt "required": ["foo"] 17268896Sbapt } 18268896Sbapt ] 19268896Sbapt }, 20268896Sbapt "tests": [ 21268896Sbapt { 22268896Sbapt "description": "allOf", 23268896Sbapt "data": {"foo": "baz", "bar": 2}, 24268896Sbapt "valid": true 25268896Sbapt }, 26268896Sbapt { 27268896Sbapt "description": "mismatch second", 28268896Sbapt "data": {"foo": "baz"}, 29268896Sbapt "valid": false 30268896Sbapt }, 31268896Sbapt { 32268896Sbapt "description": "mismatch first", 33268896Sbapt "data": {"bar": 2}, 34268896Sbapt "valid": false 35268896Sbapt }, 36268896Sbapt { 37268896Sbapt "description": "wrong type", 38268896Sbapt "data": {"foo": "baz", "bar": "quux"}, 39268896Sbapt "valid": false 40268896Sbapt } 41268896Sbapt ] 42268896Sbapt }, 43268896Sbapt { 44268896Sbapt "description": "allOf with base schema", 45268896Sbapt "schema": { 46268896Sbapt "properties": {"bar": {"type": "integer"}}, 47268896Sbapt "required": ["bar"], 48268896Sbapt "allOf" : [ 49268896Sbapt { 50268896Sbapt "properties": { 51268896Sbapt "foo": {"type": "string"} 52268896Sbapt }, 53268896Sbapt "required": ["foo"] 54268896Sbapt }, 55268896Sbapt { 56268896Sbapt "properties": { 57268896Sbapt "baz": {"type": "null"} 58268896Sbapt }, 59268896Sbapt "required": ["baz"] 60268896Sbapt } 61268896Sbapt ] 62268896Sbapt }, 63268896Sbapt "tests": [ 64268896Sbapt { 65268896Sbapt "description": "valid", 66268896Sbapt "data": {"foo": "quux", "bar": 2, "baz": null}, 67268896Sbapt "valid": true 68268896Sbapt }, 69268896Sbapt { 70268896Sbapt "description": "mismatch base schema", 71268896Sbapt "data": {"foo": "quux", "baz": null}, 72268896Sbapt "valid": false 73268896Sbapt }, 74268896Sbapt { 75268896Sbapt "description": "mismatch first allOf", 76268896Sbapt "data": {"bar": 2, "baz": null}, 77268896Sbapt "valid": false 78268896Sbapt }, 79268896Sbapt { 80268896Sbapt "description": "mismatch second allOf", 81268896Sbapt "data": {"foo": "quux", "bar": 2}, 82268896Sbapt "valid": false 83268896Sbapt }, 84268896Sbapt { 85268896Sbapt "description": "mismatch both", 86268896Sbapt "data": {"bar": 2}, 87268896Sbapt "valid": false 88268896Sbapt } 89268896Sbapt ] 90268896Sbapt }, 91268896Sbapt { 92268896Sbapt "description": "allOf simple types", 93268896Sbapt "schema": { 94268896Sbapt "allOf": [ 95268896Sbapt {"maximum": 30}, 96268896Sbapt {"minimum": 20} 97268896Sbapt ] 98268896Sbapt }, 99268896Sbapt "tests": [ 100268896Sbapt { 101268896Sbapt "description": "valid", 102268896Sbapt "data": 25, 103268896Sbapt "valid": true 104268896Sbapt }, 105268896Sbapt { 106268896Sbapt "description": "mismatch one", 107268896Sbapt "data": 35, 108268896Sbapt "valid": false 109268896Sbapt } 110268896Sbapt ] 111268896Sbapt } 112268896Sbapt] 113