diff --git a/spec/core/types/arrays.json b/spec/core/types/arrays.json new file mode 100644 index 0000000000000000000000000000000000000000..f624945ea7e5449db05d867c11dcd7086f0eb434 --- /dev/null +++ b/spec/core/types/arrays.json @@ -0,0 +1,65 @@ +[ + { + "description": "generated array values", + "schemas": [ + { + "allOf": [ + { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": ["value"] + } + }, + { + "$ref": "some://rules" + } + ] + } + ], + "tests": [ + { + "description": "should handle maxItems", + "schema": "schemas.0", + "refs": [ + { + "id": "some://rules", + "maxItems": 3 + } + ], + "valid": true + }, + { + "description": "should handle minItems", + "schema": "schemas.0", + "refs": [ + { + "id": "some://rules", + "maxItems": 3, + "minItems": 2 + } + ], + "valid": true + }, + { + "description": "should handle uniqueItems", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": ["a", "b", "c", "d", "e"] + }, + "uniqueItems": true, + "maxItems": 3, + "minItems": 2 + }, + "valid": true + } + ] + } +]