Skip to content

Commit 4d1a916

Browse files
committed
added null-handling tests for additionalItems
1 parent 6e47a99 commit 4d1a916

File tree

5 files changed

+75
-0
lines changed

5 files changed

+75
-0
lines changed

tests/draft2019-09/additionalItems.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,5 +145,20 @@
145145
"valid": false
146146
}
147147
]
148+
},
149+
{
150+
"description": "additionalItems should properly handle null data",
151+
"schema": {
152+
"additionalItems": {
153+
"type": null
154+
}
155+
},
156+
"tests": [
157+
{
158+
"description": "null properties allowed",
159+
"data": [ null ],
160+
"valid": true
161+
}
162+
]
148163
}
149164
]

tests/draft3/additionalItems.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,5 +109,20 @@
109109
"valid": true
110110
}
111111
]
112+
},
113+
{
114+
"description": "additionalItems should properly handle null data",
115+
"schema": {
116+
"additionalItems": {
117+
"type": null
118+
}
119+
},
120+
"tests": [
121+
{
122+
"description": "null properties allowed",
123+
"data": [ null ],
124+
"valid": true
125+
}
126+
]
112127
}
113128
]

tests/draft4/additionalItems.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,5 +145,20 @@
145145
"valid": false
146146
}
147147
]
148+
},
149+
{
150+
"description": "additionalItems should properly handle null data",
151+
"schema": {
152+
"additionalItems": {
153+
"type": null
154+
}
155+
},
156+
"tests": [
157+
{
158+
"description": "null properties allowed",
159+
"data": [ null ],
160+
"valid": true
161+
}
162+
]
148163
}
149164
]

tests/draft6/additionalItems.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,5 +145,20 @@
145145
"valid": false
146146
}
147147
]
148+
},
149+
{
150+
"description": "additionalItems should properly handle null data",
151+
"schema": {
152+
"additionalItems": {
153+
"type": null
154+
}
155+
},
156+
"tests": [
157+
{
158+
"description": "null properties allowed",
159+
"data": [ null ],
160+
"valid": true
161+
}
162+
]
148163
}
149164
]

tests/draft7/additionalItems.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,5 +145,20 @@
145145
"valid": false
146146
}
147147
]
148+
},
149+
{
150+
"description": "additionalItems should properly handle null data",
151+
"schema": {
152+
"additionalItems": {
153+
"type": null
154+
}
155+
},
156+
"tests": [
157+
{
158+
"description": "null properties allowed",
159+
"data": [ null ],
160+
"valid": true
161+
}
162+
]
148163
}
149164
]

0 commit comments

Comments
 (0)