The root key in is incorrect when encoding shapes to XML
Closed this issue · 1 comments
epau commented
Describe the bug
When we encode shapes to xml, we're currently producing the wrong root key.
There are two culprits.
- The corresponding swift structs created have an
Input
suffix added to their name - We ignore the xmlName trait on the top level structure
Expected Behavior
Given the following smithy spec:
structure Foo {
value: String
}
@xmlName("BarStruct")
structure Bar {
value: String
}
We'd expect the encoded xml to look like the following:
<Foo><value></value></Foo>
<BarStruct><value></value></BarStruct>
Current Behavior
Given the same smithy spec as above, the current encoded xml looks like the following:
<FooInput><value></value></FooInput>
<BarInput><value></value></BarInput>
Reproduction Steps
N/A
Possible Solution
No response
Additional Information/Context
No response
AWS SWIFT SDK version used
0.5.0
Compiler and Version used
swift-driver version: 1.62.8 Apple Swift version 5.7 (swiftlang-5.7.0.127.4 clang-1400.0.29.50)
Operating System and version
12.6.1
epau commented
Closing in favor of awslabs/aws-sdk-swift#711