Skip to content

Commit 2254ee6

Browse files
committed
Add event-stream middleware if operation has eventstream input
1 parent a4441a7 commit 2254ee6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,12 @@ public List<RuntimeClientPlugin> getClientPlugins() {
111111
RuntimeClientPlugin.Convention.HAS_CONFIG
112112
)
113113
.servicePredicate(EventStreamGenerator::hasEventStream)
114-
.build()
114+
.build(),
115+
RuntimeClientPlugin.builder()
116+
.withConventions(
117+
TypeScriptDependency.MIDDLEWARE_EVENT_STREAM.dependency,
118+
"EventStream"
119+
).operationPredicate((m, s, o) -> operationHasEventStreamInput(m, o)).build()
115120
);
116121
}
117122

0 commit comments

Comments
 (0)