Skip to content

Commit f8bed21

Browse files
authored
fix(codegen): handle enum traits in file bucketing (#1787)
1 parent 775cd5b commit f8bed21

File tree

1 file changed

+1
-1
lines changed
  • smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen

1 file changed

+1
-1
lines changed

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/SymbolVisitor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ public String formatModuleName(Shape shape, String name) {
481481
}
482482

483483
String path;
484-
if (shape.isEnumShape() || shape.isIntEnumShape()) {
484+
if (shape.isEnumShape() || shape.isIntEnumShape() || shape.hasTrait(EnumTrait.class)) {
485485
path = String.join("/", ".", SHAPE_NAMESPACE_PREFIX, "enums");
486486
} else if (shape.isStructureShape() && shape.hasTrait(ErrorTrait.class)) {
487487
path = String.join("/", ".", SHAPE_NAMESPACE_PREFIX, "errors");

0 commit comments

Comments
 (0)