Skip to content

Commit 9c05d18

Browse files
committed
draft-06: propertyNames keyword with boolean schemas
1 parent fa99135 commit 9c05d18

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

tests/draft6/propertyNames.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,37 @@
3232
"valid": true
3333
}
3434
]
35+
},
36+
{
37+
"description": "propertyNames with boolean schema true",
38+
"schema": {"propertyNames": true},
39+
"tests": [
40+
{
41+
"description": "object with any properties is valid",
42+
"data": {"foo": 1},
43+
"valid": true
44+
},
45+
{
46+
"description": "empty object is valid",
47+
"data": {},
48+
"valid": true
49+
}
50+
]
51+
},
52+
{
53+
"description": "propertyNames with boolean schema false",
54+
"schema": {"propertyNames": false},
55+
"tests": [
56+
{
57+
"description": "object with any properties is invalid",
58+
"data": {"foo": 1},
59+
"valid": false
60+
},
61+
{
62+
"description": "empty object is valid",
63+
"data": {},
64+
"valid": true
65+
}
66+
]
3567
}
3668
]

0 commit comments

Comments
 (0)