1
+ [
2
+ {
3
+ "description" : " additionalItems as schema" ,
4
+ "schema" : {
5
+ "additionalItems" : {"type" : " integer" }
6
+ },
7
+ "tests" : [
8
+ {
9
+ "description" : " all items match schema" ,
10
+ "data" : [ 1 , 2 , 3 , 4 , 5 ],
11
+ "valid" : true
12
+ },
13
+ {
14
+ "description" : " not all items match schema" ,
15
+ "data" : [ 1 , 2 , 3 , 4.4 ],
16
+ "valid" : false
17
+ }
18
+ ]
19
+ },
20
+ {
21
+ "description" : " items is schema, no additionalItems" ,
22
+ "schema" : {
23
+ "items" : {},
24
+ "additionalItems" : false
25
+ },
26
+ "tests" : [
27
+ {
28
+ "description" : " all items match schema" ,
29
+ "data" : [ 1 , 2 , 3 , 4 , 5 ],
30
+ "valid" : true
31
+ }
32
+ ]
33
+ },
34
+ {
35
+ "description" : " array of items with no additionalItems" ,
36
+ "schema" : {
37
+ "items" : [{}, {}, {}],
38
+ "additionalItems" : false
39
+ },
40
+ "tests" : [
41
+ {
42
+ "description" : " no additional items present" ,
43
+ "data" : [ 1 , 2 , 3 ],
44
+ "valid" : true
45
+ },
46
+ {
47
+ "description" : " additional items are not permitted" ,
48
+ "data" : [ 1 , 2 , 3 , 4 ],
49
+ "valid" : false
50
+ }
51
+ ]
52
+ },
53
+ {
54
+ "description" : " additionalItems as false without items" ,
55
+ "schema" : {
56
+ "additionalItems" : false
57
+ },
58
+ "tests" : [
59
+ {
60
+ "description" : " items should allow anything" ,
61
+ "data" : [ 1 , 2 , 3 , 4 , 5 ],
62
+ "valid" : true
63
+ }
64
+ ]
65
+ }
66
+ ]
0 commit comments