Skip to content

Commit 78346d9

Browse files
committed
chore: remove entries before buildFormUrlencodedString call
1 parent 5f820e6 commit 78346d9

File tree

2 files changed

+6
-10
lines changed
  • codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen

2 files changed

+6
-10
lines changed

codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AwsEc2.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,11 @@ protected void serializeInputDocument(
121121
) {
122122
TypeScriptWriter writer = context.getWriter();
123123

124-
// Gather all the explicit input entries.
125-
writer.write("const entries = $L;",
126-
inputStructure.accept(new QueryMemberSerVisitor(context, "input", Format.DATE_TIME)));
127-
128124
// Set the form encoded string.
129125
writer.openBlock("body = buildFormUrlencodedString({", "});", () -> {
130-
writer.write("...entries,");
126+
// Gather all the explicit input entries.
127+
writer.write("...$L,",
128+
inputStructure.accept(new QueryMemberSerVisitor(context, "input", Format.DATE_TIME)));
131129
// Set the protocol required values.
132130
writer.write("Action: $S,", operation.getId().getName());
133131
writer.write("Version: $S,", context.getService().getVersion());

codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AwsQuery.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,11 @@ protected void serializeInputDocument(
121121
) {
122122
TypeScriptWriter writer = context.getWriter();
123123

124-
// Gather all the explicit input entries.
125-
writer.write("const entries = $L;",
126-
inputStructure.accept(new QueryMemberSerVisitor(context, "input", Format.DATE_TIME)));
127-
128124
// Set the form encoded string.
129125
writer.openBlock("body = buildFormUrlencodedString({", "});", () -> {
130-
writer.write("...entries,");
126+
// Gather all the explicit input entries.
127+
writer.write("...$L,",
128+
inputStructure.accept(new QueryMemberSerVisitor(context, "input", Format.DATE_TIME)));
131129
// Set the protocol required values.
132130
writer.write("Action: $S,", operation.getId().getName());
133131
writer.write("Version: $S,", context.getService().getVersion());

0 commit comments

Comments
 (0)