Class JsonSchemaValidationUtil

java.lang.Object
io.apicurio.registry.serde.jsonschema.JsonSchemaValidationUtil

public class JsonSchemaValidationUtil extends Object
Author:
Carles Arnal
  • Constructor Details

    • JsonSchemaValidationUtil

      public JsonSchemaValidationUtil()
  • Method Details

    • validateDataWithSchema

      protected static void validateDataWithSchema(io.apicurio.registry.resolver.ParsedSchema<JsonSchema> schema, byte[] data, com.fasterxml.jackson.databind.ObjectMapper mapper) throws IOException
      Parameters:
      schema - the schema to test the data.
      data - the data to test.
      mapper - the object mapper to be used to read the data.
      Throws:
      IOException - In case of validation errors, a IO exception is thrown.