cuelang.org/go@v0.13.0/encoding/jsonschema/testdata/external/tests/draft2020-12/optional/format-assertion.json (about)

     1  [
     2  	{
     3  		"description": "schema that uses custom metaschema with format-assertion: false",
     4  		"schema": {
     5  			"$id": "https://schema/using/format-assertion/false",
     6  			"$schema": "http://localhost:1234/draft2020-12/format-assertion-false.json",
     7  			"format": "ipv4"
     8  		},
     9  		"skip": {
    10  			"v2": "extract error: invalid $schema URL \"http://localhost:1234/draft2020-12/format-assertion-false.json\": $schema URI not recognized (and 1 more errors)",
    11  			"v3": "extract error: invalid $schema URL \"http://localhost:1234/draft2020-12/format-assertion-false.json\": $schema URI not recognized (and 1 more errors)"
    12  		},
    13  		"tests": [
    14  			{
    15  				"description": "format-assertion: false: valid string",
    16  				"data": "127.0.0.1",
    17  				"valid": true,
    18  				"skip": {
    19  					"v2": "could not compile schema",
    20  					"v3": "could not compile schema"
    21  				}
    22  			},
    23  			{
    24  				"description": "format-assertion: false: invalid string",
    25  				"data": "not-an-ipv4",
    26  				"valid": false,
    27  				"skip": {
    28  					"v2": "could not compile schema",
    29  					"v3": "could not compile schema"
    30  				}
    31  			}
    32  		]
    33  	},
    34  	{
    35  		"description": "schema that uses custom metaschema with format-assertion: true",
    36  		"schema": {
    37  			"$id": "https://schema/using/format-assertion/true",
    38  			"$schema": "http://localhost:1234/draft2020-12/format-assertion-true.json",
    39  			"format": "ipv4"
    40  		},
    41  		"skip": {
    42  			"v2": "extract error: invalid $schema URL \"http://localhost:1234/draft2020-12/format-assertion-true.json\": $schema URI not recognized (and 1 more errors)",
    43  			"v3": "extract error: invalid $schema URL \"http://localhost:1234/draft2020-12/format-assertion-true.json\": $schema URI not recognized (and 1 more errors)"
    44  		},
    45  		"tests": [
    46  			{
    47  				"description": "format-assertion: true: valid string",
    48  				"data": "127.0.0.1",
    49  				"valid": true,
    50  				"skip": {
    51  					"v2": "could not compile schema",
    52  					"v3": "could not compile schema"
    53  				}
    54  			},
    55  			{
    56  				"description": "format-assertion: true: invalid string",
    57  				"data": "not-an-ipv4",
    58  				"valid": false,
    59  				"skip": {
    60  					"v2": "could not compile schema",
    61  					"v3": "could not compile schema"
    62  				}
    63  			}
    64  		]
    65  	}
    66  ]