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

     1  [
     2  	{
     3  		"description": "minimum validation",
     4  		"schema": {
     5  			"$schema": "https://json-schema.org/draft/2020-12/schema",
     6  			"minimum": 1.1
     7  		},
     8  		"tests": [
     9  			{
    10  				"description": "above the minimum is valid",
    11  				"data": 2.6,
    12  				"valid": true
    13  			},
    14  			{
    15  				"description": "boundary point is valid",
    16  				"data": 1.1,
    17  				"valid": true
    18  			},
    19  			{
    20  				"description": "below the minimum is invalid",
    21  				"data": 0.6,
    22  				"valid": false
    23  			},
    24  			{
    25  				"description": "ignores non-numbers",
    26  				"data": "x",
    27  				"valid": true
    28  			}
    29  		]
    30  	},
    31  	{
    32  		"description": "minimum validation with signed integer",
    33  		"schema": {
    34  			"$schema": "https://json-schema.org/draft/2020-12/schema",
    35  			"minimum": -2
    36  		},
    37  		"tests": [
    38  			{
    39  				"description": "negative above the minimum is valid",
    40  				"data": -1,
    41  				"valid": true
    42  			},
    43  			{
    44  				"description": "positive above the minimum is valid",
    45  				"data": 0,
    46  				"valid": true
    47  			},
    48  			{
    49  				"description": "boundary point is valid",
    50  				"data": -2,
    51  				"valid": true
    52  			},
    53  			{
    54  				"description": "boundary point with float is valid",
    55  				"data": -2.0,
    56  				"valid": true
    57  			},
    58  			{
    59  				"description": "float below the minimum is invalid",
    60  				"data": -2.0001,
    61  				"valid": false
    62  			},
    63  			{
    64  				"description": "int below the minimum is invalid",
    65  				"data": -3,
    66  				"valid": false
    67  			},
    68  			{
    69  				"description": "ignores non-numbers",
    70  				"data": "x",
    71  				"valid": true
    72  			}
    73  		]
    74  	}
    75  ]