Class ChangedEnumTrait

java.lang.Object
software.amazon.smithy.diff.evaluators.AbstractDiffEvaluator
software.amazon.smithy.diff.evaluators.ChangedEnumTrait
All Implemented Interfaces:
DiffEvaluator

public final class ChangedEnumTrait extends AbstractDiffEvaluator
Emits a NOTE when a new enum value is appended, emits an ERROR when an enum value is removed, emits an ERROR when an enum name changes, and emits an ERROR when a new enum value is inserted before the end of the list of existing values.
  • Constructor Details

    • ChangedEnumTrait

      public ChangedEnumTrait()
  • Method Details

    • evaluate

      public List<ValidationEvent> evaluate(Differences differences)
      Description copied from interface: DiffEvaluator
      Returns validation events given two models and the detected differences between them.
      Parameters:
      differences - Detected differences.
      Returns:
      Returns validation events that are relative to the new model.