[
	{
		"description": "const validation",
		"schema": {
			"const": 2
		},
		"skip": {
			"v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
		},
		"tests": [
			{
				"description": "same value is valid",
				"data": 2,
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "another value is invalid",
				"data": 5,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "another type is invalid",
				"data": "a",
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "const with object",
		"schema": {
			"const": {
				"foo": "bar",
				"baz": "bax"
			}
		},
		"skip": {
			"v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
		},
		"tests": [
			{
				"description": "same object is valid",
				"data": {
					"foo": "bar",
					"baz": "bax"
				},
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "same object with different property order is valid",
				"data": {
					"baz": "bax",
					"foo": "bar"
				},
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "another object is invalid",
				"data": {
					"foo": "bar"
				},
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "another type is invalid",
				"data": [
					1,
					2
				],
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "const with array",
		"schema": {
			"const": [
				{
					"foo": "bar"
				}
			]
		},
		"skip": {
			"v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
		},
		"tests": [
			{
				"description": "same array is valid",
				"data": [
					{
						"foo": "bar"
					}
				],
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "another array item is invalid",
				"data": [
					2
				],
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "array with additional items is invalid",
				"data": [
					1,
					2,
					3
				],
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "const with null",
		"schema": {
			"const": null
		},
		"skip": {
			"v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
		},
		"tests": [
			{
				"description": "null is valid",
				"data": null,
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "not null is invalid",
				"data": 0,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "const with false does not match 0",
		"schema": {
			"const": false
		},
		"skip": {
			"v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
		},
		"tests": [
			{
				"description": "false is valid",
				"data": false,
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "integer zero is invalid",
				"data": 0,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "float zero is invalid",
				"data": 0.0,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "const with true does not match 1",
		"schema": {
			"const": true
		},
		"skip": {
			"v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
		},
		"tests": [
			{
				"description": "true is valid",
				"data": true,
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "integer one is invalid",
				"data": 1,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "float one is invalid",
				"data": 1.0,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "const with [false] does not match [0]",
		"schema": {
			"const": [
				false
			]
		},
		"skip": {
			"v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
		},
		"tests": [
			{
				"description": "[false] is valid",
				"data": [
					false
				],
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "[0] is invalid",
				"data": [
					0
				],
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "[0.0] is invalid",
				"data": [
					0.0
				],
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "const with [true] does not match [1]",
		"schema": {
			"const": [
				true
			]
		},
		"skip": {
			"v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
		},
		"tests": [
			{
				"description": "[true] is valid",
				"data": [
					true
				],
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "[1] is invalid",
				"data": [
					1
				],
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "[1.0] is invalid",
				"data": [
					1.0
				],
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "const with {\"a\": false} does not match {\"a\": 0}",
		"schema": {
			"const": {
				"a": false
			}
		},
		"skip": {
			"v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
		},
		"tests": [
			{
				"description": "{\"a\": false} is valid",
				"data": {
					"a": false
				},
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "{\"a\": 0} is invalid",
				"data": {
					"a": 0
				},
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "{\"a\": 0.0} is invalid",
				"data": {
					"a": 0.0
				},
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "const with {\"a\": true} does not match {\"a\": 1}",
		"schema": {
			"const": {
				"a": true
			}
		},
		"skip": {
			"v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
		},
		"tests": [
			{
				"description": "{\"a\": true} is valid",
				"data": {
					"a": true
				},
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "{\"a\": 1} is invalid",
				"data": {
					"a": 1
				},
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "{\"a\": 1.0} is invalid",
				"data": {
					"a": 1.0
				},
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "const with 0 does not match other zero-like types",
		"schema": {
			"const": 0
		},
		"skip": {
			"v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
		},
		"tests": [
			{
				"description": "false is invalid",
				"data": false,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "integer zero is valid",
				"data": 0,
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "float zero is valid",
				"data": 0.0,
				"valid": true,
				"skip": {
					"v3": "conflicting values 0.0 and 0 (mismatched types float and int):\n    generated.cue:2:1\n    instance.json:1:1\n",
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "empty object is invalid",
				"data": {},
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "empty array is invalid",
				"data": [],
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "empty string is invalid",
				"data": "",
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "const with 1 does not match true",
		"schema": {
			"const": 1
		},
		"skip": {
			"v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
		},
		"tests": [
			{
				"description": "true is invalid",
				"data": true,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "integer one is valid",
				"data": 1,
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "float one is valid",
				"data": 1.0,
				"valid": true,
				"skip": {
					"v3": "conflicting values 1.0 and 1 (mismatched types float and int):\n    generated.cue:2:1\n    instance.json:1:1\n",
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "const with -2.0 matches integer and float types",
		"schema": {
			"const": -2.0
		},
		"skip": {
			"v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
		},
		"tests": [
			{
				"description": "integer -2 is valid",
				"data": -2,
				"valid": true,
				"skip": {
					"v3": "conflicting values -2 and -2.0 (mismatched types int and float):\n    generated.cue:2:1\n    instance.json:1:1\n",
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "integer 2 is invalid",
				"data": 2,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "float -2.0 is valid",
				"data": -2.0,
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "float 2.0 is invalid",
				"data": 2.0,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "float -2.00001 is invalid",
				"data": -2.00001,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "float and integers are equal up to 64-bit representation limits",
		"schema": {
			"const": 9007199254740992
		},
		"skip": {
			"v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
		},
		"tests": [
			{
				"description": "integer is valid",
				"data": 9007199254740992,
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "integer minus one is invalid",
				"data": 9007199254740991,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "float is valid",
				"data": 9007199254740992.0,
				"valid": true,
				"skip": {
					"v3": "conflicting values 9007199254740992.0 and 9007199254740992 (mismatched types float and int):\n    generated.cue:2:1\n    instance.json:1:1\n",
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "float minus one is invalid",
				"data": 9007199254740991.0,
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "nul characters in strings",
		"schema": {
			"const": "hello\u0000there"
		},
		"skip": {
			"v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema"
		},
		"tests": [
			{
				"description": "match string with nul",
				"data": "hello\u0000there",
				"valid": true,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "do not match string lacking nul",
				"data": "hellothere",
				"valid": false,
				"skip": {
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	}
]
