json_schemer 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/JSON-Schema-Test-Suite/bin/jsonschema_suite +8 -5
- data/JSON-Schema-Test-Suite/remotes/folder/folderInteger.json +1 -1
- data/JSON-Schema-Test-Suite/remotes/integer.json +1 -1
- data/JSON-Schema-Test-Suite/remotes/name-defs.json +6 -2
- data/JSON-Schema-Test-Suite/remotes/name.json +6 -2
- data/JSON-Schema-Test-Suite/remotes/subSchemas.json +2 -2
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/additionalItems.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/additionalProperties.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/allOf.json +0 -0
- data/JSON-Schema-Test-Suite/tests/draft2019-09/anchor.json +87 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/anyOf.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/boolean_schema.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/const.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/contains.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/default.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/defs.json +2 -2
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/dependencies.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/enum.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/exclusiveMaximum.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/exclusiveMinimum.json +0 -0
- data/JSON-Schema-Test-Suite/tests/draft2019-09/format.json +614 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/if-then-else.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/items.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/maxItems.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/maxLength.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/maxProperties.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/maximum.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/minItems.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/minLength.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/minProperties.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/minimum.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/multipleOf.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/not.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/oneOf.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/optional/bignum.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/optional/content.json +0 -0
- data/JSON-Schema-Test-Suite/tests/draft2019-09/optional/ecmascript-regex.json +213 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/optional/format/date-time.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/optional/format/date.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/optional/format/email.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/optional/format/hostname.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/optional/format/idn-email.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/optional/format/idn-hostname.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/optional/format/ipv4.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/optional/format/ipv6.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/optional/format/iri-reference.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/optional/format/iri.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/optional/format/json-pointer.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/optional/format/regex.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/optional/format/relative-json-pointer.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/optional/format/time.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/optional/format/uri-reference.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/optional/format/uri-template.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/optional/format/uri.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/optional/zeroTerminatedFloats.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/pattern.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/patternProperties.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/properties.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/propertyNames.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/ref.json +1 -85
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/refRemote.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/required.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/type.json +0 -0
- data/JSON-Schema-Test-Suite/tests/{draft2019-08 → draft2019-09}/uniqueItems.json +84 -0
- data/JSON-Schema-Test-Suite/tests/draft3/format.json +362 -0
- data/JSON-Schema-Test-Suite/tests/draft3/optional/{jsregex.json → ecmascript-regex.json} +0 -0
- data/JSON-Schema-Test-Suite/tests/draft3/uniqueItems.json +84 -0
- data/JSON-Schema-Test-Suite/tests/draft4/format.json +218 -0
- data/JSON-Schema-Test-Suite/tests/draft4/optional/ecmascript-regex.json +200 -0
- data/JSON-Schema-Test-Suite/tests/draft4/uniqueItems.json +84 -0
- data/JSON-Schema-Test-Suite/tests/draft6/format.json +326 -0
- data/JSON-Schema-Test-Suite/tests/draft6/optional/ecmascript-regex.json +200 -0
- data/JSON-Schema-Test-Suite/tests/draft6/uniqueItems.json +84 -0
- data/JSON-Schema-Test-Suite/tests/draft7/format.json +614 -0
- data/JSON-Schema-Test-Suite/tests/draft7/optional/ecmascript-regex.json +200 -0
- data/JSON-Schema-Test-Suite/tests/draft7/uniqueItems.json +84 -0
- data/JSON-Schema-Test-Suite/tests/latest +1 -0
- data/JSON-Schema-Test-Suite/tox.ini +3 -2
- data/lib/json_schemer/format.rb +25 -58
- data/lib/json_schemer/version.rb +1 -1
- metadata +66 -59
- data/JSON-Schema-Test-Suite/tests/draft2019-08/optional/ecmascript-regex.json +0 -13
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"description": "validation of e-mail addresses",
|
|
4
|
+
"schema": {"format": "email"},
|
|
5
|
+
"tests": [
|
|
6
|
+
{
|
|
7
|
+
"description": "ignores integers",
|
|
8
|
+
"data": 12,
|
|
9
|
+
"valid": true
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"description": "ignores floats",
|
|
13
|
+
"data": 13.7,
|
|
14
|
+
"valid": true
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"description": "ignores objects",
|
|
18
|
+
"data": {},
|
|
19
|
+
"valid": true
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"description": "ignores arrays",
|
|
23
|
+
"data": [],
|
|
24
|
+
"valid": true
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"description": "ignores booleans",
|
|
28
|
+
"data": false,
|
|
29
|
+
"valid": true
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"description": "ignores null",
|
|
33
|
+
"data": null,
|
|
34
|
+
"valid": true
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"description": "validation of IP addresses",
|
|
40
|
+
"schema": {"format": "ip-address"},
|
|
41
|
+
"tests": [
|
|
42
|
+
{
|
|
43
|
+
"description": "ignores integers",
|
|
44
|
+
"data": 12,
|
|
45
|
+
"valid": true
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"description": "ignores floats",
|
|
49
|
+
"data": 13.7,
|
|
50
|
+
"valid": true
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"description": "ignores objects",
|
|
54
|
+
"data": {},
|
|
55
|
+
"valid": true
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"description": "ignores arrays",
|
|
59
|
+
"data": [],
|
|
60
|
+
"valid": true
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"description": "ignores booleans",
|
|
64
|
+
"data": false,
|
|
65
|
+
"valid": true
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"description": "ignores null",
|
|
69
|
+
"data": null,
|
|
70
|
+
"valid": true
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"description": "validation of IPv6 addresses",
|
|
76
|
+
"schema": {"format": "ipv6"},
|
|
77
|
+
"tests": [
|
|
78
|
+
{
|
|
79
|
+
"description": "ignores integers",
|
|
80
|
+
"data": 12,
|
|
81
|
+
"valid": true
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"description": "ignores floats",
|
|
85
|
+
"data": 13.7,
|
|
86
|
+
"valid": true
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"description": "ignores objects",
|
|
90
|
+
"data": {},
|
|
91
|
+
"valid": true
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"description": "ignores arrays",
|
|
95
|
+
"data": [],
|
|
96
|
+
"valid": true
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"description": "ignores booleans",
|
|
100
|
+
"data": false,
|
|
101
|
+
"valid": true
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"description": "ignores null",
|
|
105
|
+
"data": null,
|
|
106
|
+
"valid": true
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"description": "validation of hostnames",
|
|
112
|
+
"schema": {"format": "host-name"},
|
|
113
|
+
"tests": [
|
|
114
|
+
{
|
|
115
|
+
"description": "ignores integers",
|
|
116
|
+
"data": 12,
|
|
117
|
+
"valid": true
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"description": "ignores floats",
|
|
121
|
+
"data": 13.7,
|
|
122
|
+
"valid": true
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"description": "ignores objects",
|
|
126
|
+
"data": {},
|
|
127
|
+
"valid": true
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"description": "ignores arrays",
|
|
131
|
+
"data": [],
|
|
132
|
+
"valid": true
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"description": "ignores booleans",
|
|
136
|
+
"data": false,
|
|
137
|
+
"valid": true
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"description": "ignores null",
|
|
141
|
+
"data": null,
|
|
142
|
+
"valid": true
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"description": "validation of date-time strings",
|
|
148
|
+
"schema": {"format": "date-time"},
|
|
149
|
+
"tests": [
|
|
150
|
+
{
|
|
151
|
+
"description": "ignores integers",
|
|
152
|
+
"data": 12,
|
|
153
|
+
"valid": true
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"description": "ignores floats",
|
|
157
|
+
"data": 13.7,
|
|
158
|
+
"valid": true
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"description": "ignores objects",
|
|
162
|
+
"data": {},
|
|
163
|
+
"valid": true
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"description": "ignores arrays",
|
|
167
|
+
"data": [],
|
|
168
|
+
"valid": true
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"description": "ignores booleans",
|
|
172
|
+
"data": false,
|
|
173
|
+
"valid": true
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"description": "ignores null",
|
|
177
|
+
"data": null,
|
|
178
|
+
"valid": true
|
|
179
|
+
}
|
|
180
|
+
]
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"description": "validation of regular expressions",
|
|
184
|
+
"schema": {"format": "regex"},
|
|
185
|
+
"tests": [
|
|
186
|
+
{
|
|
187
|
+
"description": "ignores integers",
|
|
188
|
+
"data": 12,
|
|
189
|
+
"valid": true
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"description": "ignores floats",
|
|
193
|
+
"data": 13.7,
|
|
194
|
+
"valid": true
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"description": "ignores objects",
|
|
198
|
+
"data": {},
|
|
199
|
+
"valid": true
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"description": "ignores arrays",
|
|
203
|
+
"data": [],
|
|
204
|
+
"valid": true
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"description": "ignores booleans",
|
|
208
|
+
"data": false,
|
|
209
|
+
"valid": true
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"description": "ignores null",
|
|
213
|
+
"data": null,
|
|
214
|
+
"valid": true
|
|
215
|
+
}
|
|
216
|
+
]
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"description": "validation of date strings",
|
|
220
|
+
"schema": {"format": "date"},
|
|
221
|
+
"tests": [
|
|
222
|
+
{
|
|
223
|
+
"description": "ignores integers",
|
|
224
|
+
"data": 12,
|
|
225
|
+
"valid": true
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"description": "ignores floats",
|
|
229
|
+
"data": 13.7,
|
|
230
|
+
"valid": true
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"description": "ignores objects",
|
|
234
|
+
"data": {},
|
|
235
|
+
"valid": true
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"description": "ignores arrays",
|
|
239
|
+
"data": [],
|
|
240
|
+
"valid": true
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"description": "ignores booleans",
|
|
244
|
+
"data": false,
|
|
245
|
+
"valid": true
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"description": "ignores null",
|
|
249
|
+
"data": null,
|
|
250
|
+
"valid": true
|
|
251
|
+
}
|
|
252
|
+
]
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"description": "validation of time strings",
|
|
256
|
+
"schema": {"format": "time"},
|
|
257
|
+
"tests": [
|
|
258
|
+
{
|
|
259
|
+
"description": "ignores integers",
|
|
260
|
+
"data": 12,
|
|
261
|
+
"valid": true
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"description": "ignores floats",
|
|
265
|
+
"data": 13.7,
|
|
266
|
+
"valid": true
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"description": "ignores objects",
|
|
270
|
+
"data": {},
|
|
271
|
+
"valid": true
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"description": "ignores arrays",
|
|
275
|
+
"data": [],
|
|
276
|
+
"valid": true
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"description": "ignores booleans",
|
|
280
|
+
"data": false,
|
|
281
|
+
"valid": true
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"description": "ignores null",
|
|
285
|
+
"data": null,
|
|
286
|
+
"valid": true
|
|
287
|
+
}
|
|
288
|
+
]
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"description": "validation of CSS colors",
|
|
292
|
+
"schema": {"format": "color"},
|
|
293
|
+
"tests": [
|
|
294
|
+
{
|
|
295
|
+
"description": "ignores integers",
|
|
296
|
+
"data": 12,
|
|
297
|
+
"valid": true
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"description": "ignores floats",
|
|
301
|
+
"data": 13.7,
|
|
302
|
+
"valid": true
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"description": "ignores objects",
|
|
306
|
+
"data": {},
|
|
307
|
+
"valid": true
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"description": "ignores arrays",
|
|
311
|
+
"data": [],
|
|
312
|
+
"valid": true
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"description": "ignores booleans",
|
|
316
|
+
"data": false,
|
|
317
|
+
"valid": true
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"description": "ignores null",
|
|
321
|
+
"data": null,
|
|
322
|
+
"valid": true
|
|
323
|
+
}
|
|
324
|
+
]
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"description": "validation of URIs",
|
|
328
|
+
"schema": {"format": "uri"},
|
|
329
|
+
"tests": [
|
|
330
|
+
{
|
|
331
|
+
"description": "ignores integers",
|
|
332
|
+
"data": 12,
|
|
333
|
+
"valid": true
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"description": "ignores floats",
|
|
337
|
+
"data": 13.7,
|
|
338
|
+
"valid": true
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"description": "ignores objects",
|
|
342
|
+
"data": {},
|
|
343
|
+
"valid": true
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"description": "ignores arrays",
|
|
347
|
+
"data": [],
|
|
348
|
+
"valid": true
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"description": "ignores booleans",
|
|
352
|
+
"data": false,
|
|
353
|
+
"valid": true
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"description": "ignores null",
|
|
357
|
+
"data": null,
|
|
358
|
+
"valid": true
|
|
359
|
+
}
|
|
360
|
+
]
|
|
361
|
+
}
|
|
362
|
+
]
|
|
File without changes
|
|
@@ -75,5 +75,89 @@
|
|
|
75
75
|
"valid": false
|
|
76
76
|
}
|
|
77
77
|
]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"description": "uniqueItems with an array of items",
|
|
81
|
+
"schema": {
|
|
82
|
+
"items": [{"type": "boolean"}, {"type": "boolean"}],
|
|
83
|
+
"uniqueItems": true
|
|
84
|
+
},
|
|
85
|
+
"tests": [
|
|
86
|
+
{
|
|
87
|
+
"description": "[false, true] from items array is valid",
|
|
88
|
+
"data": [false, true],
|
|
89
|
+
"valid": true
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"description": "[true, false] from items array is valid",
|
|
93
|
+
"data": [true, false],
|
|
94
|
+
"valid": true
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"description": "[false, false] from items array is not valid",
|
|
98
|
+
"data": [false, false],
|
|
99
|
+
"valid": false
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"description": "[true, true] from items array is not valid",
|
|
103
|
+
"data": [true, true],
|
|
104
|
+
"valid": false
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"description": "unique array extended from [false, true] is valid",
|
|
108
|
+
"data": [false, true, "foo", "bar"],
|
|
109
|
+
"valid": true
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"description": "unique array extended from [true, false] is valid",
|
|
113
|
+
"data": [true, false, "foo", "bar"],
|
|
114
|
+
"valid": true
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"description": "non-unique array extended from [false, true] is not valid",
|
|
118
|
+
"data": [false, true, "foo", "foo"],
|
|
119
|
+
"valid": false
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"description": "non-unique array extended from [true, false] is not valid",
|
|
123
|
+
"data": [true, false, "foo", "foo"],
|
|
124
|
+
"valid": false
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"description": "uniqueItems with an array of items and additionalItems=false",
|
|
130
|
+
"schema": {
|
|
131
|
+
"items": [{"type": "boolean"}, {"type": "boolean"}],
|
|
132
|
+
"uniqueItems": true,
|
|
133
|
+
"additionalItems": false
|
|
134
|
+
},
|
|
135
|
+
"tests": [
|
|
136
|
+
{
|
|
137
|
+
"description": "[false, true] from items array is valid",
|
|
138
|
+
"data": [false, true],
|
|
139
|
+
"valid": true
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"description": "[true, false] from items array is valid",
|
|
143
|
+
"data": [true, false],
|
|
144
|
+
"valid": true
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"description": "[false, false] from items array is not valid",
|
|
148
|
+
"data": [false, false],
|
|
149
|
+
"valid": false
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"description": "[true, true] from items array is not valid",
|
|
153
|
+
"data": [true, true],
|
|
154
|
+
"valid": false
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"description": "extra items are invalid even if unique",
|
|
158
|
+
"data": [false, true, null],
|
|
159
|
+
"valid": false
|
|
160
|
+
}
|
|
161
|
+
]
|
|
78
162
|
}
|
|
79
163
|
]
|