Interface SchemaValidator


public interface SchemaValidator

A SchemaValidator has one method, which validates that a ParsedSchema is compatible with the other schemas provided.

What makes one Schema compatible with another is not part of the interface contract.

  • Method Details

    • validate

      List<String> validate(CompatibilityPolicy policy, ParsedSchema toValidate, Iterable<ParsedSchemaHolder> existing)
      Validate one schema against others. The order of the schemas to validate against is chronological from most recent to oldest, if there is a natural chronological order. This allows some validators to identify which schemas are the most "recent" in order to validate only against the most recent schema(s).
      Parameters:
      policy - The compatibility policy to use for validation
      toValidate - The schema to validate
      existing - The schemas to validate against, in order from most recent to latest if applicable
      Returns:
      List of error message, otherwise empty list
    • validate

      default List<String> validate(ParsedSchema toValidate, Iterable<ParsedSchemaHolder> existing)