I have two folders per say
/test1/schemas/test_jsons/ and /test2/schmeas/test_jsons/ and inside those folder I have test.json file and I have below json
in /test2/schemas/wrapper_jsons
test_wrapper_json =
{
"test_types": {
"type": "array",
"items": {
"$ref": "../test_jsons/test.json",
"type": "object"
},
"uniqueItems": true,
"minItems": 1
}
}
uri_root = 'file://test2/schemas/'
resolver = jsonschema.RefResolver(uri_root, test_wrapper_json)
I need a custom resolver that should look for json_file from /test1/schemas/test_jsons/ first, if file not found in that path then it should look for /test2/schmeas/test_jsons.
I have two folders per say /test1/schemas/test_jsons/ and /test2/schmeas/test_jsons/ and inside those folder I have test.json file and I have below json in /test2/schemas/wrapper_jsons test_wrapper_json =
{ "test_types": { "type": "array", "items": { "$ref": "../test_jsons/test.json", "type": "object" }, "uniqueItems": true, "minItems": 1 } } uri_root = 'file://test2/schemas/' resolver = jsonschema.RefResolver(uri_root, test_wrapper_json) I need a custom resolver that should look for json_file from /test1/schemas/test_jsons/ first, if file not found in that path then it should look for /test2/schmeas/test_jsons.