60 lines
1.0 KiB
JSON
60 lines
1.0 KiB
JSON
[
|
|
{
|
|
"description": "maxItems validation",
|
|
"schema": {
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"maxItems": 2
|
|
},
|
|
"tests": [
|
|
{
|
|
"description": "shorter is valid",
|
|
"data": [
|
|
1
|
|
],
|
|
"valid": true
|
|
},
|
|
{
|
|
"description": "exact length is valid",
|
|
"data": [
|
|
1,
|
|
2
|
|
],
|
|
"valid": true
|
|
},
|
|
{
|
|
"description": "too long is invalid",
|
|
"data": [
|
|
1,
|
|
2,
|
|
3
|
|
],
|
|
"valid": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "maxItems validation with a decimal",
|
|
"schema": {
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"maxItems": 2.0
|
|
},
|
|
"tests": [
|
|
{
|
|
"description": "shorter is valid",
|
|
"data": [
|
|
1
|
|
],
|
|
"valid": true
|
|
},
|
|
{
|
|
"description": "too long is invalid",
|
|
"data": [
|
|
1,
|
|
2,
|
|
3
|
|
],
|
|
"valid": false
|
|
}
|
|
]
|
|
}
|
|
] |