Skip to content

Commit 8be9498

Browse files
author
Jake Waffle
committed
Removed the factory methods that I added previously. Someone could get the same behavior by supplying a schemaUrl and utilizing a custom URLFetcher.
1 parent bb6cbf3 commit 8be9498

File tree

1 file changed

+2
-38
lines changed

1 file changed

+2
-38
lines changed

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

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -187,24 +187,10 @@ public JsonSchema getSchema(String schema, SchemaValidatorsConfig config) {
187187
}
188188
}
189189

190-
public JsonSchema getSchema(URL schemaUrl, String schema, SchemaValidatorsConfig config) {
191-
try {
192-
final JsonNode schemaNode = mapper.readTree(schema);
193-
return newJsonSchema(schemaUrl, schemaNode, config);
194-
} catch (IOException ioe) {
195-
logger.error("Failed to load json schema!", ioe);
196-
throw new JsonSchemaException(ioe);
197-
}
198-
}
199-
200190
public JsonSchema getSchema(String schema) {
201-
return getSchema(null, schema, null);
191+
return getSchema(schema, null);
202192
}
203193

204-
public JsonSchema getSchema(URL schemaUrl, String schema) {
205-
return getSchema(schemaUrl, schema, null);
206-
}
207-
208194
public JsonSchema getSchema(InputStream schemaStream, SchemaValidatorsConfig config) {
209195
try {
210196
final JsonNode schemaNode = mapper.readTree(schemaStream);
@@ -215,24 +201,10 @@ public JsonSchema getSchema(InputStream schemaStream, SchemaValidatorsConfig con
215201
}
216202
}
217203

218-
public JsonSchema getSchema(URL schemaUrl, InputStream schemaStream, SchemaValidatorsConfig config) {
219-
try {
220-
final JsonNode schemaNode = mapper.readTree(schemaStream);
221-
return newJsonSchema(schemaUrl, schemaNode, config);
222-
} catch (IOException ioe) {
223-
logger.error("Failed to load json schema!", ioe);
224-
throw new JsonSchemaException(ioe);
225-
}
226-
}
227-
228204
public JsonSchema getSchema(InputStream schemaStream) {
229-
return getSchema(null, schemaStream, null);
205+
return getSchema(schemaStream, null);
230206
}
231207

232-
public JsonSchema getSchema(URL schemaUrl, InputStream schemaStream) {
233-
return getSchema(schemaUrl, schemaStream, null);
234-
}
235-
236208
public JsonSchema getSchema(URL schemaURL, SchemaValidatorsConfig config) {
237209
try {
238210
InputStream inputStream = null;
@@ -271,14 +243,6 @@ public JsonSchema getSchema(JsonNode jsonNode, SchemaValidatorsConfig config) {
271243
public JsonSchema getSchema(JsonNode jsonNode) {
272244
return newJsonSchema(null, jsonNode, null);
273245
}
274-
275-
public JsonSchema getSchema(URL schemaUrl, JsonNode jsonNode, SchemaValidatorsConfig config) {
276-
return newJsonSchema(schemaUrl, jsonNode, config);
277-
}
278-
279-
public JsonSchema getSchema(URL schemaUrl, JsonNode jsonNode) {
280-
return newJsonSchema(schemaUrl, jsonNode, null);
281-
}
282246

283247
private boolean idMatchesSourceUrl(JsonMetaSchema metaSchema, JsonNode schema, URL schemaUrl) {
284248

0 commit comments

Comments
 (0)