Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The root key is incorrect when encoding shapes to XML #711

Closed
epau opened this issue Nov 15, 2022 · 1 comment
Closed

The root key is incorrect when encoding shapes to XML #711

epau opened this issue Nov 15, 2022 · 1 comment
Assignees
Labels
bug This issue is a bug.
Milestone

Comments

@epau
Copy link
Contributor

epau commented Nov 15, 2022

Describe the bug

When we encode shapes to xml, we're currently producing the wrong root key.
There are two culprits.

  1. The corresponding swift structs created have an Input suffix added to their name
  2. 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 epau added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 15, 2022
@epau epau added this to the GA milestone Nov 15, 2022
@epau epau changed the title The root key in is incorrect when encoding shapes to XML The root key is incorrect when encoding shapes to XML Nov 16, 2022
@epau epau self-assigned this Nov 21, 2022
@epau epau removed the needs-triage This issue or PR still needs to be triaged. label Dec 5, 2022
@epau
Copy link
Contributor Author

epau commented Dec 21, 2022

Released in 0.7.0

@epau epau closed this as completed Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
None yet
Development

No branches or pull requests

1 participant