Skip to content

Commit 25d0208

Browse files
Chase Coalwelltrivikr
authored andcommitted
fix: remove wrapped body (#744)
1 parent 82bc0a8 commit 25d0208

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,7 @@ protected void serializeInputDocument(
9595
) {
9696
TypeScriptWriter writer = context.getWriter();
9797

98-
// Input documents are wrapped in an input shape named wrapper, build that.
99-
writer.openBlock("const wrappedBody: any = {", "};", () -> {
100-
writer.write("$L: $L,", inputStructure.getId().getName(),
101-
inputStructure.accept(getMemberSerVisitor(context, "input")));
102-
});
103-
writer.write("body = JSON.stringify(wrappedBody);");
98+
writer.write("body = JSON.stringify($L);", inputStructure.accept(getMemberSerVisitor(context, "input")));
10499
}
105100

106101
private DocumentMemberSerVisitor getMemberSerVisitor(GenerationContext context, String dataSource) {

0 commit comments

Comments
 (0)