Skip to content

Commit 720d5d8

Browse files
author
Chase Coalwell
committed
Remove dependency on smithy-aws-traits
1 parent 9f8883f commit 720d5d8

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

smithy-typescript-codegen/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ extra["displayName"] = "Smithy :: Typescript :: Codegen"
1818
extra["moduleName"] = "software.amazon.smithy.typescript.codegen"
1919

2020
dependencies {
21-
api("software.amazon.smithy:smithy-aws-traits:[1.7.2, 2.0[")
2221
api("software.amazon.smithy:smithy-codegen-core:[1.5.0, 2.0[")
2322
api("software.amazon.smithy:smithy-waiters:[1.5.0, 2.0[")
2423
implementation("software.amazon.smithy:smithy-protocol-test-traits:[1.5.0, 2.0[")

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import java.util.TreeSet;
2828
import java.util.UUID;
2929
import java.util.logging.Logger;
30-
import software.amazon.smithy.aws.traits.ServiceTrait;
3130
import software.amazon.smithy.build.FileManifest;
3231
import software.amazon.smithy.build.PluginContext;
3332
import software.amazon.smithy.codegen.core.Symbol;
@@ -148,12 +147,7 @@ class CodegenVisitor extends ShapeVisitor.Default<Void> {
148147
.addTag(TypeScriptShapeLinkProvider.DESERIALIZER_TAG, "Command deserializer")
149148
.build();
150149

151-
String serviceId;
152-
if (service.hasTrait(ServiceTrait.class)) {
153-
serviceId = service.getTrait(ServiceTrait.class).get().getSdkId();
154-
} else {
155-
serviceId = service.getId().getName();
156-
}
150+
String serviceId = service.getId().getName();
157151
TraceMetadata artifactMetadata = TraceMetadata.builder()
158152
.setTimestampAsNow()
159153
.id(serviceId)

0 commit comments

Comments
 (0)