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
Modifier and TypeClassDescriptionstatic final class
Builder used to construct a diff of two Smithy models.static final class
The result of comparing two Smithy models. -
Method Summary
Modifier and TypeMethodDescriptionstatic ModelDiff.Builder
builder()
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.Builder
directly 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.Builder
directly to get access to additional information.- Parameters:
classLoader
- ClassLoader used to findDiffEvaluator
service providers.oldModel
- Previous version of the model.newModel
- New model to compare.- Returns:
- Returns the computed validation events.
-