java.lang.Object
io.confluent.kafka.schemaregistry.json.diff.Context

public class Context extends Object
  • Constructor Details

  • Method Details

    • getSubcontext

      public Context getSubcontext()
    • compareMemoized

      public List<Difference> compareMemoized(org.everit.json.schema.Schema original, org.everit.json.schema.Schema update, Context.PairComparator comparator)
      Compares a pair of schemas with memoization, returning the differences with paths relative to the pair (i.e. as if the pair were the root). If the pair is already cached the cached result is returned; if it is currently being compared higher in the stack it is treated as a compatible cycle and an empty list is returned without caching. Otherwise comparator is invoked on a fresh subcontext rooted at the pair, and its differences are cached.
    • addDifferencesRebased

      public void addDifferencesRebased(List<Difference> relativeDiffs)
      Adds differences that were computed relative to a nested pair, rebasing each one onto the current path.
    • enterPath

      public Context.PathScope enterPath(String path)
    • isCompatible

      public boolean isCompatible()
    • getDifferences

      public List<Difference> getDifferences()
    • addDifference

      public void addDifference(Difference.Type type)
    • addDifference

      public void addDifference(String attribute, Difference.Type type)
    • addDifferences

      public void addDifferences(List<Difference> differences)