[
	{
		"description": "a schema given for prefixItems",
		"schema": {
			"$schema": "https://json-schema.org/draft/2020-12/schema",
			"prefixItems": [
				{
					"type": "integer"
				},
				{
					"type": "string"
				}
			]
		},
		"tests": [
			{
				"description": "correct types",
				"data": [
					1,
					"foo"
				],
				"valid": true
			},
			{
				"description": "wrong types",
				"data": [
					"foo",
					1
				],
				"valid": false
			},
			{
				"description": "incomplete array of items",
				"data": [
					1
				],
				"valid": true,
				"skip": {
					"v3": "6 errors in empty disjunction:\nconflicting values [1] and bool (mismatched types list and bool):\n    generated.cue:3:1\n    generated.cue:3:8\n    instance.json:1:1\nconflicting values [1] and null (mismatched types list and null):\n    generated.cue:3:1\n    instance.json:1:1\nconflicting values [1] and number (mismatched types list and number):\n    generated.cue:3:1\n    generated.cue:3:15\n    instance.json:1:1\nconflicting values [1] and string (mismatched types list and string):\n    generated.cue:3:1\n    generated.cue:3:24\n    instance.json:1:1\nconflicting values [1] and {...} (mismatched types list and struct):\n    generated.cue:3:1\n    generated.cue:3:54\n    instance.json:1:1\nincompatible list lengths (1 and 2):\n    generated.cue:3:33\n",
					"v3-roundtrip": "conflicting values bool and [1] (mismatched types bool and list):\n    instance.json:1:1\nconflicting values null and [1] (mismatched types null and list):\n    instance.json:1:1\nconflicting values number and [1] (mismatched types number and list):\n    instance.json:1:1\nconflicting values string and [1] (mismatched types string and list):\n    instance.json:1:1\nconflicting values {...} and [1] (mismatched types struct and list):\n    instance.json:1:1\nincompatible list lengths (1 and 2)\ninvalid value [1] (does not satisfy matchN): 0 matched, expected \u003e=1:\n    instance.json:1:1\n"
				}
			},
			{
				"description": "array with additional items",
				"data": [
					1,
					"foo",
					true
				],
				"valid": true
			},
			{
				"description": "empty array",
				"data": [],
				"valid": true,
				"skip": {
					"v3": "6 errors in empty disjunction:\nconflicting values [] and bool (mismatched types list and bool):\n    generated.cue:3:1\n    generated.cue:3:8\n    instance.json:1:1\nconflicting values [] and null (mismatched types list and null):\n    generated.cue:3:1\n    instance.json:1:1\nconflicting values [] and number (mismatched types list and number):\n    generated.cue:3:1\n    generated.cue:3:15\n    instance.json:1:1\nconflicting values [] and string (mismatched types list and string):\n    generated.cue:3:1\n    generated.cue:3:24\n    instance.json:1:1\nconflicting values [] and {...} (mismatched types list and struct):\n    generated.cue:3:1\n    generated.cue:3:54\n    instance.json:1:1\nincompatible list lengths (0 and 2):\n    generated.cue:3:33\n",
					"v3-roundtrip": "conflicting values bool and [] (mismatched types bool and list):\n    instance.json:1:1\nconflicting values null and [] (mismatched types null and list):\n    instance.json:1:1\nconflicting values number and [] (mismatched types number and list):\n    instance.json:1:1\nconflicting values string and [] (mismatched types string and list):\n    instance.json:1:1\nconflicting values {...} and [] (mismatched types struct and list):\n    instance.json:1:1\nincompatible list lengths (0 and 2)\ninvalid value [] (does not satisfy matchN): 0 matched, expected \u003e=1:\n    instance.json:1:1\n"
				}
			},
			{
				"description": "JavaScript pseudo-array is valid",
				"data": {
					"0": "invalid",
					"1": "valid",
					"length": 2
				},
				"valid": true
			}
		]
	},
	{
		"description": "prefixItems with boolean schemas",
		"schema": {
			"$schema": "https://json-schema.org/draft/2020-12/schema",
			"prefixItems": [
				true,
				false
			]
		},
		"tests": [
			{
				"description": "array with one item is valid",
				"data": [
					1
				],
				"valid": true,
				"skip": {
					"v3": "7 errors in empty disjunction:\nconflicting values [1] and bool (mismatched types list and bool):\n    generated.cue:3:1\n    generated.cue:3:8\n    instance.json:1:1\nconflicting values [1] and null (mismatched types list and null):\n    generated.cue:3:1\n    instance.json:1:1\nconflicting values [1] and number (mismatched types list and number):\n    generated.cue:3:1\n    generated.cue:3:15\n    instance.json:1:1\nconflicting values [1] and string (mismatched types list and string):\n    generated.cue:3:1\n    generated.cue:3:24\n    instance.json:1:1\nconflicting values [1] and {...} (mismatched types list and struct):\n    generated.cue:3:1\n    generated.cue:3:65\n    instance.json:1:1\nincompatible list lengths (1 and 2):\n    generated.cue:3:33\n1: disallowed:\n    generated.cue:3:37\n"
				}
			},
			{
				"description": "array with two items is invalid",
				"data": [
					1,
					"foo"
				],
				"valid": false,
				"skip": {
					"v3-roundtrip": "unexpected success"
				}
			},
			{
				"description": "empty array is valid",
				"data": [],
				"valid": true,
				"skip": {
					"v3": "7 errors in empty disjunction:\nconflicting values [] and bool (mismatched types list and bool):\n    generated.cue:3:1\n    generated.cue:3:8\n    instance.json:1:1\nconflicting values [] and null (mismatched types list and null):\n    generated.cue:3:1\n    instance.json:1:1\nconflicting values [] and number (mismatched types list and number):\n    generated.cue:3:1\n    generated.cue:3:15\n    instance.json:1:1\nconflicting values [] and string (mismatched types list and string):\n    generated.cue:3:1\n    generated.cue:3:24\n    instance.json:1:1\nconflicting values [] and {...} (mismatched types list and struct):\n    generated.cue:3:1\n    generated.cue:3:65\n    instance.json:1:1\nincompatible list lengths (0 and 2):\n    generated.cue:3:33\n1: disallowed:\n    generated.cue:3:37\n"
				}
			}
		]
	},
	{
		"description": "additional items are allowed by default",
		"schema": {
			"$schema": "https://json-schema.org/draft/2020-12/schema",
			"prefixItems": [
				{
					"type": "integer"
				}
			]
		},
		"tests": [
			{
				"description": "only the first item is validated",
				"data": [
					1,
					"foo",
					false
				],
				"valid": true
			}
		]
	},
	{
		"description": "prefixItems with null instance elements",
		"schema": {
			"$schema": "https://json-schema.org/draft/2020-12/schema",
			"prefixItems": [
				{
					"type": "null"
				}
			]
		},
		"tests": [
			{
				"description": "allows null elements",
				"data": [
					null
				],
				"valid": true
			}
		]
	}
]
