public class SchemaValidator extends Object
| Modifier and Type | Field and Description |
|---|---|
private com.fasterxml.jackson.databind.ObjectMapper |
mapper |
private Map<String,Map<String,Object>> |
schemaMap |
private Map<String,com.fasterxml.jackson.databind.JsonNode> |
schemas |
private com.github.fge.jsonschema.main.JsonValidator |
validator |
| Constructor and Description |
|---|
SchemaValidator() |
| Modifier and Type | Method and Description |
|---|---|
private void |
checkExistSchema(String resource,
String property) |
void |
collectSingleProperty(String resource,
String property,
com.fasterxml.jackson.databind.JsonNode schema) |
private static String |
combineToKey(String resource,
String property) |
private String |
formatValidationResults(com.github.fge.jsonschema.core.report.ProcessingReport reports) |
Map<String,Object> |
getSchemaMap(String resource,
String property) |
private static com.fasterxml.jackson.databind.JsonNode |
stringToJsonObject(String type,
String value) |
String |
validateSingleProperty(String resource,
String property,
String value) |
private final com.github.fge.jsonschema.main.JsonValidator validator
private final com.fasterxml.jackson.databind.ObjectMapper mapper
public void collectSingleProperty(String resource, String property, com.fasterxml.jackson.databind.JsonNode schema) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionpublic String validateSingleProperty(String resource, String property, String value)
private static com.fasterxml.jackson.databind.JsonNode stringToJsonObject(String type, String value)
private String formatValidationResults(com.github.fge.jsonschema.core.report.ProcessingReport reports)
Copyright © 2020. All rights reserved.