[
	{
		"description": "remote ref",
		"schema": {
			"$schema": "https://json-schema.org/draft/2020-12/schema",
			"$ref": "http://localhost:1234/draft2020-12/integer.json"
		},
		"skip": {
			"v3": "extract error: cannot compile resulting schema: invalid import path: \"localhost:1234/draft2020-12/integer.json:integer\":\n    generated.cue:1:8\n",
			"v3-roundtrip": "inital extract failed"
		},
		"tests": [
			{
				"description": "remote ref valid",
				"data": 1,
				"valid": true,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "remote ref invalid",
				"data": "a",
				"valid": false,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "fragment within remote ref",
		"schema": {
			"$schema": "https://json-schema.org/draft/2020-12/schema",
			"$ref": "http://localhost:1234/draft2020-12/subSchemas.json#/$defs/integer"
		},
		"skip": {
			"v3": "extract error: cannot compile resulting schema: invalid import path: \"localhost:1234/draft2020-12/subSchemas.json:subSchemas\":\n    generated.cue:1:8\n",
			"v3-roundtrip": "inital extract failed"
		},
		"tests": [
			{
				"description": "remote fragment valid",
				"data": 1,
				"valid": true,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "remote fragment invalid",
				"data": "a",
				"valid": false,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "anchor within remote ref",
		"schema": {
			"$schema": "https://json-schema.org/draft/2020-12/schema",
			"$ref": "http://localhost:1234/draft2020-12/locationIndependentIdentifier.json#foo"
		},
		"skip": {
			"v3": "extract error: cannot determine CUE location for JSON Schema location id=http://localhost:1234/draft2020-12/locationIndependentIdentifier.json#foo: anchors (foo) not supported",
			"v3-roundtrip": "inital extract failed"
		},
		"tests": [
			{
				"description": "remote anchor valid",
				"data": 1,
				"valid": true,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "remote anchor invalid",
				"data": "a",
				"valid": false,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "ref within remote ref",
		"schema": {
			"$schema": "https://json-schema.org/draft/2020-12/schema",
			"$ref": "http://localhost:1234/draft2020-12/subSchemas.json#/$defs/refToInteger"
		},
		"skip": {
			"v3": "extract error: cannot compile resulting schema: invalid import path: \"localhost:1234/draft2020-12/subSchemas.json:subSchemas\":\n    generated.cue:1:8\n",
			"v3-roundtrip": "inital extract failed"
		},
		"tests": [
			{
				"description": "ref within ref valid",
				"data": 1,
				"valid": true,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "ref within ref invalid",
				"data": "a",
				"valid": false,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "base URI change",
		"schema": {
			"$schema": "https://json-schema.org/draft/2020-12/schema",
			"$id": "http://localhost:1234/draft2020-12/",
			"items": {
				"$id": "baseUriChange/",
				"items": {
					"$ref": "folderInteger.json"
				}
			}
		},
		"skip": {
			"v3": "extract error: cannot compile resulting schema: invalid import path: \"localhost:1234/draft2020-12/baseUriChange/folderInteger.json:folderInteger\":\n    generated.cue:1:8\n",
			"v3-roundtrip": "inital extract failed"
		},
		"tests": [
			{
				"description": "base URI change ref valid",
				"data": [
					[
						1
					]
				],
				"valid": true,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "base URI change ref invalid",
				"data": [
					[
						"a"
					]
				],
				"valid": false,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "base URI change - change folder",
		"schema": {
			"$schema": "https://json-schema.org/draft/2020-12/schema",
			"$id": "http://localhost:1234/draft2020-12/scope_change_defs1.json",
			"type": "object",
			"properties": {
				"list": {
					"$ref": "baseUriChangeFolder/"
				}
			},
			"$defs": {
				"baz": {
					"$id": "baseUriChangeFolder/",
					"type": "array",
					"items": {
						"$ref": "folderInteger.json"
					}
				}
			}
		},
		"skip": {
			"v3": "extract error: cannot determine package name from import path \"localhost:1234/draft2020-12/baseUriChangeFolder/\"",
			"v3-roundtrip": "inital extract failed"
		},
		"tests": [
			{
				"description": "number is valid",
				"data": {
					"list": [
						1
					]
				},
				"valid": true,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "string is invalid",
				"data": {
					"list": [
						"a"
					]
				},
				"valid": false,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "base URI change - change folder in subschema",
		"schema": {
			"$schema": "https://json-schema.org/draft/2020-12/schema",
			"$id": "http://localhost:1234/draft2020-12/scope_change_defs2.json",
			"type": "object",
			"properties": {
				"list": {
					"$ref": "baseUriChangeFolderInSubschema/#/$defs/bar"
				}
			},
			"$defs": {
				"baz": {
					"$id": "baseUriChangeFolderInSubschema/",
					"$defs": {
						"bar": {
							"type": "array",
							"items": {
								"$ref": "folderInteger.json"
							}
						}
					}
				}
			}
		},
		"skip": {
			"v3": "extract error: cannot determine package name from import path \"localhost:1234/draft2020-12/baseUriChangeFolderInSubschema/\"",
			"v3-roundtrip": "inital extract failed"
		},
		"tests": [
			{
				"description": "number is valid",
				"data": {
					"list": [
						1
					]
				},
				"valid": true,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "string is invalid",
				"data": {
					"list": [
						"a"
					]
				},
				"valid": false,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "root ref in remote ref",
		"schema": {
			"$schema": "https://json-schema.org/draft/2020-12/schema",
			"$id": "http://localhost:1234/draft2020-12/object",
			"type": "object",
			"properties": {
				"name": {
					"$ref": "name-defs.json#/$defs/orNull"
				}
			}
		},
		"skip": {
			"v3": "extract error: cannot compile resulting schema: invalid import path: \"localhost:1234/draft2020-12/name-defs.json:schema\":\n    generated.cue:1:8\n",
			"v3-roundtrip": "inital extract failed"
		},
		"tests": [
			{
				"description": "string is valid",
				"data": {
					"name": "foo"
				},
				"valid": true,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "null is valid",
				"data": {
					"name": null
				},
				"valid": true,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "object is invalid",
				"data": {
					"name": {
						"name": null
					}
				},
				"valid": false,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "remote ref with ref to defs",
		"schema": {
			"$schema": "https://json-schema.org/draft/2020-12/schema",
			"$id": "http://localhost:1234/draft2020-12/schema-remote-ref-ref-defs1.json",
			"$ref": "ref-and-defs.json"
		},
		"skip": {
			"v3": "extract error: cannot compile resulting schema: invalid import path: \"localhost:1234/draft2020-12/ref-and-defs.json:schema\":\n    generated.cue:1:8\n",
			"v3-roundtrip": "inital extract failed"
		},
		"tests": [
			{
				"description": "invalid",
				"data": {
					"bar": 1
				},
				"valid": false,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "valid",
				"data": {
					"bar": "a"
				},
				"valid": true,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "Location-independent identifier in remote ref",
		"schema": {
			"$schema": "https://json-schema.org/draft/2020-12/schema",
			"$ref": "http://localhost:1234/draft2020-12/locationIndependentIdentifier.json#/$defs/refToInteger"
		},
		"skip": {
			"v3": "extract error: cannot compile resulting schema: invalid import path: \"localhost:1234/draft2020-12/locationIndependentIdentifier.json:locationIndependentIdentifier\":\n    generated.cue:1:8\n",
			"v3-roundtrip": "inital extract failed"
		},
		"tests": [
			{
				"description": "integer is valid",
				"data": 1,
				"valid": true,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "string is invalid",
				"data": "foo",
				"valid": false,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "retrieved nested refs resolve relative to their URI not $id",
		"schema": {
			"$schema": "https://json-schema.org/draft/2020-12/schema",
			"$id": "http://localhost:1234/draft2020-12/some-id",
			"properties": {
				"name": {
					"$ref": "nested/foo-ref-string.json"
				}
			}
		},
		"skip": {
			"v3": "extract error: cannot compile resulting schema: invalid import path: \"localhost:1234/draft2020-12/nested/foo-ref-string.json:schema\":\n    generated.cue:1:8\n",
			"v3-roundtrip": "inital extract failed"
		},
		"tests": [
			{
				"description": "number is invalid",
				"data": {
					"name": {
						"foo": 1
					}
				},
				"valid": false,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "string is valid",
				"data": {
					"name": {
						"foo": "a"
					}
				},
				"valid": true,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "remote HTTP ref with different $id",
		"schema": {
			"$schema": "https://json-schema.org/draft/2020-12/schema",
			"$ref": "http://localhost:1234/different-id-ref-string.json"
		},
		"skip": {
			"v3": "extract error: cannot compile resulting schema: invalid import path: \"localhost:1234/different-id-ref-string.json:schema\":\n    generated.cue:1:8\n",
			"v3-roundtrip": "inital extract failed"
		},
		"tests": [
			{
				"description": "number is invalid",
				"data": 1,
				"valid": false,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "string is valid",
				"data": "foo",
				"valid": true,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "remote HTTP ref with different URN $id",
		"schema": {
			"$schema": "https://json-schema.org/draft/2020-12/schema",
			"$ref": "http://localhost:1234/urn-ref-string.json"
		},
		"skip": {
			"v3": "extract error: cannot compile resulting schema: invalid import path: \"localhost:1234/urn-ref-string.json:schema\":\n    generated.cue:1:8\n",
			"v3-roundtrip": "inital extract failed"
		},
		"tests": [
			{
				"description": "number is invalid",
				"data": 1,
				"valid": false,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "string is valid",
				"data": "foo",
				"valid": true,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "remote HTTP ref with nested absolute ref",
		"schema": {
			"$schema": "https://json-schema.org/draft/2020-12/schema",
			"$ref": "http://localhost:1234/nested-absolute-ref-to-string.json"
		},
		"skip": {
			"v3": "extract error: cannot compile resulting schema: invalid import path: \"localhost:1234/nested-absolute-ref-to-string.json:schema\":\n    generated.cue:1:8\n",
			"v3-roundtrip": "inital extract failed"
		},
		"tests": [
			{
				"description": "number is invalid",
				"data": 1,
				"valid": false,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "string is valid",
				"data": "foo",
				"valid": true,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	},
	{
		"description": "$ref to $ref finds detached $anchor",
		"schema": {
			"$schema": "https://json-schema.org/draft/2020-12/schema",
			"$ref": "http://localhost:1234/draft2020-12/detached-ref.json#/$defs/foo"
		},
		"skip": {
			"v3": "extract error: cannot compile resulting schema: invalid import path: \"localhost:1234/draft2020-12/detached-ref.json:schema\":\n    generated.cue:1:8\n",
			"v3-roundtrip": "inital extract failed"
		},
		"tests": [
			{
				"description": "number is valid",
				"data": 1,
				"valid": true,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			},
			{
				"description": "non-number is invalid",
				"data": "a",
				"valid": false,
				"skip": {
					"v3": "could not extract schema",
					"v3-roundtrip": "could not extract schema"
				}
			}
		]
	}
]
