Path: blob/main/contrib/libucl/tests/schema/items.json
39604 views
[1{2"description": "a schema given for items",3"schema": {4"items": {"type": "integer"}5},6"tests": [7{8"description": "valid items",9"data": [ 1, 2, 3 ],10"valid": true11},12{13"description": "wrong type of items",14"data": [1, "x"],15"valid": false16},17{18"description": "ignores non-arrays",19"data": {"foo" : "bar"},20"valid": true21}22]23},24{25"description": "an array of schemas for items",26"schema": {27"items": [28{"type": "integer"},29{"type": "string"}30]31},32"tests": [33{34"description": "correct types",35"data": [ 1, "foo" ],36"valid": true37},38{39"description": "wrong types",40"data": [ "foo", 1 ],41"valid": false42}43]44}45]464748