Skip to content

Commit e76a8ce

Browse files
committed
chore: export middleware only when applicable
1 parent 55dff47 commit e76a8ce

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/AddHttpApiKeyAuthPlugin.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ public void writeAdditionalExports(
151151
TypeScriptWriter writer
152152
) {
153153
boolean isClientSdk = settings.generateClient();
154-
if (isClientSdk) {
154+
ServiceShape service = settings.getService(model);
155+
if (isClientSdk && hasEffectiveHttpApiKeyAuthTrait(model, service)) {
155156
writer.write("export * from \"./middleware/$1L\";", getMiddlewarePath());
156157
}
157158
}

0 commit comments

Comments
 (0)