Skip to content

Commit e186605

Browse files
authored
fix(server-protocol-tests): fix codegen for server-protocol-tests (#577)
1 parent ba8c163 commit e186605

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

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

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import java.util.Objects;
2727
import java.util.Optional;
2828
import java.util.Set;
29-
import java.util.TreeMap;
3029
import java.util.TreeSet;
3130
import java.util.function.Consumer;
3231
import java.util.logging.Logger;
@@ -1662,15 +1661,7 @@ private void generateOperationRequestDeserializer(
16621661
handleContentType(context, operation, bindingIndex);
16631662
handleAccept(context, operation, bindingIndex);
16641663
// Start deserializing the response.
1665-
writer.openBlock("const contents: $T = {", "};", inputType, () -> {
1666-
// Only set a type and the members if we have output.
1667-
operation.getInput().ifPresent(shapeId -> {
1668-
// Set all the members to undefined to meet type constraints.
1669-
StructureShape target = model.expectShape(shapeId).asStructureShape().get();
1670-
new TreeMap<>(target.getAllMembers())
1671-
.forEach((memberName, memberShape) -> writer.write(
1672-
"$L: undefined,", memberName));
1673-
});
1664+
writer.openBlock("const contents: any = map({", "});", () -> {
16741665
readRequestHeaders(context, operation, bindingIndex, "output");
16751666
});
16761667
readQueryString(context, operation, bindingIndex);

0 commit comments

Comments
 (0)