Skip to content

Commit 07cfdbe

Browse files
authored
fix(protocol-test): compare xml payload with outmost node (#433)
1 parent aabd650 commit 07cfdbe

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,14 @@ public DocumentMemberSerVisitor(
8888
this.defaultTimestampFormat = defaultTimestampFormat;
8989
}
9090

91+
/**
92+
* @return the member this visitor is being run against. Used to discover member-applied
93+
* traits, such as @xmlName. Can be, and defaults, to, null.
94+
*/
95+
protected MemberShape getMemberShape() {
96+
return null;
97+
}
98+
9199
/**
92100
* Gets the generation context.
93101
*

smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/protocol-test-xml-stub.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const compareEquivalentXmlBodies = (
2424
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
2525
delete parsedObjToReturn[textNodeName];
2626
}
27-
return parsedObjToReturn;
27+
return parsedObj;
2828
};
2929

3030
const expectedParts = parseXmlBody(expectedBody);

0 commit comments

Comments
 (0)