java.lang.Object
io.confluent.kafka.schemaregistry.type.logical.policy.ValidityResult

public class ValidityResult extends Object
The outcome of a LogicalTypeChecker.validate(io.confluent.kafka.schemaregistry.type.logical.policy.LogicalTypeChecker.Mode, io.confluent.kafka.schemaregistry.type.logical.LogicalType) call.

All violations are collected rather than failing on the first one, so a caller can present the complete set of problems with a schema in one pass. Mirrors CompatibilityResult.

  • Method Details

    • valid

      public static ValidityResult valid()
      Returns a result with no violations.
    • of

      public static ValidityResult of(List<Invalidity> invalidities)
      Returns a result carrying the given violations, or valid() if there are none.
    • isValid

      public boolean isValid()
    • getInvalidities

      public List<Invalidity> getInvalidities()
      The violations found, in the order they were discovered. Empty when valid.
    • describe

      public String describe()
      Renders every violation as a single newline-separated string, suitable for an error message. Returns the empty string when valid.
    • toString

      public String toString()
      Overrides:
      toString in class Object