[
	{
		"description": "propertyNames validation",
		"schema": {
			"propertyNames": {
				"maxLength": 3
			}
		},
		"skip": {
			"v2": "extract error: cannot compile resulting schema: reference \"strings\" in label expression refers to field against which it would be matched:\n    generated.cue:4:3\n",
			"v3": "extract error: cannot compile resulting schema: reference \"strings\" in label expression refers to field against which it would be matched:\n    generated.cue:4:3\n"
		},
		"tests": [
			{
				"description": "all property names valid",
				"data": {
					"f": {},
					"foo": {}
				},
				"valid": true,
				"skip": {
					"v2": "could not compile schema",
					"v3": "could not compile schema"
				}
			},
			{
				"description": "some property names invalid",
				"data": {
					"foo": {},
					"foobar": {}
				},
				"valid": false,
				"skip": {
					"v2": "could not compile schema",
					"v3": "could not compile schema"
				}
			},
			{
				"description": "object without properties is valid",
				"data": {},
				"valid": true,
				"skip": {
					"v2": "could not compile schema",
					"v3": "could not compile schema"
				}
			},
			{
				"description": "ignores arrays",
				"data": [
					1,
					2,
					3,
					4
				],
				"valid": true,
				"skip": {
					"v2": "could not compile schema",
					"v3": "could not compile schema"
				}
			},
			{
				"description": "ignores strings",
				"data": "foobar",
				"valid": true,
				"skip": {
					"v2": "could not compile schema",
					"v3": "could not compile schema"
				}
			},
			{
				"description": "ignores other non-objects",
				"data": 12,
				"valid": true,
				"skip": {
					"v2": "could not compile schema",
					"v3": "could not compile schema"
				}
			}
		]
	},
	{
		"description": "propertyNames validation with pattern",
		"schema": {
			"propertyNames": {
				"pattern": "^a+$"
			}
		},
		"tests": [
			{
				"description": "matching property names valid",
				"data": {
					"a": {},
					"aa": {},
					"aaa": {}
				},
				"valid": true
			},
			{
				"description": "non-matching property name is invalid",
				"data": {
					"aaA": {}
				},
				"valid": false,
				"skip": {
					"v2": "unexpected success",
					"v3": "unexpected success"
				}
			},
			{
				"description": "object without properties is valid",
				"data": {},
				"valid": true
			}
		]
	},
	{
		"description": "propertyNames with boolean schema true",
		"schema": {
			"propertyNames": true
		},
		"tests": [
			{
				"description": "object with any properties is valid",
				"data": {
					"foo": 1
				},
				"valid": true
			},
			{
				"description": "empty object is valid",
				"data": {},
				"valid": true
			}
		]
	},
	{
		"description": "propertyNames with boolean schema false",
		"schema": {
			"propertyNames": false
		},
		"tests": [
			{
				"description": "object with any properties is invalid",
				"data": {
					"foo": 1
				},
				"valid": false,
				"skip": {
					"v3": "unexpected success"
				}
			},
			{
				"description": "empty object is valid",
				"data": {},
				"valid": true,
				"skip": {
					"v3": "6 errors in empty disjunction:\nconflicting values [...] and {} (mismatched types list and struct):\n    generated.cue:2:33\n    instance.json:1:1\nconflicting values bool and {} (mismatched types bool and struct):\n    generated.cue:2:8\n    instance.json:1:1\nconflicting values null and {} (mismatched types null and struct):\n    generated.cue:2:1\n    instance.json:1:1\nconflicting values number and {} (mismatched types number and struct):\n    generated.cue:2:15\n    instance.json:1:1\nconflicting values string and {} (mismatched types string and struct):\n    generated.cue:2:24\n    instance.json:1:1\nexplicit error (_|_ literal) in source:\n    generated.cue:3:3\n"
				}
			}
		]
	}
]
