Skip to content

Commit 20026a5

Browse files
committed
Update to SerdeContext
1 parent fd9c923 commit 20026a5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ private void generateOperationSerializer(GenerationContext context, OperationSha
8989

9090
// Ensure that the request type is imported.
9191
writer.addUseImports(requestType);
92-
writer.addImport("SerializerUtils", "SerializerUtils", "@aws-sdk/types");
92+
writer.addImport("SerdeContext", "SerdeContext", "@aws-sdk/types");
9393
writer.addImport("Endpoint", "__Endpoint", "@aws-sdk/types");
9494
// e.g., serializeAws_restJson1_1ExecuteStatement
9595
String serializerMethodName = "serialize" + ProtocolGenerator.getSanitizedName(getName()) + symbol.getName();
@@ -99,15 +99,15 @@ private void generateOperationSerializer(GenerationContext context, OperationSha
9999

100100
writer.openBlock("export function $L(\n"
101101
+ " input: $L,\n"
102-
+ " utils: SerializerUtils\n"
102+
+ " context: SerdeContext\n"
103103
+ "): $T {", "}", serializerMethodName, inputType, requestType, () -> {
104104
List<HttpBinding> labelBindings = writeRequestLabels(context, operation, bindingIndex, trait);
105105
List<HttpBinding> queryBindings = writeRequestQueryString(context, operation, bindingIndex);
106106
writeHeaders(context, operation, bindingIndex);
107107
List<HttpBinding> documentBindings = writeRequestBody(context, operation, bindingIndex);
108108

109109
writer.openBlock("return new $T({", "});", requestType, () -> {
110-
writer.write("...utils.endpoint,");
110+
writer.write("...context.endpoint,");
111111
writer.write("protocol: \"https\",");
112112
writer.write("method: $S,", trait.getMethod());
113113
if (labelBindings.isEmpty()) {
@@ -310,7 +310,7 @@ private void generateOperationDeserializer(GenerationContext context, OperationS
310310

311311
// Ensure that the response type is imported.
312312
writer.addUseImports(responseType);
313-
writer.addImport("DeserializerUtils", "DeserializerUtils", "@aws-sdk/types");
313+
writer.addImport("SerdeContext", "SerdeContext", "@aws-sdk/types");
314314
// e.g., deserializeAws_restJson1_1ExecuteStatement
315315
String methodName = "deserialize" + ProtocolGenerator.getSanitizedName(getName()) + symbol.getName();
316316

@@ -320,7 +320,7 @@ private void generateOperationDeserializer(GenerationContext context, OperationS
320320

321321
writer.openBlock("export function $L(\n"
322322
+ " output: $T,\n"
323-
+ " utils: DeserializerUtils\n"
323+
+ " context: SerdeContext\n"
324324
+ "): Promise<$L> {", "}", methodName, responseType, outputType, () -> {
325325
// TODO: Check status code to create appropriate error type or response type.
326326
writeHeaders(context, operation, bindingIndex);

0 commit comments

Comments
 (0)