Closed SudBisht closed 9 months ago
able to solve this like :
JsonSchemaFactory factory = JsonSchemaFactory
.builder(JsonSchemaFactory.getInstance(SpecVersion.VersionFlag.V6))
.uriFetcher(uri -> uri.equals(URI.create("http://ab.cd.com/example/string/justId"))
? Thread.currentThread().getContextClassLoader().getResourceAsStream("schema file path in local system");
: null, "http").build();
Use Case
I have storage where the schema is stored as<key : value>, key as Schema Id, value as JSON Schema
in the below Schema where
$id
(http://ab.cd.com/example/string/exampleID, http://ab.cd.com/example/string/justId
) is just a string, not any URL so validating schema, gettingjava.io.FileNotFoundException
exceptionAny recommendations to solve this use case would be highly appreciated.
don't have option to update the
$ref:$id
part.