Skip to content

Need a custom ref resolver #1225

@Honnegowda

Description

@Honnegowda

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    InvalidNot a bug, PEBKAC, or an unsupported setup

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions