Skip to content

Commit 761d4b2

Browse files
committed
added null-handling tests for array-form items
1 parent 6315a51 commit 761d4b2

File tree

5 files changed

+90
-5
lines changed

5 files changed

+90
-5
lines changed

tests/draft2019-09/items.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@
248248
]
249249
},
250250
{
251-
"description": "items should properly handle null data",
251+
"description": "single-form items should properly handle null data",
252252
"schema": {
253253
"items": {
254254
"type": null
@@ -261,5 +261,22 @@
261261
"valid": true
262262
}
263263
]
264+
},
265+
{
266+
"description": "array-form items should properly handle null data",
267+
"schema": {
268+
"items": [
269+
{
270+
"type": null
271+
}
272+
]
273+
},
274+
"tests": [
275+
{
276+
"description": "null properties allowed",
277+
"data": [ null ],
278+
"valid": true
279+
}
280+
]
264281
}
265282
]

tests/draft3/items.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
]
4545
},
4646
{
47-
"description": "items should properly handle null data",
47+
"description": "single-form items should properly handle null data",
4848
"schema": {
4949
"items": {
5050
"type": null
@@ -57,5 +57,22 @@
5757
"valid": true
5858
}
5959
]
60+
},
61+
{
62+
"description": "array-form items should properly handle null data",
63+
"schema": {
64+
"items": [
65+
{
66+
"type": null
67+
}
68+
]
69+
},
70+
"tests": [
71+
{
72+
"description": "null properties allowed",
73+
"data": [ null ],
74+
"valid": true
75+
}
76+
]
6077
}
6178
]

tests/draft4/items.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@
193193
]
194194
},
195195
{
196-
"description": "items should properly handle null data",
196+
"description": "single-form items should properly handle null data",
197197
"schema": {
198198
"items": {
199199
"type": null
@@ -206,5 +206,22 @@
206206
"valid": true
207207
}
208208
]
209+
},
210+
{
211+
"description": "array-form items should properly handle null data",
212+
"schema": {
213+
"items": [
214+
{
215+
"type": null
216+
}
217+
]
218+
},
219+
"tests": [
220+
{
221+
"description": "null properties allowed",
222+
"data": [ null ],
223+
"valid": true
224+
}
225+
]
209226
}
210227
]

tests/draft6/items.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@
248248
]
249249
},
250250
{
251-
"description": "items should properly handle null data",
251+
"description": "single-form items should properly handle null data",
252252
"schema": {
253253
"items": {
254254
"type": null
@@ -261,5 +261,22 @@
261261
"valid": true
262262
}
263263
]
264+
},
265+
{
266+
"description": "array-form items should properly handle null data",
267+
"schema": {
268+
"items": [
269+
{
270+
"type": null
271+
}
272+
]
273+
},
274+
"tests": [
275+
{
276+
"description": "null properties allowed",
277+
"data": [ null ],
278+
"valid": true
279+
}
280+
]
264281
}
265282
]

tests/draft7/items.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@
248248
]
249249
},
250250
{
251-
"description": "items should properly handle null data",
251+
"description": "single-form items should properly handle null data",
252252
"schema": {
253253
"items": {
254254
"type": null
@@ -261,5 +261,22 @@
261261
"valid": true
262262
}
263263
]
264+
},
265+
{
266+
"description": "array-form items should properly handle null data",
267+
"schema": {
268+
"items": [
269+
{
270+
"type": null
271+
}
272+
]
273+
},
274+
"tests": [
275+
{
276+
"description": "null properties allowed",
277+
"data": [ null ],
278+
"valid": true
279+
}
280+
]
264281
}
265282
]

0 commit comments

Comments
 (0)