Skip to content

Commit a84afb0

Browse files
authored
fix: write undefined JSON RPC input body (#2075)
1 parent 23e48de commit a84afb0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

+8
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,14 @@ private DocumentMemberSerVisitor getMemberSerVisitor(GenerationContext context,
107107
return new JsonMemberSerVisitor(context, dataSource, getDocumentTimestampFormat());
108108
}
109109

110+
@Override
111+
protected boolean writeUndefinedInputBody(GenerationContext context, OperationShape operation) {
112+
TypeScriptWriter writer = context.getWriter();
113+
114+
writer.write("const body = '{}';");
115+
return true;
116+
}
117+
110118
@Override
111119
protected void writeErrorCodeParser(GenerationContext context) {
112120
TypeScriptWriter writer = context.getWriter();

0 commit comments

Comments
 (0)