Skip to content

Commit f12a737

Browse files
ianbotsfJordonPhillips
authored andcommitted
Update new protocol tests to use shared types instead
1 parent 206a1ea commit f12a737

File tree

4 files changed

+24
-48
lines changed

4 files changed

+24
-48
lines changed

smithy-aws-protocol-tests/model/awsQuery/xml-structs.smithy

+6-12
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ $version: "2.0"
55
namespace aws.protocoltests.query
66

77
use aws.protocols#awsQuery
8+
use aws.protocoltests.shared#DateTime
9+
use aws.protocoltests.shared#EpochSeconds
810
use aws.protocoltests.shared#FooEnum
911
use aws.protocoltests.shared#FooEnumList
1012
use aws.protocoltests.shared#FooEnumSet
1113
use aws.protocoltests.shared#FooEnumMap
14+
use aws.protocoltests.shared#HttpDate
1215
use smithy.test#httpResponseTests
1316

1417
// This example serializes simple scalar types in the top level XML document.
@@ -372,32 +375,23 @@ apply XmlTimestamps @httpResponseTests([
372375
},
373376
])
374377

375-
@timestampFormat("date-time")
376-
timestamp DateTimeTimestamp
377-
378-
@timestampFormat("epoch-seconds")
379-
timestamp EpochSecondsTimestamp
380-
381-
@timestampFormat("http-date")
382-
timestamp HttpDateTimestamp
383-
384378
structure XmlTimestampsOutput {
385379
normal: Timestamp,
386380

387381
@timestampFormat("date-time")
388382
dateTime: Timestamp,
389383

390-
dateTimeOnTarget: DateTimeTimestamp,
384+
dateTimeOnTarget: DateTime,
391385

392386
@timestampFormat("epoch-seconds")
393387
epochSeconds: Timestamp,
394388

395-
epochSecondsOnTarget: EpochSecondsTimestamp,
389+
epochSecondsOnTarget: EpochSeconds,
396390

397391
@timestampFormat("http-date")
398392
httpDate: Timestamp,
399393

400-
httpDateOnTarget: HttpDateTimestamp,
394+
httpDateOnTarget: HttpDate,
401395
}
402396

403397
/// This example serializes enums as top level properties, in lists, sets, and maps.

smithy-aws-protocol-tests/model/ec2Query/xml-structs.smithy

+6-12
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ namespace aws.protocoltests.ec2
66

77
use aws.protocols#ec2QueryName
88
use aws.protocols#ec2Query
9+
use aws.protocoltests.shared#DateTime
10+
use aws.protocoltests.shared#EpochSeconds
911
use aws.protocoltests.shared#FooEnum
1012
use aws.protocoltests.shared#FooEnumList
1113
use aws.protocoltests.shared#FooEnumSet
1214
use aws.protocoltests.shared#FooEnumMap
15+
use aws.protocoltests.shared#HttpDate
1316
use smithy.test#httpResponseTests
1417

1518
// This example serializes simple scalar types in the top level XML document.
@@ -359,32 +362,23 @@ apply XmlTimestamps @httpResponseTests([
359362
},
360363
])
361364

362-
@timestampFormat("date-time")
363-
timestamp DateTimeTimestamp
364-
365-
@timestampFormat("epoch-seconds")
366-
timestamp EpochSecondsTimestamp
367-
368-
@timestampFormat("http-date")
369-
timestamp HttpDateTimestamp
370-
371365
structure XmlTimestampsOutput {
372366
normal: Timestamp,
373367

374368
@timestampFormat("date-time")
375369
dateTime: Timestamp,
376370

377-
dateTimeOnTarget: DateTimeTimestamp,
371+
dateTimeOnTarget: DateTime,
378372

379373
@timestampFormat("epoch-seconds")
380374
epochSeconds: Timestamp,
381375

382-
epochSecondsOnTarget: EpochSecondsTimestamp,
376+
epochSecondsOnTarget: EpochSeconds,
383377

384378
@timestampFormat("http-date")
385379
httpDate: Timestamp,
386380

387-
httpDateOnTarget: HttpDateTimestamp,
381+
httpDateOnTarget: HttpDate,
388382
}
389383

