diff --git a/smithy-aws-protocol-tests/model/restXml/document-lists.smithy b/smithy-aws-protocol-tests/model/restXml/document-lists.smithy
index e5fb3fae141..154a5a8b517 100644
--- a/smithy-aws-protocol-tests/model/restXml/document-lists.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/document-lists.smithy
@@ -33,8 +33,8 @@ use smithy.test#httpResponseTests
@idempotent
@http(uri: "/XmlLists", method: "PUT")
operation XmlLists {
- input: XmlListsInputOutput,
- output: XmlListsInputOutput,
+ input: XmlListsRequest,
+ output: XmlListsResponse,
}
apply XmlLists @httpRequestTests([
@@ -45,7 +45,7 @@ apply XmlLists @httpRequestTests([
method: "PUT",
uri: "/XmlLists",
body: """
-
+
foo
bar
@@ -110,7 +110,7 @@ apply XmlLists @httpRequestTests([
7
8
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -159,7 +159,7 @@ apply XmlLists @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
foo
bar
@@ -228,7 +228,7 @@ apply XmlLists @httpResponseTests([
7
8
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -276,8 +276,8 @@ apply XmlLists @httpResponseTests([
@http(uri: "/XmlEmptyLists", method: "PUT")
@tags(["client-only"])
operation XmlEmptyLists {
- input: XmlListsInputOutput,
- output: XmlListsInputOutput,
+ input: XmlEmptyListsRequest,
+ output: XmlEmptyListsResponse,
}
apply XmlEmptyLists @httpRequestTests([
@@ -288,10 +288,10 @@ apply XmlEmptyLists @httpRequestTests([
method: "PUT",
uri: "/XmlEmptyLists",
body: """
-
+
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -312,10 +312,10 @@ apply XmlEmptyLists @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -329,6 +329,7 @@ apply XmlEmptyLists @httpResponseTests([
}
])
+@mixin
structure XmlListsInputOutput {
stringList: StringList,
@@ -377,6 +378,14 @@ structure XmlListsInputOutput {
flattenedStructureList: StructureList
}
+structure XmlListsRequest with [XmlListsInputOutput] {}
+
+structure XmlListsResponse with [XmlListsInputOutput] {}
+
+structure XmlEmptyListsRequest with [XmlListsInputOutput] {}
+
+structure XmlEmptyListsResponse with [XmlListsInputOutput] {}
+
list RenamedListMembers {
@xmlName("item")
member: String,
diff --git a/smithy-aws-protocol-tests/model/restXml/document-maps.smithy b/smithy-aws-protocol-tests/model/restXml/document-maps.smithy
index 9b479336f24..b65d4c326ea 100644
--- a/smithy-aws-protocol-tests/model/restXml/document-maps.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/document-maps.smithy
@@ -13,8 +13,8 @@ use smithy.test#httpResponseTests
/// The example tests basic map serialization.
@http(uri: "/XmlMaps", method: "POST")
operation XmlMaps {
- input: XmlMapsInputOutput,
- output: XmlMapsInputOutput
+ input: XmlMapsRequest,
+ output: XmlMapsResponse
}
apply XmlMaps @httpRequestTests([
@@ -25,7 +25,7 @@ apply XmlMaps @httpRequestTests([
method: "POST",
uri: "/XmlMaps",
body: """
-
+
foo
@@ -40,7 +40,7 @@ apply XmlMaps @httpRequestTests([
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -66,7 +66,7 @@ apply XmlMaps @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
foo
@@ -81,7 +81,7 @@ apply XmlMaps @httpResponseTests([
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -100,11 +100,19 @@ apply XmlMaps @httpResponseTests([
}
])
+structure XmlMapsRequest {
+ myMap: XmlMapsInputOutputMap,
+}
+
+structure XmlMapsResponse {
+ myMap: XmlMapsInputOutputMap,
+}
+
@http(uri: "/XmlEmptyMaps", method: "POST")
@tags(["client-only"])
operation XmlEmptyMaps {
- input: XmlMapsInputOutput,
- output: XmlMapsInputOutput
+ input: XmlEmptyMapsRequest,
+ output: XmlEmptyMapsResponse
}
apply XmlEmptyMaps @httpRequestTests([
@@ -115,9 +123,9 @@ apply XmlEmptyMaps @httpRequestTests([
method: "POST",
uri: "/XmlEmptyMaps",
body: """
-
+
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -137,9 +145,9 @@ apply XmlEmptyMaps @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -156,9 +164,9 @@ apply XmlEmptyMaps @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -171,7 +179,11 @@ apply XmlEmptyMaps @httpResponseTests([
}
])
-structure XmlMapsInputOutput {
+structure XmlEmptyMapsRequest {
+ myMap: XmlMapsInputOutputMap,
+}
+
+structure XmlEmptyMapsResponse {
myMap: XmlMapsInputOutputMap,
}
@@ -183,8 +195,8 @@ map XmlMapsInputOutputMap {
// This example tests maps with @xmlName on members.
@http(uri: "/XmlMapsXmlName", method: "POST")
operation XmlMapsXmlName {
- input: XmlMapsXmlNameInputOutput,
- output: XmlMapsXmlNameInputOutput
+ input: XmlMapsXmlNameRequest,
+ output: XmlMapsXmlNameResponse
}
apply XmlMapsXmlName @httpRequestTests([
@@ -195,7 +207,7 @@ apply XmlMapsXmlName @httpRequestTests([
method: "POST",
uri: "/XmlMapsXmlName",
body: """
-
+
foo
@@ -210,7 +222,7 @@ apply XmlMapsXmlName @httpRequestTests([
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -236,7 +248,7 @@ apply XmlMapsXmlName @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
foo
@@ -251,7 +263,7 @@ apply XmlMapsXmlName @httpResponseTests([
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -270,7 +282,11 @@ apply XmlMapsXmlName @httpResponseTests([
}
])
-structure XmlMapsXmlNameInputOutput {
+structure XmlMapsXmlNameRequest {
+ myMap: XmlMapsXmlNameInputOutputMap,
+}
+
+structure XmlMapsXmlNameResponse {
myMap: XmlMapsXmlNameInputOutputMap,
}
@@ -285,8 +301,8 @@ map XmlMapsXmlNameInputOutputMap {
/// Flattened maps
@http(uri: "/FlattenedXmlMap", method: "POST")
operation FlattenedXmlMap {
- input: FlattenedXmlMapInputOutput,
- output: FlattenedXmlMapInputOutput
+ input: FlattenedXmlMapRequest,
+ output: FlattenedXmlMapResponse
}
apply FlattenedXmlMap @httpRequestTests([
@@ -297,7 +313,7 @@ apply FlattenedXmlMap @httpRequestTests([
method: "POST",
uri: "/FlattenedXmlMap",
body: """
-
+
foo
Foo
@@ -306,7 +322,7 @@ apply FlattenedXmlMap @httpRequestTests([
baz
Baz
- """,
+ """,
bodyMediaType: "application/xml",
headers: {
"Content-Type": "application/xml"
@@ -327,7 +343,7 @@ apply FlattenedXmlMap @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
foo
Foo
@@ -336,7 +352,7 @@ apply FlattenedXmlMap @httpResponseTests([
baz
Baz
- """,
+ """,
bodyMediaType: "application/xml",
headers: {
"Content-Type": "application/xml"
@@ -350,7 +366,12 @@ apply FlattenedXmlMap @httpResponseTests([
}
])
-structure FlattenedXmlMapInputOutput {
+structure FlattenedXmlMapRequest {
+ @xmlFlattened
+ myMap: FooEnumMap,
+}
+
+structure FlattenedXmlMapResponse {
@xmlFlattened
myMap: FooEnumMap,
}
@@ -358,8 +379,8 @@ structure FlattenedXmlMapInputOutput {
/// Flattened maps with @xmlName
@http(uri: "/FlattenedXmlMapWithXmlName", method: "POST")
operation FlattenedXmlMapWithXmlName {
- input: FlattenedXmlMapWithXmlNameInputOutput,
- output: FlattenedXmlMapWithXmlNameInputOutput
+ input: FlattenedXmlMapWithXmlNameRequest,
+ output: FlattenedXmlMapWithXmlNameRequest
}
apply FlattenedXmlMapWithXmlName @httpRequestTests([
@@ -370,7 +391,7 @@ apply FlattenedXmlMapWithXmlName @httpRequestTests([
method: "POST",
uri: "/FlattenedXmlMapWithXmlName",
body: """
-
+
a
A
@@ -379,7 +400,7 @@ apply FlattenedXmlMapWithXmlName @httpRequestTests([
b
B
- """,
+ """,
bodyMediaType: "application/xml",
headers: {
"Content-Type": "application/xml"
@@ -400,7 +421,7 @@ apply FlattenedXmlMapWithXmlName @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
a
A
@@ -409,7 +430,7 @@ apply FlattenedXmlMapWithXmlName @httpResponseTests([
b
B
- """,
+ """,
bodyMediaType: "application/xml",
headers: {
"Content-Type": "application/xml"
@@ -423,7 +444,13 @@ apply FlattenedXmlMapWithXmlName @httpResponseTests([
}
])
-structure FlattenedXmlMapWithXmlNameInputOutput {
+structure FlattenedXmlMapWithXmlNameRequest {
+ @xmlFlattened
+ @xmlName("KVP")
+ myMap: FlattenedXmlMapWithXmlNameInputOutputMap,
+}
+
+structure FlattenedXmlMapWithXmlNameResponse {
@xmlFlattened
@xmlName("KVP")
myMap: FlattenedXmlMapWithXmlNameInputOutputMap,
@@ -492,11 +519,18 @@ map FlattenedXmlMapWithXmlNamespaceOutputMap {
@http(uri: "/NestedXmlMaps", method: "POST")
operation NestedXmlMaps {
- input: NestedXmlMapsInputOutput,
- output: NestedXmlMapsInputOutput,
+ input: NestedXmlMapsRequest,
+ output: NestedXmlMapsResponse,
+}
+
+structure NestedXmlMapsRequest {
+ nestedMap: NestedMap,
+
+ @xmlFlattened
+ flatNestedMap: NestedMap,
}
-structure NestedXmlMapsInputOutput {
+structure NestedXmlMapsResponse {
nestedMap: NestedMap,
@xmlFlattened
@@ -516,7 +550,7 @@ apply NestedXmlMaps @httpRequestTests([
method: "POST",
uri: "/NestedXmlMaps",
body: """
-
+
foo
@@ -528,7 +562,7 @@ apply NestedXmlMaps @httpRequestTests([
- """,
+ """,
bodyMediaType: "application/xml",
headers: {
"Content-Type": "application/xml",
@@ -550,7 +584,7 @@ apply NestedXmlMaps @httpRequestTests([
method: "POST",
uri: "/NestedXmlMaps",
body: """
-
+
foo
@@ -560,7 +594,7 @@ apply NestedXmlMaps @httpRequestTests([
- """,
+ """,
bodyMediaType: "application/xml",
headers: {
"Content-Type": "application/xml",
@@ -582,7 +616,7 @@ apply NestedXmlMaps @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
foo
@@ -594,7 +628,7 @@ apply NestedXmlMaps @httpResponseTests([
- """,
+ """,
bodyMediaType: "application/xml",
headers: {
"Content-Type": "application/xml",
@@ -615,7 +649,7 @@ apply NestedXmlMaps @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
foo
@@ -625,7 +659,7 @@ apply NestedXmlMaps @httpResponseTests([
- """,
+ """,
bodyMediaType: "application/xml",
headers: {
"Content-Type": "application/xml",
@@ -643,8 +677,8 @@ apply NestedXmlMaps @httpResponseTests([
/// Maps with @xmlNamespace and @xmlName
@http(uri: "/XmlMapWithXmlNamespace", method: "POST")
operation XmlMapWithXmlNamespace {
- input: XmlMapWithXmlNamespaceInputOutput
- output: XmlMapWithXmlNamespaceInputOutput
+ input: XmlMapWithXmlNamespaceRequest
+ output: XmlMapWithXmlNamespaceResponse
}
apply XmlMapWithXmlNamespace @httpRequestTests([
@@ -655,7 +689,7 @@ apply XmlMapWithXmlNamespace @httpRequestTests([
method: "POST",
uri: "/XmlMapWithXmlNamespace",
body: """
-
+
a
@@ -666,7 +700,7 @@ apply XmlMapWithXmlNamespace @httpRequestTests([
B
- """,
+ """,
bodyMediaType: "application/xml",
headers: {
"Content-Type": "application/xml"
@@ -687,7 +721,7 @@ apply XmlMapWithXmlNamespace @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
a
@@ -698,7 +732,7 @@ apply XmlMapWithXmlNamespace @httpResponseTests([
B
- """,
+ """,
bodyMediaType: "application/xml",
headers: {
"Content-Type": "application/xml"
@@ -712,7 +746,13 @@ apply XmlMapWithXmlNamespace @httpResponseTests([
}
])
-structure XmlMapWithXmlNamespaceInputOutput {
+structure XmlMapWithXmlNamespaceRequest {
+ @xmlName("KVP")
+ @xmlNamespace(uri: "https://the-member.example.com")
+ myMap: XmlMapWithXmlNamespaceInputOutputMap,
+}
+
+structure XmlMapWithXmlNamespaceResponse {
@xmlName("KVP")
@xmlNamespace(uri: "https://the-member.example.com")
myMap: XmlMapWithXmlNamespaceInputOutputMap,
diff --git a/smithy-aws-protocol-tests/model/restXml/document-structs.smithy b/smithy-aws-protocol-tests/model/restXml/document-structs.smithy
index e5697aec369..57cf2498282 100644
--- a/smithy-aws-protocol-tests/model/restXml/document-structs.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/document-structs.smithy
@@ -25,8 +25,8 @@ use smithy.test#httpResponseTests
@idempotent
@http(uri: "/SimpleScalarProperties", method: "PUT")
operation SimpleScalarProperties {
- input: SimpleScalarPropertiesInputOutput,
- output: SimpleScalarPropertiesInputOutput
+ input: SimpleScalarPropertiesRequest,
+ output: SimpleScalarPropertiesResponse
}
apply SimpleScalarProperties @httpRequestTests([
@@ -37,7 +37,7 @@ apply SimpleScalarProperties @httpRequestTests([
method: "PUT",
uri: "/SimpleScalarProperties",
body: """
-
+
string
true
false
@@ -47,7 +47,7 @@ apply SimpleScalarProperties @httpRequestTests([
4
5.5
6.5
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -74,9 +74,9 @@ apply SimpleScalarProperties @httpRequestTests([
method: "PUT",
uri: "/SimpleScalarProperties",
body: """
-
+
<string>
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -95,9 +95,9 @@ apply SimpleScalarProperties @httpRequestTests([
method: "PUT",
uri: "/SimpleScalarProperties",
body: """
-
+
string with white space
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -116,9 +116,9 @@ apply SimpleScalarProperties @httpRequestTests([
method: "PUT",
uri: "/SimpleScalarProperties",
body: """
-
+
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -137,10 +137,10 @@ apply SimpleScalarProperties @httpRequestTests([
method: "PUT",
uri: "/SimpleScalarProperties",
body: """
-
+
NaN
NaN
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -158,10 +158,10 @@ apply SimpleScalarProperties @httpRequestTests([
method: "PUT",
uri: "/SimpleScalarProperties",
body: """
-
+
Infinity
Infinity
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -179,10 +179,10 @@ apply SimpleScalarProperties @httpRequestTests([
method: "PUT",
uri: "/SimpleScalarProperties",
body: """
-
+
-Infinity
-Infinity
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -202,7 +202,7 @@ apply SimpleScalarProperties @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
string
true
false
@@ -212,7 +212,7 @@ apply SimpleScalarProperties @httpResponseTests([
4
5.5
6.5
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -245,9 +245,9 @@ apply SimpleScalarProperties @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
escaped data: <
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -266,9 +266,9 @@ apply SimpleScalarProperties @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
<string>
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -287,11 +287,11 @@ apply SimpleScalarProperties @httpResponseTests([
code: 200,
body: """
-
+
string
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -310,9 +310,9 @@ apply SimpleScalarProperties @httpResponseTests([
code: 200,
body: """
-
+
string with white space
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -331,9 +331,9 @@ apply SimpleScalarProperties @httpResponseTests([
code: 200,
body: """
-
+
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -351,10 +351,10 @@ apply SimpleScalarProperties @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
NaN
NaN
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -371,10 +371,10 @@ apply SimpleScalarProperties @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
Infinity
Infinity
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -391,10 +391,10 @@ apply SimpleScalarProperties @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
-Infinity
-Infinity
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -407,6 +407,7 @@ apply SimpleScalarProperties @httpResponseTests([
},
])
+@mixin
structure SimpleScalarPropertiesInputOutput {
@httpHeader("X-Foo")
foo: String,
@@ -424,13 +425,17 @@ structure SimpleScalarPropertiesInputOutput {
doubleValue: Double,
}
+structure SimpleScalarPropertiesRequest with [SimpleScalarPropertiesInputOutput] {}
+
+structure SimpleScalarPropertiesResponse with [SimpleScalarPropertiesInputOutput] {}
+
// This example serializes empty string in the top level XML document.
@idempotent
@http(uri: "/XmlEmptyStrings", method: "PUT")
@tags(["client-only"])
operation XmlEmptyStrings {
- input: XmlEmptyStringsInputOutput,
- output: XmlEmptyStringsInputOutput
+ input: XmlEmptyStringsRequest,
+ output: XmlEmptyStringsResponse
}
apply XmlEmptyStrings @httpRequestTests([
@@ -441,9 +446,9 @@ apply XmlEmptyStrings @httpRequestTests([
method: "PUT",
uri: "/XmlEmptyStrings",
body: """
-
+
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -463,9 +468,9 @@ apply XmlEmptyStrings @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -482,9 +487,9 @@ apply XmlEmptyStrings @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -497,15 +502,19 @@ apply XmlEmptyStrings @httpResponseTests([
}
])
-structure XmlEmptyStringsInputOutput {
+structure XmlEmptyStringsRequest {
+ emptyString: String
+}
+
+structure XmlEmptyStringsResponse {
emptyString: String
}
/// Blobs are base64 encoded
@http(uri: "/XmlBlobs", method: "POST")
operation XmlBlobs {
- input: XmlBlobsInputOutput,
- output: XmlBlobsInputOutput
+ input: XmlBlobsRequest,
+ output: XmlBlobsResponse
}
apply XmlBlobs @httpRequestTests([
@@ -516,9 +525,9 @@ apply XmlBlobs @httpRequestTests([
method: "POST",
uri: "/XmlBlobs",
body: """
-
+
dmFsdWU=
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -537,9 +546,9 @@ apply XmlBlobs @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
dmFsdWU=
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -555,8 +564,8 @@ apply XmlBlobs @httpResponseTests([
@http(uri: "/XmlEmptyBlobs", method: "POST")
@tags(["client-only"])
operation XmlEmptyBlobs {
- input: XmlBlobsInputOutput,
- output: XmlBlobsInputOutput
+ input: XmlBlobsRequest,
+ output: XmlBlobsResponse
}
apply XmlEmptyBlobs @httpResponseTests([
@@ -566,9 +575,9 @@ apply XmlEmptyBlobs @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -585,9 +594,9 @@ apply XmlEmptyBlobs @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -600,7 +609,11 @@ apply XmlEmptyBlobs @httpResponseTests([
}
])
-structure XmlBlobsInputOutput {
+structure XmlBlobsRequest {
+ data: Blob
+}
+
+structure XmlBlobsResponse {
data: Blob
}
@@ -609,8 +622,8 @@ structure XmlBlobsInputOutput {
/// values.
@http(uri: "/XmlTimestamps", method: "POST")
operation XmlTimestamps {
- input: XmlTimestampsInputOutput,
- output: XmlTimestampsInputOutput
+ input: XmlTimestampsRequest,
+ output: XmlTimestampsResponse
}
apply XmlTimestamps @httpRequestTests([
@@ -621,9 +634,9 @@ apply XmlTimestamps @httpRequestTests([
method: "POST",
uri: "/XmlTimestamps",
body: """
-
+
2014-04-29T18:30:38Z
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -640,9 +653,9 @@ apply XmlTimestamps @httpRequestTests([
method: "POST",
uri: "/XmlTimestamps",
body: """
-
+
2014-04-29T18:30:38Z
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -659,9 +672,9 @@ apply XmlTimestamps @httpRequestTests([
method: "POST",
uri: "/XmlTimestamps",
body: """
-
+
2014-04-29T18:30:38Z
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -678,9 +691,9 @@ apply XmlTimestamps @httpRequestTests([
method: "POST",
uri: "/XmlTimestamps",
body: """
-
+
1398796238
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -697,9 +710,9 @@ apply XmlTimestamps @httpRequestTests([
method: "POST",
uri: "/XmlTimestamps",
body: """
-
+
1398796238
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -716,9 +729,9 @@ apply XmlTimestamps @httpRequestTests([
method: "POST",
uri: "/XmlTimestamps",
body: """
-
+
Tue, 29 Apr 2014 18:30:38 GMT
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -735,9 +748,9 @@ apply XmlTimestamps @httpRequestTests([
method: "POST",
uri: "/XmlTimestamps",
body: """
-
+
Tue, 29 Apr 2014 18:30:38 GMT
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -756,9 +769,9 @@ apply XmlTimestamps @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
2014-04-29T18:30:38Z
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -774,9 +787,9 @@ apply XmlTimestamps @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
2014-04-29T18:30:38Z
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -792,9 +805,9 @@ apply XmlTimestamps @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
2014-04-29T18:30:38Z
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -810,9 +823,9 @@ apply XmlTimestamps @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
1398796238
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -828,9 +841,9 @@ apply XmlTimestamps @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
1398796238
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -846,9 +859,9 @@ apply XmlTimestamps @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
Tue, 29 Apr 2014 18:30:38 GMT
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -864,9 +877,9 @@ apply XmlTimestamps @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
Tue, 29 Apr 2014 18:30:38 GMT
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -878,6 +891,7 @@ apply XmlTimestamps @httpResponseTests([
},
])
+@mixin
structure XmlTimestampsInputOutput {
normal: Timestamp,
@@ -897,12 +911,16 @@ structure XmlTimestampsInputOutput {
httpDateOnTarget: HttpDate,
}
+structure XmlTimestampsRequest with [XmlTimestampsInputOutput] {}
+
+structure XmlTimestampsResponse with [XmlTimestampsInputOutput] {}
+
/// This example serializes enums as top level properties, in lists, sets, and maps.
@idempotent
@http(uri: "/XmlEnums", method: "PUT")
operation XmlEnums {
- input: XmlEnumsInputOutput,
- output: XmlEnumsInputOutput
+ input: XmlEnumsRequest,
+ output: XmlEnumsResponse
}
apply XmlEnums @httpRequestTests([
@@ -913,7 +931,7 @@ apply XmlEnums @httpRequestTests([
method: "PUT",
uri: "/XmlEnums",
body: """
-
+
Foo
0
1
@@ -935,7 +953,7 @@ apply XmlEnums @httpRequestTests([
0
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -962,7 +980,7 @@ apply XmlEnums @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
Foo
0
1
@@ -984,7 +1002,7 @@ apply XmlEnums @httpResponseTests([
0
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -1004,6 +1022,7 @@ apply XmlEnums @httpResponseTests([
}
])
+@mixin
structure XmlEnumsInputOutput {
fooEnum1: FooEnum,
fooEnum2: FooEnum,
@@ -1013,12 +1032,16 @@ structure XmlEnumsInputOutput {
fooEnumMap: FooEnumMap,
}
+structure XmlEnumsRequest with [XmlEnumsInputOutput] {}
+
+structure XmlEnumsResponse with [XmlEnumsInputOutput] {}
+
/// This example serializes enums as top level properties, in lists, sets, and maps.
@idempotent
@http(uri: "/XmlIntEnums", method: "PUT")
operation XmlIntEnums {
- input: XmlIntEnumsInputOutput,
- output: XmlIntEnumsInputOutput
+ input: XmlIntEnumsRequest,
+ output: XmlIntEnumsResponse
}
apply XmlIntEnums @httpRequestTests([
@@ -1029,7 +1052,7 @@ apply XmlIntEnums @httpRequestTests([
method: "PUT",
uri: "/XmlIntEnums",
body: """
-
+
1
2
3
@@ -1051,7 +1074,7 @@ apply XmlIntEnums @httpRequestTests([
2
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -1078,7 +1101,7 @@ apply XmlIntEnums @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
1
2
3
@@ -1100,7 +1123,7 @@ apply XmlIntEnums @httpResponseTests([
2
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -1120,6 +1143,7 @@ apply XmlIntEnums @httpResponseTests([
}
])
+@mixin
structure XmlIntEnumsInputOutput {
intEnum1: IntegerEnum,
intEnum2: IntegerEnum,
@@ -1129,12 +1153,16 @@ structure XmlIntEnumsInputOutput {
intEnumMap: IntegerEnumMap,
}
+structure XmlIntEnumsRequest with [XmlIntEnumsInputOutput] {}
+
+structure XmlIntEnumsResponse with [XmlIntEnumsInputOutput] {}
+
/// Recursive shapes
@idempotent
@http(uri: "/RecursiveShapes", method: "PUT")
operation RecursiveShapes {
- input: RecursiveShapesInputOutput,
- output: RecursiveShapesInputOutput
+ input: RecursiveShapesRequest,
+ output: RecursiveShapesResponse
}
apply RecursiveShapes @httpRequestTests([
@@ -1145,7 +1173,7 @@ apply RecursiveShapes @httpRequestTests([
method: "PUT",
uri: "/RecursiveShapes",
body: """
-
+
Foo1
@@ -1158,7 +1186,7 @@ apply RecursiveShapes @httpRequestTests([
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -1188,7 +1216,7 @@ apply RecursiveShapes @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
Foo1
@@ -1201,7 +1229,7 @@ apply RecursiveShapes @httpResponseTests([
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -1224,7 +1252,11 @@ apply RecursiveShapes @httpResponseTests([
}
])
-structure RecursiveShapesInputOutput {
+structure RecursiveShapesRequest {
+ nested: RecursiveShapesInputOutputNested1
+}
+
+structure RecursiveShapesResponse {
nested: RecursiveShapesInputOutputNested1
}
@@ -1241,8 +1273,8 @@ structure RecursiveShapesInputOutputNested2 {
// XML namespace
@http(uri: "/XmlNamespaces", method: "POST")
operation XmlNamespaces {
- input: XmlNamespacesInputOutput,
- output: XmlNamespacesInputOutput
+ input: XmlNamespacesRequest,
+ output: XmlNamespacesResponse
}
apply XmlNamespaces @httpRequestTests([
@@ -1253,7 +1285,7 @@ apply XmlNamespaces @httpRequestTests([
method: "POST",
uri: "/XmlNamespaces",
body: """
-
+
Foo
@@ -1261,7 +1293,7 @@ apply XmlNamespaces @httpRequestTests([
Baz
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -1286,7 +1318,7 @@ apply XmlNamespaces @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
Foo
@@ -1294,7 +1326,7 @@ apply XmlNamespaces @httpResponseTests([
Baz
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -1313,7 +1345,12 @@ apply XmlNamespaces @httpResponseTests([
])
@xmlNamespace(uri: "http://foo.com")
-structure XmlNamespacesInputOutput {
+structure XmlNamespacesRequest {
+ nested: XmlNamespaceNested
+}
+
+@xmlNamespace(uri: "http://foo.com")
+structure XmlNamespacesResponse {
nested: XmlNamespaceNested
}
diff --git a/smithy-aws-protocol-tests/model/restXml/document-unions.smithy b/smithy-aws-protocol-tests/model/restXml/document-unions.smithy
index d9cc39a3090..b68fcd78329 100644
--- a/smithy-aws-protocol-tests/model/restXml/document-unions.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/document-unions.smithy
@@ -14,8 +14,8 @@ use smithy.test#httpResponseTests
@idempotent
@http(uri: "/XmlUnions", method: "PUT")
operation XmlUnions {
- input: XmlUnionsInputOutput,
- output: XmlUnionsInputOutput
+ input: XmlUnionsRequest,
+ output: XmlUnionsResponse
}
apply XmlUnions @httpRequestTests([
@@ -26,7 +26,7 @@ apply XmlUnions @httpRequestTests([
method: "PUT",
uri: "/XmlUnions",
body: """
-
+
string
@@ -39,7 +39,7 @@ apply XmlUnions @httpRequestTests([
6.5
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -67,11 +67,11 @@ apply XmlUnions @httpRequestTests([
method: "PUT",
uri: "/XmlUnions",
body: """
-
+
some string
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -90,11 +90,11 @@ apply XmlUnions @httpRequestTests([
method: "PUT",
uri: "/XmlUnions",
body: """
-
+
true
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -113,13 +113,13 @@ apply XmlUnions @httpRequestTests([
method: "PUT",
uri: "/XmlUnions",
body: """
-
+
true
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -142,7 +142,7 @@ apply XmlUnions @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
string
@@ -155,7 +155,7 @@ apply XmlUnions @httpResponseTests([
6.5
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -182,11 +182,11 @@ apply XmlUnions @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
some string
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -204,11 +204,11 @@ apply XmlUnions @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
true
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -226,13 +226,13 @@ apply XmlUnions @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
true
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -248,7 +248,11 @@ apply XmlUnions @httpResponseTests([
},
])
-structure XmlUnionsInputOutput {
+structure XmlUnionsRequest {
+ unionValue: XmlUnionShape,
+}
+
+structure XmlUnionsResponse {
unionValue: XmlUnionShape,
}
diff --git a/smithy-aws-protocol-tests/model/restXml/document-xml-attributes.smithy b/smithy-aws-protocol-tests/model/restXml/document-xml-attributes.smithy
index bb8c800859a..8922fdc54f2 100644
--- a/smithy-aws-protocol-tests/model/restXml/document-xml-attributes.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/document-xml-attributes.smithy
@@ -12,8 +12,8 @@ use smithy.test#httpResponseTests
@idempotent
@http(uri: "/XmlAttributes", method: "PUT")
operation XmlAttributes {
- input: XmlAttributesInputOutput,
- output: XmlAttributesInputOutput
+ input: XmlAttributesRequest,
+ output: XmlAttributesResponse
}
apply XmlAttributes @httpRequestTests([
@@ -24,9 +24,9 @@ apply XmlAttributes @httpRequestTests([
method: "PUT",
uri: "/XmlAttributes",
body: """
-
+
hi
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -44,9 +44,9 @@ apply XmlAttributes @httpRequestTests([
method: "PUT",
uri: "/XmlAttributes",
body: """
-
+
hi
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -66,9 +66,9 @@ apply XmlAttributes @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
hi
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -81,6 +81,7 @@ apply XmlAttributes @httpResponseTests([
}
])
+@mixin
structure XmlAttributesInputOutput {
foo: String,
@@ -89,12 +90,16 @@ structure XmlAttributesInputOutput {
attr: String,
}
+structure XmlAttributesRequest with [XmlAttributesInputOutput] {}
+
+structure XmlAttributesResponse with [XmlAttributesInputOutput] {}
+
/// This example serializes an XML attributes on a document targeted by httpPayload.
@idempotent
@http(uri: "/XmlAttributesOnPayload", method: "PUT")
operation XmlAttributesOnPayload {
- input: XmlAttributesOnPayloadInputOutput,
- output: XmlAttributesOnPayloadInputOutput
+ input: XmlAttributesOnPayloadRequest,
+ output: XmlAttributesOnPayloadResponse
}
apply XmlAttributesOnPayload @httpRequestTests([
@@ -105,9 +110,9 @@ apply XmlAttributesOnPayload @httpRequestTests([
method: "PUT",
uri: "/XmlAttributesOnPayload",
body: """
-
+
hi
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -129,9 +134,9 @@ apply XmlAttributesOnPayload @httpResponseTests([
protocol: restXml,
code: 200,
body: """
-
+
hi
-
+
""",
bodyMediaType: "application/xml",
headers: {
@@ -146,7 +151,12 @@ apply XmlAttributesOnPayload @httpResponseTests([
}
])
-structure XmlAttributesOnPayloadInputOutput {
+structure XmlAttributesOnPayloadRequest {
+ @httpPayload
+ payload: XmlAttributesRequest
+}
+
+structure XmlAttributesOnPayloadResponse {
@httpPayload
- payload: XmlAttributesInputOutput
+ payload: XmlAttributesResponse
}
diff --git a/smithy-aws-protocol-tests/model/restXml/endpoints.smithy b/smithy-aws-protocol-tests/model/restXml/endpoints.smithy
index 3e99ca91137..638d5ce37b4 100644
--- a/smithy-aws-protocol-tests/model/restXml/endpoints.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/endpoints.smithy
@@ -38,9 +38,9 @@ operation EndpointOperation {}
method: "POST",
uri: "/EndpointWithHostLabelOperation",
body: """
-
+
-
+
""",
bodyMediaType: "application/xml",
host: "example.com",
@@ -53,10 +53,10 @@ operation EndpointOperation {}
@endpoint(hostPrefix: "foo.{label}.")
@http(uri: "/EndpointWithHostLabelOperation", method: "POST")
operation EndpointWithHostLabelOperation {
- input: HostLabelInput,
+ input: EndpointWithHostLabelOperationRequest,
}
-structure HostLabelInput {
+structure EndpointWithHostLabelOperationRequest {
@required
@hostLabel
label: String,