Skip to content

Commit e3b4c4a

Browse files
author
Jake Waffle
committed
I was a bit hasty in my last commit. There is a use case for supplying a URL along with a JsonNode. The schema could be embedded into a json file and may still need to have a URL location (we use this for testing purposes and I broke our tests with the last commit).
1 parent 8be9498 commit e3b4c4a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/main/java/com/networknt/schema/JsonSchemaFactory.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,18 @@ public JsonSchema getSchema(URL schemaURL) {
236236
return getSchema(schemaURL, new SchemaValidatorsConfig());
237237
}
238238

239+
public JsonSchema getSchema(URL schemaUrl, JsonNode jsonNode, SchemaValidatorsConfig config) {
240+
return newJsonSchema(schemaUrl, jsonNode, config);
241+
}
242+
243+
239244
public JsonSchema getSchema(JsonNode jsonNode, SchemaValidatorsConfig config) {
240245
return newJsonSchema(null, jsonNode, config);
241246
}
247+
248+
public JsonSchema getSchema(URL schemaUrl, JsonNode jsonNode) {
249+
return newJsonSchema(schemaUrl, jsonNode, null);
250+
}
242251

243252
public JsonSchema getSchema(JsonNode jsonNode) {
244253
return newJsonSchema(null, jsonNode, null);

0 commit comments

Comments
 (0)