Skip to content

Commit 611729d

Browse files
committed
add restXml test for flattened list of structures
1 parent 336aa91 commit 611729d

File tree

1 file changed

+41
-1
lines changed

1 file changed

+41
-1
lines changed

smithy-aws-protocol-tests/model/restXml/document-lists.smithy

+41-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ use smithy.test#httpResponseTests
2828
/// 6. Flattened XML lists with @xmlName.
2929
/// 7. Flattened XML lists with @xmlNamespace.
3030
/// 8. Lists of structures.
31+
/// 9. Flattened XML list of structures
3132
@idempotent
3233
@http(uri: "/XmlLists", method: "PUT")
3334
operation XmlLists {
@@ -96,6 +97,14 @@ apply XmlLists @httpRequestTests([
9697
<other>4</other>
9798
</item>
9899
</myStructureList>
100+
<flattenedStructureList>
101+
<value>5</value>
102+
<other>6</other>
103+
</flattenedStructureList>
104+
<flattenedStructureList>
105+
<value>7</value>
106+
<other>8</other>
107+
</flattenedStructureList>
99108
</XmlListsInputOutput>
100109
""",
101110
bodyMediaType: "application/xml",
@@ -122,6 +131,16 @@ apply XmlLists @httpRequestTests([
122131
a: "3",
123132
b: "4",
124133
}
134+
],
135+
flattenedStructureList: [
136+
{
137+
a: "5",
138+
b: "6",
139+
},
140+
{
141+
a: "7",
142+
b: "8",
143+
}
125144
]
126145
}
127146
}
@@ -191,6 +210,14 @@ apply XmlLists @httpResponseTests([
191210
<other>4</other>
192211
</item>
193212
</myStructureList>
213+
<flattenedStructureList>
214+
<value>5</value>
215+
<other>6</other>
216+
</flattenedStructureList>
217+
<flattenedStructureList>
218+
<value>7</value>
219+
<other>8</other>
220+
</flattenedStructureList>
194221
</XmlListsInputOutput>
195222
""",
196223
bodyMediaType: "application/xml",
@@ -219,6 +246,16 @@ apply XmlLists @httpResponseTests([
219246
a: "3",
220247
b: "4",
221248
}
249+
],
250+
flattenedStructureList: [
251+
{
252+
a: "5",
253+
b: "6",
254+
},
255+
{
256+
a: "7",
257+
b: "8",
258+
}
222259
]
223260
}
224261
}
@@ -321,7 +358,10 @@ structure XmlListsInputOutput {
321358
flattenedListWithNamespace: ListWithNamespace,
322359

323360
@xmlName("myStructureList")
324-
structureList: StructureList
361+
structureList: StructureList,
362+
363+
@xmlFlattened
364+
flattenedStructureList: StructureList
325365
}
326366

327367
list RenamedListMembers {

0 commit comments

Comments
 (0)