File tree 5 files changed +83
-1
lines changed
5 files changed +83
-1
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,13 @@ REMOTES = {
51
51
u"refToInteger" : {u"$ref" : u"#/$defs/integer" },
52
52
}
53
53
},
54
- "folder/folderInteger.json" : {u"type" : u"integer" }
54
+ "folder/folderInteger.json" : {u"type" : u"integer" },
55
+ "folder/subSchemaNestedRef.json" : {
56
+ u"type" : u"object" ,
57
+ u"properties" : {
58
+ u"hole" : {u"$ref" : u"integer.json" }
59
+ }
60
+ }
55
61
}
56
62
REMOTES_DIR = os .path .join (ROOT_DIR , "remotes" )
57
63
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ const refs = {
7
7
'http://localhost:1234/integer.json' : require ( './remotes/integer.json' ) ,
8
8
'http://localhost:1234/subSchemas.json' : require ( './remotes/subSchemas.json' ) ,
9
9
'http://localhost:1234/folder/folderInteger.json' : require ( './remotes/folder/folderInteger.json' ) ,
10
+ 'http://localhost:1234/folder/subSchemaNestedRef.json' : require ( './remotes/folder/subSchemaNestedRef.json' ) ,
10
11
'http://localhost:1234/name.json' : require ( './remotes/name.json' ) ,
11
12
'http://localhost:1234/name-defs.json' : require ( './remotes/name-defs.json' )
12
13
} ;
Original file line number Diff line number Diff line change 163
163
"valid" : false
164
164
}
165
165
]
166
+ },
167
+ {
168
+ "description" : " subschema nested ref in remote ref" ,
169
+ "schema" : {
170
+ "$id" : " http://localhost:1234/" ,
171
+ "properties" : {
172
+ "name" : {"$ref" : " folder/subSchemaNestedRef.json" }
173
+ }
174
+ },
175
+ "tests" : [
176
+ {
177
+ "description" : " number is valid" ,
178
+ "data" : {
179
+ "name" : {"hole" : 1 }
180
+ },
181
+ "valid" : true
182
+ },
183
+ {
184
+ "description" : " string is invalid" ,
185
+ "data" : {
186
+ "name" : {"hole" : " a" }
187
+ },
188
+ "valid" : false
189
+ }
190
+ ]
166
191
}
167
192
]
Original file line number Diff line number Diff line change 167
167
"valid" : false
168
168
}
169
169
]
170
+ },
171
+ {
172
+ "description" : " subschema nested ref in remote ref" ,
173
+ "schema" : {
174
+ "$id" : " http://localhost:1234/" ,
175
+ "properties" : {
176
+ "name" : {"$ref" : " folder/subSchemaNestedRef.json" }
177
+ }
178
+ },
179
+ "tests" : [
180
+ {
181
+ "description" : " number is valid" ,
182
+ "data" : {
183
+ "name" : {"hole" : 1 }
184
+ },
185
+ "valid" : true
186
+ },
187
+ {
188
+ "description" : " string is invalid" ,
189
+ "data" : {
190
+ "name" : {"hole" : " a" }
191
+ },
192
+ "valid" : false
193
+ }
194
+ ]
170
195
}
171
196
]
Original file line number Diff line number Diff line change 167
167
"valid" : false
168
168
}
169
169
]
170
+ },
171
+ {
172
+ "description" : " subschema nested ref in remote ref" ,
173
+ "schema" : {
174
+ "$id" : " http://localhost:1234/" ,
175
+ "properties" : {
176
+ "name" : {"$ref" : " folder/subSchemaNestedRef.json" }
177
+ }
178
+ },
179
+ "tests" : [
180
+ {
181
+ "description" : " number is valid" ,
182
+ "data" : {
183
+ "name" : {"hole" : 1 }
184
+ },
185
+ "valid" : true
186
+ },
187
+ {
188
+ "description" : " string is invalid" ,
189
+ "data" : {
190
+ "name" : {"hole" : " a" }
191
+ },
192
+ "valid" : false
193
+ }
194
+ ]
170
195
}
171
196
]
You can’t perform that action at this time.
0 commit comments