[
	{
		"description": "integer type matches integers",
		"schema": {
			"type": "integer"
		},
		"skip": {
			"v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
		},
		"tests": [
			{
				"description": "an integer is an integer",
				"data": 1,
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a float with zero fractional part is an integer",
				"data": 1.0,
				"valid": true,
				"skip": {
					"v3": "conflicting values 1.0 and int (mismatched types float and int):\n    generated.cue:2:1\n    instance.json:1:1\n",
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a float is not an integer",
				"data": 1.1,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a string is not an integer",
				"data": "foo",
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a string is still not an integer, even if it looks like one",
				"data": "1",
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "an object is not an integer",
				"data": {},
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "an array is not an integer",
				"data": [],
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a boolean is not an integer",
				"data": true,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "null is not an integer",
				"data": null,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "number type matches numbers",
		"schema": {
			"type": "number"
		},
		"skip": {
			"v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
		},
		"tests": [
			{
				"description": "an integer is a number",
				"data": 1,
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a float with zero fractional part is a number (and an integer)",
				"data": 1.0,
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a float is a number",
				"data": 1.1,
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a string is not a number",
				"data": "foo",
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a string is still not a number, even if it looks like one",
				"data": "1",
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "an object is not a number",
				"data": {},
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "an array is not a number",
				"data": [],
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a boolean is not a number",
				"data": true,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "null is not a number",
				"data": null,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "string type matches strings",
		"schema": {
			"type": "string"
		},
		"skip": {
			"v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
		},
		"tests": [
			{
				"description": "1 is not a string",
				"data": 1,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a float is not a string",
				"data": 1.1,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a string is a string",
				"data": "foo",
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a string is still a string, even if it looks like a number",
				"data": "1",
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "an empty string is still a string",
				"data": "",
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "an object is not a string",
				"data": {},
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "an array is not a string",
				"data": [],
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a boolean is not a string",
				"data": true,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "null is not a string",
				"data": null,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "object type matches objects",
		"schema": {
			"type": "object"
		},
		"skip": {
			"v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
		},
		"tests": [
			{
				"description": "an integer is not an object",
				"data": 1,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a float is not an object",
				"data": 1.1,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a string is not an object",
				"data": "foo",
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "an object is an object",
				"data": {},
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "an array is not an object",
				"data": [],
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a boolean is not an object",
				"data": true,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "null is not an object",
				"data": null,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "array type matches arrays",
		"schema": {
			"type": "array"
		},
		"skip": {
			"v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
		},
		"tests": [
			{
				"description": "an integer is not an array",
				"data": 1,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a float is not an array",
				"data": 1.1,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a string is not an array",
				"data": "foo",
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "an object is not an array",
				"data": {},
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "an array is an array",
				"data": [],
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a boolean is not an array",
				"data": true,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "null is not an array",
				"data": null,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "boolean type matches booleans",
		"schema": {
			"type": "boolean"
		},
		"skip": {
			"v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
		},
		"tests": [
			{
				"description": "an integer is not a boolean",
				"data": 1,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "zero is not a boolean",
				"data": 0,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a float is not a boolean",
				"data": 1.1,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a string is not a boolean",
				"data": "foo",
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "an empty string is not a boolean",
				"data": "",
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "an object is not a boolean",
				"data": {},
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "an array is not a boolean",
				"data": [],
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "true is a boolean",
				"data": true,
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "false is a boolean",
				"data": false,
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "null is not a boolean",
				"data": null,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "null type matches only the null object",
		"schema": {
			"type": "null"
		},
		"skip": {
			"v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
		},
		"tests": [
			{
				"description": "an integer is not null",
				"data": 1,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a float is not null",
				"data": 1.1,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "zero is not null",
				"data": 0,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a string is not null",
				"data": "foo",
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "an empty string is not null",
				"data": "",
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "an object is not null",
				"data": {},
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "an array is not null",
				"data": [],
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "true is not null",
				"data": true,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "false is not null",
				"data": false,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "null is null",
				"data": null,
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "multiple types can be specified in an array",
		"schema": {
			"type": [
				"integer",
				"string"
			]
		},
		"skip": {
			"v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
		},
		"tests": [
			{
				"description": "an integer is valid",
				"data": 1,
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a string is valid",
				"data": "foo",
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a float is invalid",
				"data": 1.1,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "an object is invalid",
				"data": {},
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "an array is invalid",
				"data": [],
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "a boolean is invalid",
				"data": true,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "null is invalid",
				"data": null,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "type as array with one item",
		"schema": {
			"type": [
				"string"
			]
		},
		"skip": {
			"v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
		},
		"tests": [
			{
				"description": "string is valid",
				"data": "foo",
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "number is invalid",
				"data": 123,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "type: array or object",
		"schema": {
			"type": [
				"array",
				"object"
			]
		},
		"skip": {
			"v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
		},
		"tests": [
			{
				"description": "array is valid",
				"data": [
					1,
					2,
					3
				],
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "object is valid",
				"data": {
					"foo": 123
				},
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "number is invalid",
				"data": 123,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "string is invalid",
				"data": "foo",
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "null is invalid",
				"data": null,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "type: array, object or null",
		"schema": {
			"type": [
				"array",
				"object",
				"null"
			]
		},
		"skip": {
			"v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
		},
		"tests": [
			{
				"description": "array is valid",
				"data": [
					1,
					2,
					3
				],
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "object is valid",
				"data": {
					"foo": 123
				},
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "null is valid",
				"data": null,
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "number is invalid",
				"data": 123,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "string is invalid",
				"data": "foo",
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	}
]
