cuelang.org/go@v0.13.0/encoding/jsonschema/testdata/external/tests/draft7/optional/content.json (about)

     1  [
     2  	{
     3  		"description": "validation of string-encoded content based on media type",
     4  		"schema": {
     5  			"contentMediaType": "application/json"
     6  		},
     7  		"tests": [
     8  			{
     9  				"description": "a valid JSON document",
    10  				"data": "{\"foo\": \"bar\"}",
    11  				"valid": true
    12  			},
    13  			{
    14  				"description": "an invalid JSON document",
    15  				"data": "{:}",
    16  				"valid": false,
    17  				"skip": {
    18  					"v2": "unexpected success",
    19  					"v3": "unexpected success"
    20  				}
    21  			},
    22  			{
    23  				"description": "ignores non-strings",
    24  				"data": 100,
    25  				"valid": true
    26  			}
    27  		]
    28  	},
    29  	{
    30  		"description": "validation of binary string-encoding",
    31  		"schema": {
    32  			"contentEncoding": "base64"
    33  		},
    34  		"tests": [
    35  			{
    36  				"description": "a valid base64 string",
    37  				"data": "eyJmb28iOiAiYmFyIn0K",
    38  				"valid": true
    39  			},
    40  			{
    41  				"description": "an invalid base64 string (% is not a valid character)",
    42  				"data": "eyJmb28iOi%iYmFyIn0K",
    43  				"valid": false,
    44  				"skip": {
    45  					"v2": "unexpected success",
    46  					"v3": "unexpected success"
    47  				}
    48  			},
    49  			{
    50  				"description": "ignores non-strings",
    51  				"data": 100,
    52  				"valid": true
    53  			}
    54  		]
    55  	},
    56  	{
    57  		"description": "validation of binary-encoded media type documents",
    58  		"schema": {
    59  			"contentMediaType": "application/json",
    60  			"contentEncoding": "base64"
    61  		},
    62  		"tests": [
    63  			{
    64  				"description": "a valid base64-encoded JSON document",
    65  				"data": "eyJmb28iOiAiYmFyIn0K",
    66  				"valid": true
    67  			},
    68  			{
    69  				"description": "a validly-encoded invalid JSON document",
    70  				"data": "ezp9Cg==",
    71  				"valid": false,
    72  				"skip": {
    73  					"v2": "unexpected success",
    74  					"v3": "unexpected success"
    75  				}
    76  			},
    77  			{
    78  				"description": "an invalid base64 string that is valid JSON",
    79  				"data": "{}",
    80  				"valid": false,
    81  				"skip": {
    82  					"v2": "unexpected success",
    83  					"v3": "unexpected success"
    84  				}
    85  			},
    86  			{
    87  				"description": "ignores non-strings",
    88  				"data": 100,
    89  				"valid": true
    90  			}
    91  		]
    92  	}
    93  ]