class LoadManifestValidationService {

  public void validateManifest(LoadManifest loadManifest) {
    try {
      log.debug("Start validating load manifest: {}", loadManifest);

      final JsonNode manifestDefaultSchema = getDefaultManifestSchema();

      JsonNode manifest = objectMapper.valueToTree(loadManifest);

      Set<ValidationMessage> errors = jsonValidationService
          .validate(manifestDefaultSchema, manifest);
      log.debug("Validation result: {}", errors);

      if (!errors.isEmpty()) {
        throw new IngestException(format(
            "Failed to validate json from manifest %s, validation result is %s",
            loadManifest, errors));
      }

    } catch (IOException e) {
      throw new IngestException(format("Fail parse load manifest - %s", loadManifest));
    }
  }

}