Skip to content

Commit 14ad7c2

Browse files
adamthom-amznsrchase
authored andcommitted
Fix the generation of collections of documents in protocol tests
smithy-lang/smithy#1097 adds a protocol test for sets of documents and without this change the generated tests are invalid, as they are missing the separating commas that other types receive.
1 parent 0756465 commit 14ad7c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@ public Void numberNode(NumberNode node) {
10341034
public Void objectNode(ObjectNode node) {
10351035
// Short circuit document types, as the direct value is what we want.
10361036
if (workingShape.isDocumentShape()) {
1037-
writer.writeInline(Node.prettyPrintJson(node));
1037+
writer.writeInline(Node.prettyPrintJson(node)).writeInline(",");
10381038
return null;
10391039
}
10401040

@@ -1256,7 +1256,7 @@ public Void numberNode(NumberNode node) {
12561256
public Void objectNode(ObjectNode node) {
12571257
// Short circuit document types, as the direct value is what we want.
12581258
if (workingShape.isDocumentShape()) {
1259-
writer.writeInline(Node.prettyPrintJson(node));
1259+
writer.writeInline(Node.prettyPrintJson(node)).writeInline(",");
12601260
return null;
12611261
}
12621262

0 commit comments

Comments
 (0)