Skip to content

Commit 330fd48

Browse files
committed
Merge into properties tests.
1 parent c7c2338 commit 330fd48

File tree

2 files changed

+54
-55
lines changed

2 files changed

+54
-55
lines changed

tests/draft3/p-pP-aP.json

Lines changed: 0 additions & 55 deletions
This file was deleted.

tests/draft3/properties.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,59 @@
2929
"valid": true
3030
}
3131
]
32+
},
33+
{
34+
"description":
35+
"properties, patternProperties, additionalProperties interaction",
36+
"schema": {
37+
"properties": {
38+
"foo": {"type": "array", "maxItems": 3},
39+
"bar": {"type": "array"}
40+
},
41+
"patternProperties": {"f.o": {"minItems": 2}},
42+
"additionalProperties": {"type": "integer"}
43+
},
44+
"tests": [
45+
{
46+
"description": "property validates property",
47+
"data": {"foo": [1, 2]},
48+
"valid": true
49+
},
50+
{
51+
"description": "property invalidates property",
52+
"data": {"foo": [1, 2, 3, 4]},
53+
"valid": false
54+
},
55+
{
56+
"description": "patternProperty invalidates property",
57+
"data": {"foo": []},
58+
"valid": false
59+
},
60+
{
61+
"description": "patternProperty validates nonproperty",
62+
"data": {"fxo": [1, 2]},
63+
"valid": true
64+
},
65+
{
66+
"description": "patternProperty invalidates nonproperty",
67+
"data": {"fxo": []},
68+
"valid": false
69+
},
70+
{
71+
"description": "additionalProperty ignores property",
72+
"data": {"bar": []},
73+
"valid": true
74+
},
75+
{
76+
"description": "additionalProperty validates others",
77+
"data": {"quux": 3},
78+
"valid": true
79+
},
80+
{
81+
"description": "additionalProperty invalidates others",
82+
"data": {"quux": "foo"},
83+
"valid": false
84+
}
85+
]
3286
}
3387
]

0 commit comments

Comments
 (0)