diff --git a/smithy-build/src/main/java/software/amazon/smithy/build/transforms/AbstractTraitRemoval.java b/smithy-build/src/main/java/software/amazon/smithy/build/transforms/AbstractTraitRemoval.java index aeda2659121..0241181e640 100644 --- a/smithy-build/src/main/java/software/amazon/smithy/build/transforms/AbstractTraitRemoval.java +++ b/smithy-build/src/main/java/software/amazon/smithy/build/transforms/AbstractTraitRemoval.java @@ -18,6 +18,7 @@ import java.util.HashSet; import java.util.List; import java.util.Set; +import java.util.logging.Logger; import software.amazon.smithy.build.ProjectionTransformer; import software.amazon.smithy.model.loader.Prelude; import software.amazon.smithy.model.shapes.Shape; @@ -26,6 +27,9 @@ import software.amazon.smithy.utils.Pair; abstract class AbstractTraitRemoval implements ProjectionTransformer { + + private static final Logger LOGGER = Logger.getLogger(AbstractTraitRemoval.class.getName()); + Pair, Set> parseTraits(List arguments) { Set traitNames = new HashSet<>(); Set traitNamespaces = new HashSet<>(); @@ -36,6 +40,9 @@ Pair, Set> parseTraits(List arguments) { } else if (arg.equals(Prelude.NAMESPACE)) { // For backwards compatibility, support "smithy.api" instead // of "smithy.api#". + LOGGER.warning("Deprecation warning in " + getName() + ": Support for `smithy.api` as a trait name " + + "is deprecated and will be removed in future releases. Update this value to " + + "`smithy.api#`."); traitNamespaces.add(arg); } else { traitNames.add(ShapeId.from(Trait.makeAbsoluteName(arg)));