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

Request to add example of wrapped map with namespace in RestXML #768

Closed
wooj2 opened this issue Apr 8, 2021 · 0 comments · Fixed by #1909
Closed

Request to add example of wrapped map with namespace in RestXML #768

wooj2 opened this issue Apr 8, 2021 · 0 comments · Fixed by #1909
Labels
documentation This is a problem with documentation. protocol-test New protocol tests are needed

Comments

@wooj2
Copy link
Contributor

wooj2 commented Apr 8, 2021

Hi,

I noticed that there is a pretty clear example of how to encode flattened xml maps with namespaces located here, but there doesn't seem to be one for wrapped maps.

I am guessing that if we were to have a similar test for a non-xmlFlattened ( or wrapped) map, it would look like the following (but a little unclear, so please help confirm my understanding)

structure WrappedXmlMapWithXmlNamespaceOutput {
    @xmlName("KVP")
    @xmlNamespace(uri: "https://the-member.example.com")
    myMap: WrappedXmlMapWithXmlNamespaceOutputMap,
}

map WrappedXmlMapWithXmlNamespaceOutputMap {
    @xmlName("K")
    @xmlNamespace(uri: "https://the-key.example.com")
    key: String,

    @xmlName("V")
    @xmlNamespace(uri: "https://the-value.example.com")
    value: String,
}

And given the same setup, the expected body for would be:

        body: """
              <WrappedXmlMapWithXmlNamespaceOutput>
                  <KVP xmlns="https://the-member.example.com">
                      <entry>
                          <K xmlns="https://the-key.example.com">a</K>
                          <V xmlns="https://the-value.example.com">A</V>
                      </entry>
                      <entry>
                          <K xmlns="https://the-key.example.com">b</K>
                          <V xmlns="https://the-value.example.com">B</V>
                      </entry>
                  </KVP>
              </WrappedXmlMapWithXmlNamespaceOutput>""
  1. Note that we've added the <entry> tag since it is not flattened. Is this this encoded xml correct?
  2. Can someone please confirm that there is no way to add a namespace to the entry tag?
@JordonPhillips JordonPhillips added the documentation This is a problem with documentation. label Apr 20, 2021
@mtdowling mtdowling added the protocol-test New protocol tests are needed label May 3, 2021
@github-actions github-actions bot added the closing-soon This issue will automatically close in 7 days unless further comments are made. label Aug 19, 2023
@jvschneid jvschneid removed the closing-soon This issue will automatically close in 7 days unless further comments are made. label Aug 21, 2023
@smithy-lang smithy-lang deleted a comment from github-actions bot Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation. protocol-test New protocol tests are needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants