diff --git a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/SymbolVisitor.java b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/SymbolVisitor.java index 90c7ab96c2a..8287a53b3a7 100644 --- a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/SymbolVisitor.java +++ b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/SymbolVisitor.java @@ -481,7 +481,7 @@ public String formatModuleName(Shape shape, String name) { } String path; - if (shape.isEnumShape() || shape.isIntEnumShape()) { + if (shape.isEnumShape() || shape.isIntEnumShape() || shape.hasTrait(EnumTrait.class)) { path = String.join("/", ".", SHAPE_NAMESPACE_PREFIX, "enums"); } else if (shape.isStructureShape() && shape.hasTrait(ErrorTrait.class)) { path = String.join("/", ".", SHAPE_NAMESPACE_PREFIX, "errors");