Skip to content

Commit 7dfbb1e

Browse files
committed
Add test for unevaluatedProperties
1 parent 82a0774 commit 7dfbb1e

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tests/draft2020-12/unevaluatedProperties.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,31 @@
160160
}
161161
]
162162
},
163+
{
164+
"description": "unevaluatedProperties with non-bool additionalProperties",
165+
"schema": {
166+
"$schema": "https://json-schema.org/draft/2020-12/schema",
167+
"additionalProperties": { "type": "string" },
168+
"unevaluatedProperties": false
169+
},
170+
"tests": [
171+
{
172+
"description": "with only valid additional properties",
173+
"data": {
174+
"foo": "foo"
175+
},
176+
"valid": true
177+
},
178+
{
179+
"description": "with invalid additional properties",
180+
"data": {
181+
"foo": "foo",
182+
"bar": 1
183+
},
184+
"valid": false
185+
}
186+
]
187+
},
163188
{
164189
"description": "unevaluatedProperties with nested properties",
165190
"schema": {

0 commit comments

Comments
 (0)