Skip to content

Commit 18738ad

Browse files
committed
chore: remove population of __type from CodeGen
1 parent ead3816 commit 18738ad

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ protected void deserializeStructure(GenerationContext context, StructureShape sh
9898
// Use a TreeMap to sort the members.
9999
Map<String, MemberShape> members = new TreeMap<>(shape.getAllMembers());
100100
writer.openBlock("return {", "} as any;", () -> {
101-
writer.write("__type: $S,", shape.getId().getName());
102101
// Set all the members to undefined to meet type constraints.
103102
members.forEach((memberName, memberShape) -> {
104103
// Use the jsonName trait value if present, otherwise use the member name.

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ protected void deserializeStructure(GenerationContext context, StructureShape sh
119119
// Prepare the document contents structure.
120120
Map<String, MemberShape> members = shape.getAllMembers();
121121
writer.openBlock("let contents: any = {", "};", () -> {
122-
writer.write("__type: $S,", shape.getId().getName());
123122
// Set all the members to undefined to meet type constraints.
124123
members.forEach((memberName, memberShape) -> writer.write("$L: undefined,", memberName));
125124
});

0 commit comments

Comments
 (0)