390384
/// This example serializes enums as top level properties, in lists, sets, and maps.

smithy-aws-protocol-tests/model/restJson1/json-structs.smithy

+6-12
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ $version: "2.0"
66
namespace aws.protocoltests.restjson
77

88
use aws.protocols#restJson1
9+
use aws.protocoltests.shared#DateTime
10+
use aws.protocoltests.shared#EpochSeconds
911
use aws.protocoltests.shared#FooEnum
1012
use aws.protocoltests.shared#FooEnumList
1113
use aws.protocoltests.shared#FooEnumSet
1214
use aws.protocoltests.shared#FooEnumMap
15+
use aws.protocoltests.shared#HttpDate
1316
use smithy.test#httpRequestTests
1417
use smithy.test#httpResponseTests
1518

@@ -609,32 +612,23 @@ apply JsonTimestamps @httpResponseTests([
609612
},
610613
])
611614

612-
@timestampFormat("date-time")
613-
timestamp DateTimeTimestamp
614-
615-
@timestampFormat("epoch-seconds")
616-
timestamp EpochSecondsTimestamp
617-
618-
@timestampFormat("http-date")
619-
timestamp HttpDateTimestamp
620-
621615
structure JsonTimestampsInputOutput {
622616
normal: Timestamp,
623617

624618
@timestampFormat("date-time")
625619
dateTime: Timestamp,
626620

627-
dateTimeOnTarget: DateTimeTimestamp,
621+
dateTimeOnTarget: DateTime,
628622

629623
@timestampFormat("epoch-seconds")
630624
epochSeconds: Timestamp,
631625

632-
epochSecondsOnTarget: EpochSecondsTimestamp,
626+
epochSecondsOnTarget: EpochSeconds,
633627

634628
@timestampFormat("http-date")
635629
httpDate: Timestamp,
636630

637-
httpDateOnTarget: HttpDateTimestamp,
631+
httpDateOnTarget: HttpDate,
638632
}
639633

640634
/// This example serializes enums as top level properties, in lists, sets, and maps.

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

+6-12
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ $version: "2.0"
66
namespace aws.protocoltests.restxml
77

88
use aws.protocols#restXml
9+
use aws.protocoltests.shared#DateTime
10+
use aws.protocoltests.shared#EpochSeconds
911
use aws.protocoltests.shared#FooEnum
1012
use aws.protocoltests.shared#FooEnumList
1113
use aws.protocoltests.shared#FooEnumSet
1214
use aws.protocoltests.shared#FooEnumMap
15+
use aws.protocoltests.shared#HttpDate
1316
use smithy.test#httpRequestTests
1417
use smithy.test#httpResponseTests
1518

@@ -871,32 +874,23 @@ apply XmlTimestamps @httpResponseTests([
871874
},
872875
])
873876

874-
@timestampFormat("date-time")
875-
timestamp DateTimeTimestamp
876-
877-
@timestampFormat("epoch-seconds")
878-
timestamp EpochSecondsTimestamp
879-
880-
@timestampFormat("http-date")
881-
timestamp HttpDateTimestamp
882-
883877
structure XmlTimestampsInputOutput {
884878
normal: Timestamp,
885879

886880
@timestampFormat("date-time")
887881
dateTime: Timestamp,
888882

889-
dateTimeOnTarget: DateTimeTimestamp,
883+
dateTimeOnTarget: DateTime,
890884

891885
@timestampFormat("epoch-seconds")
892886
epochSeconds: Timestamp,
893887

894-
epochSecondsOnTarget: EpochSecondsTimestamp,
888+
epochSecondsOnTarget: EpochSeconds,
895889

896890
@timestampFormat("http-date")
897891
httpDate: Timestamp,
898892

899-
httpDateOnTarget: HttpDateTimestamp,
893+
httpDateOnTarget: HttpDate,
900894
}
901895

902896
/// This example serializes enums as top level properties, in lists, sets, and maps.

0 commit comments

Comments
 (0)