Package software.amazon.smithy.diff
Class PreviewFeatureDiffEventDecorator
java.lang.Object
software.amazon.smithy.diff.PreviewFeatureDiffEventDecorator
- All Implemented Interfaces:
DiffEventDecorator
Downgrades backward-incompatible diff events from ERROR or DANGER to WARNING when they occur on a shape
governed by a preview unstable feature.
An event is downgraded only when its shape is owned by a preview feature (resolved via
UnstableFeatureIndex) in both models it appears in.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecorate(Differences differences, ValidationEvent event) Takes a diff event and potentially transforms it, returning the same event if this decorator does not apply.
-
Constructor Details
-
PreviewFeatureDiffEventDecorator
public PreviewFeatureDiffEventDecorator()
-
-
Method Details
-
decorate
Description copied from interface:DiffEventDecoratorTakes a diff event and potentially transforms it, returning the same event if this decorator does not apply.- Specified by:
decoratein interfaceDiffEventDecorator- Parameters:
differences- The differences between the old and new models being evaluated.event- The event to decorate.- Returns:
- Returns the decorated event or the original one if no decoration took place.
-