Skip to content

Commit

Permalink
Split input and output shapes for rest-xml tests
Browse files Browse the repository at this point in the history
  • Loading branch information
srchase committed Dec 7, 2023
1 parent d4a9aa0 commit 327734f
Show file tree
Hide file tree
Showing 6 changed files with 271 additions and 249 deletions.
25 changes: 13 additions & 12 deletions smithy-aws-protocol-tests/model/restXml/document-lists.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ use smithy.test#httpResponseTests
@idempotent
@http(uri: "/XmlLists", method: "PUT")
operation XmlLists {
input: XmlListsInputOutput,
output: XmlListsInputOutput,
input := with [XmlListsInputOutput] {}
output := with [XmlListsInputOutput] {}
}

apply XmlLists @httpRequestTests([
Expand All @@ -45,7 +45,7 @@ apply XmlLists @httpRequestTests([
method: "PUT",
uri: "/XmlLists",
body: """
<XmlListsInputOutput>
<XmlListsRequest>
<stringList>
<member>foo</member>
<member>bar</member>
Expand Down Expand Up @@ -110,7 +110,7 @@ apply XmlLists @httpRequestTests([
<value>7</value>
<other>8</other>
</flattenedStructureList>
</XmlListsInputOutput>
</XmlListsRequest>
""",
bodyMediaType: "application/xml",
headers: {
Expand Down Expand Up @@ -159,7 +159,7 @@ apply XmlLists @httpResponseTests([
protocol: restXml,
code: 200,
body: """
<XmlListsInputOutput>
<XmlListsResponse>
<stringList>
<member>foo</member>
<member>bar</member>
Expand Down Expand Up @@ -228,7 +228,7 @@ apply XmlLists @httpResponseTests([
<value>7</value>
<other>8</other>
</flattenedStructureList>
</XmlListsInputOutput>
</XmlListsResponse>
""",
bodyMediaType: "application/xml",
headers: {
Expand Down Expand Up @@ -276,8 +276,8 @@ apply XmlLists @httpResponseTests([
@http(uri: "/XmlEmptyLists", method: "PUT")
@tags(["client-only"])
operation XmlEmptyLists {
input: XmlListsInputOutput,
output: XmlListsInputOutput,
input := with [XmlListsInputOutput] {}
output := with [XmlListsInputOutput] {}
}

apply XmlEmptyLists @httpRequestTests([
Expand All @@ -288,10 +288,10 @@ apply XmlEmptyLists @httpRequestTests([
method: "PUT",
uri: "/XmlEmptyLists",
body: """
<XmlListsInputOutput>
<XmlEmptyListsRequest>
<stringList></stringList>
<stringSet></stringSet>
</XmlListsInputOutput>
</XmlEmptyListsRequest>
""",
bodyMediaType: "application/xml",
headers: {
Expand All @@ -312,10 +312,10 @@ apply XmlEmptyLists @httpResponseTests([
protocol: restXml,
code: 200,
body: """
<XmlListsInputOutput>
<XmlEmptyListsResponse>
<stringList/>
<stringSet></stringSet>
</XmlListsInputOutput>
</XmlEmptyListsResponse>
""",
bodyMediaType: "application/xml",
headers: {
Expand All @@ -329,6 +329,7 @@ apply XmlEmptyLists @httpResponseTests([
}
])

@mixin
structure XmlListsInputOutput {
stringList: StringList,

Expand Down
Loading

0 comments on commit 327734f

Please sign in to comment.