Skip to content

Commit 6ffb17d

Browse files
authored
fix: deserialize whitespace protocol codegen test (#279)
1 parent fd7d5c9 commit 6ffb17d

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/restxml/AWSHttpProtocolRestXMLCustomizations.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ class AWSHttpProtocolRestXMLCustomizations : AWSHttpProtocolCustomizations() {
1515
// TODO: Subject to change if Foundation dependency is removed
1616
requestEncoderOptions["dateEncodingStrategy"] = ".secondsSince1970"
1717
responseDecoderOptions["dateDecodingStrategy"] = ".secondsSince1970"
18+
responseDecoderOptions["trimValueWhitespaces"] = "false"
19+
responseDecoderOptions["removeWhitespaceElements"] = "true"
1820
properties.add(AWSHttpRequestXMLEncoder(requestEncoderOptions))
1921
properties.add(AWSHttpResponseXMLDecoder(responseDecoderOptions))
2022
return properties

codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/restxml/RestXmlProtocolGenerator.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,14 @@ class RestXmlProtocolGenerator : AWSHttpBindingProtocolGenerator() {
6363
}
6464

6565
override fun generateProtocolUnitTests(ctx: ProtocolGenerator.GenerationContext): Int {
66-
val ignoredTests = setOf(
67-
// FIXME - escaped strings not fully supported in rest xml
68-
"SimpleScalarPropertiesComplexEscapes"
69-
)
7066
return HttpProtocolTestGenerator(
7167
ctx,
7268
requestTestBuilder,
7369
responseTestBuilder,
7470
errorTestBuilder,
7571
httpProtocolCustomizable,
7672
serdeContext,
77-
ignoredTests
73+
setOf()
7874
).generateProtocolTests()
7975
}
8076
}

0 commit comments

Comments
 (0)