diff --git a/smithy-aws-protocol-tests/model/awsQuery/xml-structs.smithy b/smithy-aws-protocol-tests/model/awsQuery/xml-structs.smithy
index 8e3c24c4cc3..67657bd9d4d 100644
--- a/smithy-aws-protocol-tests/model/awsQuery/xml-structs.smithy
+++ b/smithy-aws-protocol-tests/model/awsQuery/xml-structs.smithy
@@ -5,10 +5,13 @@ $version: "2.0"
namespace aws.protocoltests.query
use aws.protocols#awsQuery
+use aws.protocoltests.shared#DateTime
+use aws.protocoltests.shared#EpochSeconds
use aws.protocoltests.shared#FooEnum
use aws.protocoltests.shared#FooEnumList
use aws.protocoltests.shared#FooEnumSet
use aws.protocoltests.shared#FooEnumMap
+use aws.protocoltests.shared#HttpDate
use smithy.test#httpResponseTests
// This example serializes simple scalar types in the top level XML document.
@@ -270,6 +273,26 @@ apply XmlTimestamps @httpResponseTests([
dateTime: 1398796238
}
},
+ {
+ id: "QueryXmlTimestampsWithDateTimeOnTargetFormat",
+ documentation: "Ensures that the timestampFormat of date-time on the target shape works like normal timestamps",
+ protocol: awsQuery,
+ code: 200,
+ body: """
+
+
+ 2014-04-29T18:30:38Z
+
+
+ """,
+ bodyMediaType: "application/xml",
+ headers: {
+ "Content-Type": "text/xml"
+ },
+ params: {
+ dateTimeOnTarget: 1398796238
+ }
+ },
{
id: "QueryXmlTimestampsWithEpochSecondsFormat",
documentation: "Ensures that the timestampFormat of epoch-seconds works",
@@ -290,6 +313,26 @@ apply XmlTimestamps @httpResponseTests([
epochSeconds: 1398796238
}
},
+ {
+ id: "QueryXmlTimestampsWithEpochSecondsOnTargetFormat",
+ documentation: "Ensures that the timestampFormat of epoch-seconds on the target shape works",
+ protocol: awsQuery,
+ code: 200,
+ body: """
+
+
+ 1398796238
+
+
+ """,
+ bodyMediaType: "application/xml",
+ headers: {
+ "Content-Type": "text/xml"
+ },
+ params: {
+ epochSecondsOnTarget: 1398796238
+ }
+ },
{
id: "QueryXmlTimestampsWithHttpDateFormat",
documentation: "Ensures that the timestampFormat of http-date works",
@@ -310,6 +353,26 @@ apply XmlTimestamps @httpResponseTests([
httpDate: 1398796238
}
},
+ {
+ id: "QueryXmlTimestampsWithHttpDateOnTargetFormat",
+ documentation: "Ensures that the timestampFormat of http-date on the target shape works",
+ protocol: awsQuery,
+ code: 200,
+ body: """
+
+
+ Tue, 29 Apr 2014 18:30:38 GMT
+
+
+ """,
+ bodyMediaType: "application/xml",
+ headers: {
+ "Content-Type": "text/xml"
+ },
+ params: {
+ httpDateOnTarget: 1398796238
+ }
+ },
])
structure XmlTimestampsOutput {
@@ -318,11 +381,17 @@ structure XmlTimestampsOutput {
@timestampFormat("date-time")
dateTime: Timestamp,
+ dateTimeOnTarget: DateTime,
+
@timestampFormat("epoch-seconds")
epochSeconds: Timestamp,
+ epochSecondsOnTarget: EpochSeconds,
+
@timestampFormat("http-date")
httpDate: Timestamp,
+
+ httpDateOnTarget: HttpDate,
}
/// This example serializes enums as top level properties, in lists, sets, and maps.
diff --git a/smithy-aws-protocol-tests/model/ec2Query/xml-structs.smithy b/smithy-aws-protocol-tests/model/ec2Query/xml-structs.smithy
index 7b25fa91624..c5f1b1edd17 100644
--- a/smithy-aws-protocol-tests/model/ec2Query/xml-structs.smithy
+++ b/smithy-aws-protocol-tests/model/ec2Query/xml-structs.smithy
@@ -6,10 +6,13 @@ namespace aws.protocoltests.ec2
use aws.protocols#ec2QueryName
use aws.protocols#ec2Query
+use aws.protocoltests.shared#DateTime
+use aws.protocoltests.shared#EpochSeconds
use aws.protocoltests.shared#FooEnum
use aws.protocoltests.shared#FooEnumList
use aws.protocoltests.shared#FooEnumSet
use aws.protocoltests.shared#FooEnumMap
+use aws.protocoltests.shared#HttpDate
use smithy.test#httpResponseTests
// This example serializes simple scalar types in the top level XML document.
@@ -262,6 +265,25 @@ apply XmlTimestamps @httpResponseTests([
dateTime: 1398796238
}
},
+ {
+ id: "Ec2XmlTimestampsWithDateTimeOnTargetFormat",
+ documentation: "Ensures that the timestampFormat of date-time on the target shape works like normal timestamps",
+ protocol: ec2Query,
+ code: 200,
+ body: """
+
+ 2014-04-29T18:30:38Z
+ requestid
+
+ """,
+ bodyMediaType: "application/xml",
+ headers: {
+ "Content-Type": "text/xml;charset=UTF-8"
+ },
+ params: {
+ dateTimeOnTarget: 1398796238
+ }
+ },
{
id: "Ec2XmlTimestampsWithEpochSecondsFormat",
documentation: "Ensures that the timestampFormat of epoch-seconds works",
@@ -281,6 +303,25 @@ apply XmlTimestamps @httpResponseTests([
epochSeconds: 1398796238
}
},
+ {
+ id: "Ec2XmlTimestampsWithEpochSecondsOnTargetFormat",
+ documentation: "Ensures that the timestampFormat of epoch-seconds on the target shape works",
+ protocol: ec2Query,
+ code: 200,
+ body: """
+
+ 1398796238
+ requestid
+
+ """,
+ bodyMediaType: "application/xml",
+ headers: {
+ "Content-Type": "text/xml;charset=UTF-8"
+ },
+ params: {
+ epochSecondsOnTarget: 1398796238
+ }
+ },
{
id: "Ec2XmlTimestampsWithHttpDateFormat",
documentation: "Ensures that the timestampFormat of http-date works",
@@ -300,6 +341,25 @@ apply XmlTimestamps @httpResponseTests([
httpDate: 1398796238
}
},
+ {
+ id: "Ec2XmlTimestampsWithHttpDateOnTargetFormat",
+ documentation: "Ensures that the timestampFormat of http-date on the target shape works",
+ protocol: ec2Query,
+ code: 200,
+ body: """
+
+ Tue, 29 Apr 2014 18:30:38 GMT
+ requestid
+
+ """,
+ bodyMediaType: "application/xml",
+ headers: {
+ "Content-Type": "text/xml;charset=UTF-8"
+ },
+ params: {
+ httpDateOnTarget: 1398796238
+ }
+ },
])
structure XmlTimestampsOutput {
@@ -308,11 +368,17 @@ structure XmlTimestampsOutput {
@timestampFormat("date-time")
dateTime: Timestamp,
+ dateTimeOnTarget: DateTime,
+
@timestampFormat("epoch-seconds")
epochSeconds: Timestamp,
+ epochSecondsOnTarget: EpochSeconds,
+
@timestampFormat("http-date")
httpDate: Timestamp,
+
+ httpDateOnTarget: HttpDate,
}
/// This example serializes enums as top level properties, in lists, sets, and maps.
diff --git a/smithy-aws-protocol-tests/model/restJson1/json-structs.smithy b/smithy-aws-protocol-tests/model/restJson1/json-structs.smithy
index 4e672767546..e807291ac4e 100644
--- a/smithy-aws-protocol-tests/model/restJson1/json-structs.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/json-structs.smithy
@@ -6,10 +6,13 @@ $version: "2.0"
namespace aws.protocoltests.restjson
use aws.protocols#restJson1
+use aws.protocoltests.shared#DateTime
+use aws.protocoltests.shared#EpochSeconds
use aws.protocoltests.shared#FooEnum
use aws.protocoltests.shared#FooEnumList
use aws.protocoltests.shared#FooEnumSet
use aws.protocoltests.shared#FooEnumMap
+use aws.protocoltests.shared#HttpDate
use smithy.test#httpRequestTests
use smithy.test#httpResponseTests
@@ -395,6 +398,24 @@ apply JsonTimestamps @httpRequestTests([
dateTime: 1398796238
}
},
+ {
+ id: "RestJsonJsonTimestampsWithDateTimeOnTargetFormat",
+ documentation: "Ensures that the timestampFormat of date-time on the target shape works like normal timestamps",
+ protocol: restJson1,
+ method: "POST",
+ uri: "/JsonTimestamps",
+ body: """
+ {
+ "dateTimeOnTarget": "2014-04-29T18:30:38Z"
+ }""",
+ bodyMediaType: "application/json",
+ headers: {
+ "Content-Type": "application/json"
+ },
+ params: {
+ dateTimeOnTarget: 1398796238
+ }
+ },
{
id: "RestJsonJsonTimestampsWithEpochSecondsFormat",
documentation: "Ensures that the timestampFormat of epoch-seconds works",
@@ -413,6 +434,24 @@ apply JsonTimestamps @httpRequestTests([
epochSeconds: 1398796238
}
},
+ {
+ id: "RestJsonJsonTimestampsWithEpochSecondsOnTargetFormat",
+ documentation: "Ensures that the timestampFormat of epoch-seconds on the target shape works",
+ protocol: restJson1,
+ method: "POST",
+ uri: "/JsonTimestamps",
+ body: """
+ {
+ "epochSecondsOnTarget": 1398796238
+ }""",
+ bodyMediaType: "application/json",
+ headers: {
+ "Content-Type": "application/json"
+ },
+ params: {
+ epochSecondsOnTarget: 1398796238
+ }
+ },
{
id: "RestJsonJsonTimestampsWithHttpDateFormat",
documentation: "Ensures that the timestampFormat of http-date works",
@@ -431,6 +470,24 @@ apply JsonTimestamps @httpRequestTests([
httpDate: 1398796238
}
},
+ {
+ id: "RestJsonJsonTimestampsWithHttpDateOnTargetFormat",
+ documentation: "Ensures that the timestampFormat of http-date on the target shape works",
+ protocol: restJson1,
+ method: "POST",
+ uri: "/JsonTimestamps",
+ body: """
+ {
+ "httpDateOnTarget": "Tue, 29 Apr 2014 18:30:38 GMT"
+ }""",
+ bodyMediaType: "application/json",
+ headers: {
+ "Content-Type": "application/json"
+ },
+ params: {
+ httpDateOnTarget: 1398796238
+ }
+ },
])
apply JsonTimestamps @httpResponseTests([
@@ -468,6 +525,23 @@ apply JsonTimestamps @httpResponseTests([
dateTime: 1398796238
}
},
+ {
+ id: "RestJsonJsonTimestampsWithDateTimeOnTargetFormat",
+ documentation: "Ensures that the timestampFormat of date-time on the target shape works like normal timestamps",
+ protocol: restJson1,
+ code: 200,
+ body: """
+ {
+ "dateTimeOnTarget": "2014-04-29T18:30:38Z"
+ }""",
+ bodyMediaType: "application/json",
+ headers: {
+ "Content-Type": "application/json"
+ },
+ params: {
+ dateTimeOnTarget: 1398796238
+ }
+ },
{
id: "RestJsonJsonTimestampsWithEpochSecondsFormat",
documentation: "Ensures that the timestampFormat of epoch-seconds works",
@@ -485,6 +559,23 @@ apply JsonTimestamps @httpResponseTests([
epochSeconds: 1398796238
}
},
+ {
+ id: "RestJsonJsonTimestampsWithEpochSecondsOnTargetFormat",
+ documentation: "Ensures that the timestampFormat of epoch-seconds on the target shape works",
+ protocol: restJson1,
+ code: 200,
+ body: """
+ {
+ "epochSecondsOnTarget": 1398796238
+ }""",
+ bodyMediaType: "application/json",
+ headers: {
+ "Content-Type": "application/json"
+ },
+ params: {
+ epochSecondsOnTarget: 1398796238
+ }
+ },
{
id: "RestJsonJsonTimestampsWithHttpDateFormat",
documentation: "Ensures that the timestampFormat of http-date works",
@@ -502,6 +593,23 @@ apply JsonTimestamps @httpResponseTests([
httpDate: 1398796238
}
},
+ {
+ id: "RestJsonJsonTimestampsWithHttpDateOnTargetFormat",
+ documentation: "Ensures that the timestampFormat of http-date on the target shape works",
+ protocol: restJson1,
+ code: 200,
+ body: """
+ {
+ "httpDateOnTarget": "Tue, 29 Apr 2014 18:30:38 GMT"
+ }""",
+ bodyMediaType: "application/json",
+ headers: {
+ "Content-Type": "application/json"
+ },
+ params: {
+ httpDateOnTarget: 1398796238
+ }
+ },
])
structure JsonTimestampsInputOutput {
@@ -510,11 +618,17 @@ structure JsonTimestampsInputOutput {
@timestampFormat("date-time")
dateTime: Timestamp,
+ dateTimeOnTarget: DateTime,
+
@timestampFormat("epoch-seconds")
epochSeconds: Timestamp,
+ epochSecondsOnTarget: EpochSeconds,
+
@timestampFormat("http-date")
httpDate: Timestamp,
+
+ httpDateOnTarget: HttpDate,
}
/// This example serializes enums as top level properties, in lists, sets, and maps.
diff --git a/smithy-aws-protocol-tests/model/restXml/document-structs.smithy b/smithy-aws-protocol-tests/model/restXml/document-structs.smithy
index 0be041e4332..cc949f1e5c0 100644
--- a/smithy-aws-protocol-tests/model/restXml/document-structs.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/document-structs.smithy
@@ -6,10 +6,13 @@ $version: "2.0"
namespace aws.protocoltests.restxml
use aws.protocols#restXml
+use aws.protocoltests.shared#DateTime
+use aws.protocoltests.shared#EpochSeconds
use aws.protocoltests.shared#FooEnum
use aws.protocoltests.shared#FooEnumList
use aws.protocoltests.shared#FooEnumSet
use aws.protocoltests.shared#FooEnumMap
+use aws.protocoltests.shared#HttpDate
use smithy.test#httpRequestTests
use smithy.test#httpResponseTests
@@ -645,6 +648,25 @@ apply XmlTimestamps @httpRequestTests([
dateTime: 1398796238
}
},
+ {
+ id: "XmlTimestampsWithDateTimeOnTargetFormat",
+ documentation: "Ensures that the timestampFormat of date-time on the target shape works like normal timestamps",
+ protocol: restXml,
+ method: "POST",
+ uri: "/XmlTimestamps",
+ body: """
+
+ 2014-04-29T18:30:38Z
+
+ """,
+ bodyMediaType: "application/xml",
+ headers: {
+ "Content-Type": "application/xml"
+ },
+ params: {
+ dateTimeOnTarget: 1398796238
+ }
+ },
{
id: "XmlTimestampsWithEpochSecondsFormat",
documentation: "Ensures that the timestampFormat of epoch-seconds works",
@@ -664,6 +686,25 @@ apply XmlTimestamps @httpRequestTests([
epochSeconds: 1398796238
}
},
+ {
+ id: "XmlTimestampsWithEpochSecondsOnTargetFormat",
+ documentation: "Ensures that the timestampFormat of epoch-seconds on the target shape works",
+ protocol: restXml,
+ method: "POST",
+ uri: "/XmlTimestamps",
+ body: """
+
+ 1398796238
+
+ """,
+ bodyMediaType: "application/xml",
+ headers: {
+ "Content-Type": "application/xml"
+ },
+ params: {
+ epochSecondsOnTarget: 1398796238
+ }
+ },
{
id: "XmlTimestampsWithHttpDateFormat",
documentation: "Ensures that the timestampFormat of http-date works",
@@ -683,6 +724,25 @@ apply XmlTimestamps @httpRequestTests([
httpDate: 1398796238
}
},
+ {
+ id: "XmlTimestampsWithHttpDateOnTargetFormat",
+ documentation: "Ensures that the timestampFormat of http-date on the target shape works",
+ protocol: restXml,
+ method: "POST",
+ uri: "/XmlTimestamps",
+ body: """
+
+ Tue, 29 Apr 2014 18:30:38 GMT
+
+ """,
+ bodyMediaType: "application/xml",
+ headers: {
+ "Content-Type": "application/xml"
+ },
+ params: {
+ httpDateOnTarget: 1398796238
+ }
+ },
])
apply XmlTimestamps @httpResponseTests([
@@ -722,6 +782,24 @@ apply XmlTimestamps @httpResponseTests([
dateTime: 1398796238
}
},
+ {
+ id: "XmlTimestampsWithDateTimeOnTargetFormat",
+ documentation: "Ensures that the timestampFormat of date-time on the target shape works like normal timestamps",
+ protocol: restXml,
+ code: 200,
+ body: """
+
+ 2014-04-29T18:30:38Z
+
+ """,
+ bodyMediaType: "application/xml",
+ headers: {
+ "Content-Type": "application/xml"
+ },
+ params: {
+ dateTimeOnTarget: 1398796238
+ }
+ },
{
id: "XmlTimestampsWithEpochSecondsFormat",
documentation: "Ensures that the timestampFormat of epoch-seconds works",
@@ -740,6 +818,24 @@ apply XmlTimestamps @httpResponseTests([
epochSeconds: 1398796238
}
},
+ {
+ id: "XmlTimestampsWithEpochSecondsOnTargetFormat",
+ documentation: "Ensures that the timestampFormat of epoch-seconds on the target shape works",
+ protocol: restXml,
+ code: 200,
+ body: """
+
+ 1398796238
+
+ """,
+ bodyMediaType: "application/xml",
+ headers: {
+ "Content-Type": "application/xml"
+ },
+ params: {
+ epochSecondsOnTarget: 1398796238
+ }
+ },
{
id: "XmlTimestampsWithHttpDateFormat",
documentation: "Ensures that the timestampFormat of http-date works",
@@ -758,6 +854,24 @@ apply XmlTimestamps @httpResponseTests([
httpDate: 1398796238
}
},
+ {
+ id: "XmlTimestampsWithHttpDateOnTargetFormat",
+ documentation: "Ensures that the timestampFormat of http-date on the target shape works",
+ protocol: restXml,
+ code: 200,
+ body: """
+
+ Tue, 29 Apr 2014 18:30:38 GMT
+
+ """,
+ bodyMediaType: "application/xml",
+ headers: {
+ "Content-Type": "application/xml"
+ },
+ params: {
+ httpDateOnTarget: 1398796238
+ }
+ },
])
structure XmlTimestampsInputOutput {
@@ -766,11 +880,17 @@ structure XmlTimestampsInputOutput {
@timestampFormat("date-time")
dateTime: Timestamp,
+ dateTimeOnTarget: DateTime,
+
@timestampFormat("epoch-seconds")
epochSeconds: Timestamp,
+ epochSecondsOnTarget: EpochSeconds,
+
@timestampFormat("http-date")
httpDate: Timestamp,
+
+ httpDateOnTarget: HttpDate,
}
/// This example serializes enums as top level properties, in lists, sets, and maps.