File tree Expand file tree Collapse file tree 6 files changed +89
-1
lines changed
Expand file tree Collapse file tree 6 files changed +89
-1
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,13 @@ REMOTES = {
5151 u"refToInteger" : {u"$ref" : u"#/$defs/integer" },
5252 }
5353 },
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+ }
5561}
5662REMOTES_DIR = os .path .join (ROOT_DIR , "remotes" )
5763
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ const refs = {
77 'http://localhost:1234/integer.json' : require ( './remotes/integer.json' ) ,
88 'http://localhost:1234/subSchemas.json' : require ( './remotes/subSchemas.json' ) ,
99 'http://localhost:1234/folder/folderInteger.json' : require ( './remotes/folder/folderInteger.json' ) ,
10+ 'http://localhost:1234/folder/subSchemaNestedRef.json' : require ( './remotes/folder/subSchemaNestedRef.json' ) ,
1011 'http://localhost:1234/name.json' : require ( './remotes/name.json' ) ,
1112 'http://localhost:1234/name-defs.json' : require ( './remotes/name-defs.json' )
1213} ;
Original file line number Diff line number Diff line change 1+ {
2+ "type" : " object" ,
3+ "properties" : {
4+ "hole" : {"$ref" : " integer.json" }
5+ }
6+ }
Original file line number Diff line number Diff line change 163163 "valid" : false
164164 }
165165 ]
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+ ]
166191 }
167192]
Original file line number Diff line number Diff line change 167167 "valid" : false
168168 }
169169 ]
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+ ]
170195 }
171196]
Original file line number Diff line number Diff line change 167167 "valid" : false
168168 }
169169 ]
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+ ]
170195 }
171196]
You can’t perform that action at this time.
0 commit comments