Package software.amazon.smithy.diff
Class ModelDiff
java.lang.Object
software.amazon.smithy.diff.ModelDiff
Computes the difference between two models and any problems that might
occur due to those differences.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder used to construct a diff of two Smithy models.static final classThe result of comparing two Smithy models. -
Method Summary
Modifier and TypeMethodDescriptionstatic ModelDiff.Builderbuilder()Creates a new ModelDiff.Builder that provides in-depth diff analysis.static List<ValidationEvent>compare(ClassLoader classLoader, Model oldModel, Model newModel) Evaluates the differences between two models.static List<ValidationEvent>Evaluates the differences between two models.
-
Method Details
-
builder
Creates a new ModelDiff.Builder that provides in-depth diff analysis.- Returns:
- Returns the builder.
-
compare
Evaluates the differences between two models.Use
ModelDiff.Builderdirectly to get access to additional information.- Parameters:
oldModel- Previous version of the model.newModel- New model to compare.- Returns:
- Returns the computed validation events.
-
compare
public static List<ValidationEvent> compare(ClassLoader classLoader, Model oldModel, Model newModel) Evaluates the differences between two models.Use
ModelDiff.Builderdirectly to get access to additional information.- Parameters:
classLoader- ClassLoader used to findDiffEvaluatorservice providers.oldModel- Previous version of the model.newModel- New model to compare.- Returns:
- Returns the computed validation events.
-