Need a custom ref resolver #1226
Unanswered
Honnegowda
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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.
Beta Was this translation helpful? Give feedback.
All reactions