File tree 2 files changed +66
-0
lines changed 2 files changed +66
-0
lines changed Original file line number Diff line number Diff line change 140
140
}
141
141
]
142
142
},
143
+ {
144
+ "description" : " ref overrides any sibling keywords" ,
145
+ "schema" : {
146
+ "definitions" : {
147
+ "reffed" : {
148
+ "type" : " array"
149
+ }
150
+ },
151
+ "properties" : {
152
+ "foo" : {
153
+ "$ref" : " #/definitions/reffed" ,
154
+ "maxItems" : 2
155
+ }
156
+ }
157
+ },
158
+ "tests" : [
159
+ {
160
+ "description" : " remote ref valid" ,
161
+ "data" : { "foo" : [] },
162
+ "valid" : true
163
+ },
164
+ {
165
+ "description" : " remote ref valid, maxItems ignored" ,
166
+ "data" : { "foo" : [ 1 , 2 , 3 ] },
167
+ "valid" : true
168
+ },
169
+ {
170
+ "description" : " ref invalid" ,
171
+ "data" : { "foo" : " string" },
172
+ "valid" : false
173
+ }
174
+ ]
175
+ },
143
176
{
144
177
"description" : " remote ref, containing refs itself" ,
145
178
"schema" : {"$ref" : " http://json-schema.org/draft-03/schema#" },
Original file line number Diff line number Diff line change 140
140
}
141
141
]
142
142
},
143
+ {
144
+ "description" : " ref overrides any sibling keywords" ,
145
+ "schema" : {
146
+ "definitions" : {
147
+ "reffed" : {
148
+ "type" : " array"
149
+ }
150
+ },
151
+ "properties" : {
152
+ "foo" : {
153
+ "$ref" : " #/definitions/reffed" ,
154
+ "maxItems" : 2
155
+ }
156
+ }
157
+ },
158
+ "tests" : [
159
+ {
160
+ "description" : " ref valid" ,
161
+ "data" : { "foo" : [] },
162
+ "valid" : true
163
+ },
164
+ {
165
+ "description" : " ref valid, maxItems ignored" ,
166
+ "data" : { "foo" : [ 1 , 2 , 3 ] },
167
+ "valid" : true
168
+ },
169
+ {
170
+ "description" : " ref invalid" ,
171
+ "data" : { "foo" : " string" },
172
+ "valid" : false
173
+ }
174
+ ]
175
+ },
143
176
{
144
177
"description" : " remote ref, containing refs itself" ,
145
178
"schema" : {"$ref" : " http://json-schema.org/draft-04/schema#" },
You can’t perform that action at this time.
0 commit comments