@Test public void should_retrieve_errors_when_send_regex_request_with_invalid_field() throws Exception { JsonNode test1Json = JsonHandler.getFromFile(PropertiesUtils.getResourceFile("operator_regex_invalid_request.json")); final Schema schema = loadSchema(PropertiesUtils.getResourceFile("dsl.json")); assertThatThrownBy(() -> Validator.validate(schema, "DSL", test1Json)) .hasMessageContaining( "Validating $regex: {[key]: string} ~ ELEMENT_TOO_SHORT: 0 < 1"); }
public static void validate(Schema schema, String root, JsonNode document) throws ValidationException { new ValidatorEngine(schema).validate(document, root); }
Validator { public static void validate(Schema schema, String root, JsonNode document) throws ValidationException { new ValidatorEngine(schema).validate(document, root); } }
Validator { public static void validate(Schema schema, String root, JsonNode document) throws ValidationException { new ValidatorEngine(schema).validate(document, root); }  }
Validator { public static void validate(Schema schema, String root, JsonNode document) throws ValidationException { new ValidatorEngine(schema).validate(document, root); }  static void validate(Schema schema, String root, JsonNode document); }
Validator { public static void validate(Schema schema, String root, JsonNode document) throws ValidationException { new ValidatorEngine(schema).validate(document, root); }  static void validate(Schema schema, String root, JsonNode document);  }