Skip to content

Commit be2d6ac

Browse files
committed
Fix DirectedTypeScriptCodegen initial commit based on rebase from main
1 parent 3cbebaa commit be2d6ac

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

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

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ public void generateService(GenerateServiceDirective<TypeScriptCodegenContext, T
176176
delegator.useFileWriter(fileName, writer -> {
177177
ProtocolGenerator.GenerationContext context = new ProtocolGenerator.GenerationContext();
178178
context.setProtocolName(protocolGenerator.getName());
179-
context.setIntegrations(integrations);
180179
context.setModel(model);
181180
context.setService(service);
182181
context.setSettings(settings);
@@ -187,17 +186,15 @@ public void generateService(GenerateServiceDirective<TypeScriptCodegenContext, T
187186
protocolGenerator.generateResponseDeserializers(context);
188187
}
189188
if (context.getSettings().generateServerSdk()) {
190-
ProtocolGenerator.GenerationContext serverContext =
191-
context.withSymbolProvider(symbolProvider);
192-
protocolGenerator.generateRequestDeserializers(serverContext);
193-
protocolGenerator.generateResponseSerializers(serverContext);
194-
protocolGenerator.generateFrameworkErrorSerializer(serverContext);
189+
protocolGenerator.generateRequestDeserializers(context);
190+
protocolGenerator.generateResponseSerializers(context);
191+
protocolGenerator.generateFrameworkErrorSerializer(context);
195192
delegator.useShapeWriter(service, w -> {
196-
protocolGenerator.generateServiceHandlerFactory(serverContext.withWriter(w));
193+
protocolGenerator.generateServiceHandlerFactory(context.withWriter(w));
197194
});
198195
for (OperationShape operation : TopDownIndex.of(model).getContainedOperations(service)) {
199196
delegator.useShapeWriter(operation, w -> {
200-
protocolGenerator.generateOperationHandlerFactory(serverContext.withWriter(w), operation);
197+
protocolGenerator.generateOperationHandlerFactory(context.withWriter(w), operation);
201198
});
202199
}
203200
}
@@ -430,7 +427,6 @@ public void customizeBeforeIntegrations(
430427
if (protocolGenerator != null) {
431428
ProtocolGenerator.GenerationContext context = new ProtocolGenerator.GenerationContext();
432429
context.setProtocolName(protocolGenerator.getName());
433-
context.setIntegrations(directive.context().integrations());
434430
context.setModel(directive.model());
435431
context.setService(directive.service());
436432
context.setSettings(directive.settings());

0 commit comments

Comments
 (0)