File tree Expand file tree Collapse file tree 1 file changed +50
-4
lines changed Expand file tree Collapse file tree 1 file changed +50
-4
lines changed Original file line number Diff line number Diff line change 90
90
]
91
91
},
92
92
{
93
- "description" : " disallowing values " ,
93
+ "description" : " multiple options selects the right one " ,
94
94
"schema" : {
95
95
"propertyDependencies" : {
96
- "foo" : {"bar" : {"minProperties" : 2 }}
96
+ "foo" : {
97
+ "bar" : {
98
+ "minProperties" : 2 ,
99
+ "maxProperties" : 2
100
+ },
101
+ "baz" : {"maxProperties" : 1 },
102
+ "qux" : true ,
103
+ "quux" : false
104
+ }
97
105
}
98
106
},
99
107
"tests" : [
100
108
{
101
- "description" : " bar with 2 properties is valid" ,
109
+ "description" : " bar with exactly 2 properties is valid" ,
102
110
"data" : {
103
111
"foo" : " bar" ,
104
112
"other-foo" : " other-bar"
105
113
},
106
114
"valid" : true
107
115
},
108
116
{
109
- "description" : " bar without another property is invalid" ,
117
+ "description" : " bar with more than 2 properties is invalid" ,
118
+ "data" : {
119
+ "foo" : " bar" ,
120
+ "other-foo" : " other-bar" ,
121
+ "too" : " many"
122
+ },
123
+ "valid" : false
124
+ },
125
+ {
126
+ "description" : " bar with fewer than 2 properties is invalid" ,
127
+ "data" : {"foo" : " bar" },
128
+ "valid" : false
129
+ },
130
+ {
131
+ "description" : " baz alone is valid" ,
110
132
"data" : {"foo" : " baz" },
133
+ "valid" : true
134
+ },
135
+ {
136
+ "description" : " baz with other properties is invalid" ,
137
+ "data" : {
138
+ "foo" : " baz" ,
139
+ "other-foo" : " other-bar"
140
+ },
141
+ "valid" : false
142
+ },
143
+ {
144
+ "description" : " anything allowed with qux" ,
145
+ "data" : {
146
+ "foo" : " qux" ,
147
+ "blah" : [" some other property" ],
148
+ "more" : " properties"
149
+ },
150
+ "valid" : true
151
+ },
152
+ {
153
+ "description" : " quux is disallowed" ,
154
+ "data" : {
155
+ "foo" : " quux"
156
+ },
111
157
"valid" : false
112
158
}
113
159
]
You can’t perform that action at this time.
0 commit comments