[
	{
		"description": "additionalItems as schema",
		"schema": {
			"items": [
				{}
			],
			"additionalItems": {
				"type": "integer"
			}
		},
		"tests": [
			{
				"description": "additional items match schema",
				"data": [
					null,
					2,
					3,
					4
				],
				"valid": true
			},
			{
				"description": "additional items do not match schema",
				"data": [
					null,
					2,
					3,
					"foo"
				],
				"valid": false
			}
		]
	},
	{
		"description": "when items is schema, additionalItems does nothing",
		"schema": {
			"items": {
				"type": "integer"
			},
			"additionalItems": {
				"type": "string"
			}
		},
		"tests": [
			{
				"description": "valid with a array of type integers",
				"data": [
					1,
					2,
					3
				],
				"valid": true
			},
			{
				"description": "invalid with a array of mixed types",
				"data": [
					1,
					"2",
					"3"
				],
				"valid": false
			}
		]
	},
	{
		"description": "when items is schema, boolean additionalItems does nothing",
		"schema": {
			"items": {},
			"additionalItems": false
		},
		"tests": [
			{
				"description": "all items match schema",
				"data": [
					1,
					2,
					3,
					4,
					5
				],
				"valid": true
			}
		]
	},
	{
		"description": "array of items with no additionalItems permitted",
		"schema": {
			"items": [
				{},
				{},
				{}
			],
			"additionalItems": false
		},
		"tests": [
			{
				"description": "empty array",
				"data": [],
				"valid": true,
				"skip": {
					"v2": "5 errors in empty disjunction:\nconflicting values [] and {...} (mismatched types list and struct):\n    generated.cue:2:1\n    generated.cue:2:45\n    instance.json:1:1\nconflicting values bool and [] (mismatched types bool and list):\n    generated.cue:2:8\n    instance.json:1:1\nconflicting values null and [] (mismatched types null and list):\n    generated.cue:2:1\n    instance.json:1:1\nconflicting values number and [] (mismatched types number and list):\n    generated.cue:2:15\n    instance.json:1:1\nconflicting values string and [] (mismatched types string and list):\n    generated.cue:2:24\n    instance.json:1:1\n",
					"v3": "6 errors in empty disjunction:\nconflicting values [] and bool (mismatched types list and bool):\n    generated.cue:2:8\n    instance.json:1:1\nconflicting values [] and null (mismatched types list and null):\n    generated.cue:2:1\n    instance.json:1:1\nconflicting values [] and number (mismatched types list and number):\n    generated.cue:2:15\n    instance.json:1:1\nconflicting values [] and string (mismatched types list and string):\n    generated.cue:2:24\n    instance.json:1:1\nconflicting values [] and {...} (mismatched types list and struct):\n    generated.cue:2:45\n    instance.json:1:1\nincompatible list lengths (0 and 3):\n    generated.cue:2:33\n"
				}
			},
			{
				"description": "fewer number of items present (1)",
				"data": [
					1
				],
				"valid": true,
				"skip": {
					"v2": "5 errors in empty disjunction:\nconflicting values [1] and {...} (mismatched types list and struct):\n    generated.cue:2:1\n    generated.cue:2:45\n    instance.json:1:1\nconflicting values bool and [1] (mismatched types bool and list):\n    generated.cue:2:8\n    instance.json:1:1\nconflicting values null and [1] (mismatched types null and list):\n    generated.cue:2:1\n    instance.json:1:1\nconflicting values number and [1] (mismatched types number and list):\n    generated.cue:2:15\n    instance.json:1:1\nconflicting values string and [1] (mismatched types string and list):\n    generated.cue:2:24\n    instance.json:1:1\n",
					"v3": "6 errors in empty disjunction:\nconflicting values [1] and bool (mismatched types list and bool):\n    generated.cue:2:8\n    instance.json:1:1\nconflicting values [1] and null (mismatched types list and null):\n    generated.cue:2:1\n    instance.json:1:1\nconflicting values [1] and number (mismatched types list and number):\n    generated.cue:2:15\n    instance.json:1:1\nconflicting values [1] and string (mismatched types list and string):\n    generated.cue:2:24\n    instance.json:1:1\nconflicting values [1] and {...} (mismatched types list and struct):\n    generated.cue:2:45\n    instance.json:1:1\nincompatible list lengths (1 and 3):\n    generated.cue:2:33\n"
				}
			},
			{
				"description": "fewer number of items present (2)",
				"data": [
					1,
					2
				],
				"valid": true,
				"skip": {
					"v2": "5 errors in empty disjunction:\nconflicting values [1,2] and {...} (mismatched types list and struct):\n    generated.cue:2:1\n    generated.cue:2:45\n    instance.json:1:1\nconflicting values bool and [1,2] (mismatched types bool and list):\n    generated.cue:2:8\n    instance.json:1:1\nconflicting values null and [1,2] (mismatched types null and list):\n    generated.cue:2:1\n    instance.json:1:1\nconflicting values number and [1,2] (mismatched types number and list):\n    generated.cue:2:15\n    instance.json:1:1\nconflicting values string and [1,2] (mismatched types string and list):\n    generated.cue:2:24\n    instance.json:1:1\n",
					"v3": "6 errors in empty disjunction:\nconflicting values [1,2] and bool (mismatched types list and bool):\n    generated.cue:2:8\n    instance.json:1:1\nconflicting values [1,2] and null (mismatched types list and null):\n    generated.cue:2:1\n    instance.json:1:1\nconflicting values [1,2] and number (mismatched types list and number):\n    generated.cue:2:15\n    instance.json:1:1\nconflicting values [1,2] and string (mismatched types list and string):\n    generated.cue:2:24\n    instance.json:1:1\nconflicting values [1,2] and {...} (mismatched types list and struct):\n    generated.cue:2:45\n    instance.json:1:1\nincompatible list lengths (2 and 3):\n    generated.cue:2:33\n"
				}
			},
			{
				"description": "equal number of items present",
				"data": [
					1,
					2,
					3
				],
				"valid": true
			},
			{
				"description": "additional items are not permitted",
				"data": [
					1,
					2,
					3,
					4
				],
				"valid": false
			}
		]
	},
	{
		"description": "additionalItems as false without items",
		"schema": {
			"additionalItems": false
		},
		"tests": [
			{
				"description": "items defaults to empty schema so everything is valid",
				"data": [
					1,
					2,
					3,
					4,
					5
				],
				"valid": true
			},
			{
				"description": "ignores non-arrays",
				"data": {
					"foo": "bar"
				},
				"valid": true
			}
		]
	},
	{
		"description": "additionalItems are allowed by default",
		"schema": {
			"items": [
				{
					"type": "integer"
				}
			]
		},
		"tests": [
			{
				"description": "only the first item is validated",
				"data": [
					1,
					"foo",
					false
				],
				"valid": true
			}
		]
	},
	{
		"description": "additionalItems does not look in applicators, valid case",
		"schema": {
			"allOf": [
				{
					"items": [
						{
							"type": "integer"
						}
					]
				}
			],
			"additionalItems": {
				"type": "boolean"
			}
		},
		"tests": [
			{
				"description": "items defined in allOf are not examined",
				"data": [
					1,
					null
				],
				"valid": true
			}
		]
	},
	{
		"description": "additionalItems does not look in applicators, invalid case",
		"schema": {
			"allOf": [
				{
					"items": [
						{
							"type": "integer"
						},
						{
							"type": "string"
						}
					]
				}
			],
			"items": [
				{
					"type": "integer"
				}
			],
			"additionalItems": {
				"type": "boolean"
			}
		},
		"tests": [
			{
				"description": "items defined in allOf are not examined",
				"data": [
					1,
					"hello"
				],
				"valid": false
			}
		]
	},
	{
		"description": "items validation adjusts the starting index for additionalItems",
		"schema": {
			"items": [
				{
					"type": "string"
				}
			],
			"additionalItems": {
				"type": "integer"
			}
		},
		"tests": [
			{
				"description": "valid items",
				"data": [
					"x",
					2,
					3
				],
				"valid": true
			},
			{
				"description": "wrong type of second item",
				"data": [
					"x",
					"y"
				],
				"valid": false
			}
		]
	},
	{
		"description": "additionalItems with heterogeneous array",
		"schema": {
			"items": [
				{}
			],
			"additionalItems": false
		},
		"tests": [
			{
				"description": "heterogeneous invalid instance",
				"data": [
					"foo",
					"bar",
					37
				],
				"valid": false
			},
			{
				"description": "valid instance",
				"data": [
					null
				],
				"valid": true
			}
		]
	},
	{
		"description": "additionalItems with null instance elements",
		"schema": {
			"additionalItems": {
				"type": "null"
			}
		},
		"tests": [
			{
				"description": "allows null elements",
				"data": [
					null
				],
				"valid": true
			}
		]
	}
]
