cuelang.org/go@v0.13.0/encoding/jsonschema/testdata/external/tests/draft2019-09/maxItems.json (about)

     1  [
     2  	{
     3  		"description": "maxItems validation",
     4  		"schema": {
     5  			"$schema": "https://json-schema.org/draft/2019-09/schema",
     6  			"maxItems": 2
     7  		},
     8  		"tests": [
     9  			{
    10  				"description": "shorter is valid",
    11  				"data": [
    12  					1
    13  				],
    14  				"valid": true
    15  			},
    16  			{
    17  				"description": "exact length is valid",
    18  				"data": [
    19  					1,
    20  					2
    21  				],
    22  				"valid": true
    23  			},
    24  			{
    25  				"description": "too long is invalid",
    26  				"data": [
    27  					1,
    28  					2,
    29  					3
    30  				],
    31  				"valid": false
    32  			},
    33  			{
    34  				"description": "ignores non-arrays",
    35  				"data": "foobar",
    36  				"valid": true
    37  			}
    38  		]
    39  	},
    40  	{
    41  		"description": "maxItems validation with a decimal",
    42  		"schema": {
    43  			"$schema": "https://json-schema.org/draft/2019-09/schema",
    44  			"maxItems": 2.0
    45  		},
    46  		"tests": [
    47  			{
    48  				"description": "shorter is valid",
    49  				"data": [
    50  					1
    51  				],
    52  				"valid": true
    53  			},
    54  			{
    55  				"description": "too long is invalid",
    56  				"data": [
    57  					1,
    58  					2,
    59  					3
    60  				],
    61  				"valid": false
    62  			}
    63  		]
    64  	}
    65  ]