Skip to content

Commit 951bd41

Browse files
author
Evgeny Poberezkin
authored
Merge pull request #154 from epoberezkin/property-names
draft-06: propertyNames validation
2 parents b974907 + 0058644 commit 951bd41

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

tests/draft6/propertyNames.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[
2+
{
3+
"description": "propertyNames validation",
4+
"schema": {
5+
"propertyNames": {"maxLength": 3}
6+
},
7+
"tests": [
8+
{
9+
"description": "all property names valid",
10+
"data": {
11+
"f": {},
12+
"foo": {}
13+
},
14+
"valid": true
15+
},
16+
{
17+
"description": "some property names invalid",
18+
"data": {
19+
"foo": {},
20+
"foobar": {}
21+
},
22+
"valid": false
23+
},
24+
{
25+
"description": "object without properties is valid",
26+
"data": {},
27+
"valid": true
28+
},
29+
{
30+
"description": "non-object is valid",
31+
"data": [],
32+
"valid": true
33+
}
34+
]
35+
}
36+
]

0 commit comments

Comments
 (0)