items.json revision 263646
154359Sroberto[
254359Sroberto    {
354359Sroberto        "description": "a schema given for items",
454359Sroberto        "schema": {
554359Sroberto            "items": {"type": "integer"}
654359Sroberto        },
754359Sroberto        "tests": [
854359Sroberto            {
954359Sroberto                "description": "valid items",
1054359Sroberto                "data": [ 1, 2, 3 ],
1154359Sroberto                "valid": true
1254359Sroberto            },
1354359Sroberto            {
1454359Sroberto                "description": "wrong type of items",
1554359Sroberto                "data": [1, "x"],
1654359Sroberto                "valid": false
1754359Sroberto            },
1854359Sroberto            {
1954359Sroberto                "description": "ignores non-arrays",
2054359Sroberto                "data": {"foo" : "bar"},
2154359Sroberto                "valid": true
2254359Sroberto            }
2354359Sroberto        ]
2454359Sroberto    },
2554359Sroberto    {
2654359Sroberto        "description": "an array of schemas for items",
2754359Sroberto        "schema": {
2854359Sroberto            "items": [
2954359Sroberto                {"type": "integer"},
3054359Sroberto                {"type": "string"}
3154359Sroberto            ]
3254359Sroberto        },
3354359Sroberto        "tests": [
3454359Sroberto            {
3554359Sroberto                "description": "correct types",
3654359Sroberto                "data": [ 1, "foo" ],
3754359Sroberto                "valid": true
3854359Sroberto            },
3954359Sroberto            {
4054359Sroberto                "description": "wrong types",
4154359Sroberto                "data": [ "foo", 1 ],
4254359Sroberto                "valid": false
4354359Sroberto            }
4454359Sroberto        ]
4554359Sroberto    }
4654359Sroberto]
4754359Sroberto