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

add restXml tests for flattened list of structures #781

Merged
merged 1 commit into from
May 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 41 additions & 1 deletion smithy-aws-protocol-tests/model/restXml/document-lists.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ use smithy.test#httpResponseTests
/// 6. Flattened XML lists with @xmlName.
/// 7. Flattened XML lists with @xmlNamespace.
/// 8. Lists of structures.
/// 9. Flattened XML list of structures
@idempotent
@http(uri: "/XmlLists", method: "PUT")
operation XmlLists {
Expand Down Expand Up @@ -96,6 +97,14 @@ apply XmlLists @httpRequestTests([
<other>4</other>
</item>
</myStructureList>
<flattenedStructureList>
<value>5</value>
<other>6</other>
</flattenedStructureList>
<flattenedStructureList>
<value>7</value>
<other>8</other>
</flattenedStructureList>
</XmlListsInputOutput>
""",
bodyMediaType: "application/xml",
Expand All @@ -122,6 +131,16 @@ apply XmlLists @httpRequestTests([
a: "3",
b: "4",
}
],
flattenedStructureList: [
{
a: "5",
b: "6",
},
{
a: "7",
b: "8",
}
]
}
}
Expand Down Expand Up @@ -191,6 +210,14 @@ apply XmlLists @httpResponseTests([
<other>4</other>
</item>
</myStructureList>
<flattenedStructureList>
<value>5</value>
<other>6</other>
</flattenedStructureList>
<flattenedStructureList>
<value>7</value>
<other>8</other>
</flattenedStructureList>
</XmlListsInputOutput>
""",
bodyMediaType: "application/xml",
Expand Down Expand Up @@ -219,6 +246,16 @@ apply XmlLists @httpResponseTests([
a: "3",
b: "4",
}
],
flattenedStructureList: [
{
a: "5",
b: "6",
},
{
a: "7",
b: "8",
}
]
}
}
Expand Down Expand Up @@ -321,7 +358,10 @@ structure XmlListsInputOutput {
flattenedListWithNamespace: ListWithNamespace,

@xmlName("myStructureList")
structureList: StructureList
structureList: StructureList,

@xmlFlattened
flattenedStructureList: StructureList
}

list RenamedListMembers {
Expand Down