Skip to content

Commit 29056f4

Browse files
author
Steven Yuan
authored
chore(codegen): upgrade to Smithy 1.37.0 (#5162)
1 parent 396ecda commit 29056f4

File tree

21 files changed

+4
-430
lines changed

21 files changed

+4
-430
lines changed

codegen/gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
smithyVersion=1.33.0
2-
smithyGradleVersion=0.6.0
1+
smithyVersion=1.37.0
2+
smithyGradleVersion=0.6.0

private/aws-protocoltests-ec2/src/models/models_0.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export interface HostLabelInput {
3232
*/
3333
export interface FractionalSecondsOutput {
3434
datetime?: Date;
35-
httpdate?: Date;
3635
}
3736

3837
/**

private/aws-protocoltests-ec2/src/protocols/Aws_ec2.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1865,9 +1865,6 @@ const de_FractionalSecondsOutput = (output: any, context: __SerdeContext): Fract
18651865
if (output["datetime"] !== undefined) {
18661866
contents.datetime = __expectNonNull(__parseRfc3339DateTimeWithOffset(output["datetime"]));
18671867
}
1868-
if (output["httpdate"] !== undefined) {
1869-
contents.httpdate = __expectNonNull(__parseRfc7231DateTime(output["httpdate"]));
1870-
}
18711868
return contents;
18721869
};
18731870

private/aws-protocoltests-ec2/test/functional/ec2query.spec.ts

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -433,48 +433,6 @@ it("Ec2QueryDateTimeWithFractionalSeconds:Response", async () => {
433433
});
434434
});
435435

436-
/**
437-
* Ensures that clients can correctly parse http-date timestamps with fractional seconds
438-
*/
439-
it("Ec2QueryHttpDateWithFractionalSeconds:Response", async () => {
440-
const client = new EC2ProtocolClient({
441-
...clientParams,
442-
requestHandler: new ResponseDeserializationTestHandler(
443-
true,
444-
200,
445-
{
446-
"content-type": "text/xml;charset=UTF-8",
447-
},
448-
`<FractionalSecondsResponse xmlns="https://example.com/">
449-
<httpdate>Sun, 02 Jan 2000 20:34:56.456 GMT</httpdate>
450-
<RequestId>requestid</RequestId>
451-
</FractionalSecondsResponse>
452-
`
453-
),
454-
});
455-
456-
const params: any = {};
457-
const command = new FractionalSecondsCommand(params);
458-
459-
let r: any;
460-
try {
461-
r = await client.send(command);
462-
} catch (err) {
463-
fail("Expected a valid response to be returned, got " + err);
464-
return;
465-
}
466-
expect(r["$metadata"].httpStatusCode).toBe(200);
467-
const paramsToValidate: any = [
468-
{
469-
httpdate: new Date(9.46845296456e8000),
470-
},
471-
][0];
472-
Object.keys(paramsToValidate).forEach((param) => {
473-
expect(r[param]).toBeDefined();
474-
expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true);
475-
});
476-
});
477-
478436
/**
479437
* Ensures that operations with errors successfully know how to deserialize the successful response
480438
*/

private/aws-protocoltests-json/src/models/models_0.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ export class FooError extends __BaseException {
139139
*/
140140
export interface FractionalSecondsOutput {
141141
datetime?: Date;
142-
httpdate?: Date;
143142
}
144143

145144
/**

private/aws-protocoltests-json/src/protocols/Aws_json1_1.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,6 @@ const de_ErrorWithMembers = (output: any, context: __SerdeContext): ErrorWithMem
12361236
const de_FractionalSecondsOutput = (output: any, context: __SerdeContext): FractionalSecondsOutput => {
12371237
return take(output, {
12381238
datetime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1239-
httpdate: (_: any) => __expectNonNull(__parseRfc7231DateTime(_)),
12401239
}) as any;
12411240
};
12421241

private/aws-protocoltests-json/test/functional/awsjson1_1.spec.ts

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -558,47 +558,6 @@ it("AwsJson11DateTimeWithFractionalSeconds:Response", async () => {
558558
});
559559
});
560560

561-
/**
562-
* Ensures that clients can correctly parse http-date timestamps with fractional seconds
563-
*/
564-
it("AwsJson11HttpDateWithFractionalSeconds:Response", async () => {
565-
const client = new JsonProtocolClient({
566-
...clientParams,
567-
requestHandler: new ResponseDeserializationTestHandler(
568-
true,
569-
200,
570-
{
571-
"content-type": "application/x-amz-json-1.1",
572-
},
573-
` {
574-
"httpdate": "Sun, 02 Jan 2000 20:34:56.456 GMT"
575-
}
576-
`
577-
),
578-
});
579-
580-
const params: any = {};
581-
const command = new FractionalSecondsCommand(params);
582-
583-
let r: any;
584-
try {
585-
r = await client.send(command);
586-
} catch (err) {
587-
fail("Expected a valid response to be returned, got " + err);
588-
return;
589-
}
590-
expect(r["$metadata"].httpStatusCode).toBe(200);
591-
const paramsToValidate: any = [
592-
{
593-
httpdate: new Date(9.46845296456e8000),
594-
},
595-
][0];
596-
Object.keys(paramsToValidate).forEach((param) => {
597-
expect(r[param]).toBeDefined();
598-
expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true);
599-
});
600-
});
601-
602561
/**
603562
* Parses simple JSON errors
604563
*/

private/aws-protocoltests-query/src/models/models_0.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ export interface FlattenedXmlMapWithXmlNamespaceOutput {
8282
*/
8383
export interface FractionalSecondsOutput {
8484
datetime?: Date;
85-
httpdate?: Date;
8685
}
8786

8887
/**

private/aws-protocoltests-query/src/protocols/Aws_query.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2585,9 +2585,6 @@ const de_FractionalSecondsOutput = (output: any, context: __SerdeContext): Fract
25852585
if (output["datetime"] !== undefined) {
25862586
contents.datetime = __expectNonNull(__parseRfc3339DateTimeWithOffset(output["datetime"]));
25872587
}
2588-
if (output["httpdate"] !== undefined) {
2589-
contents.httpdate = __expectNonNull(__parseRfc7231DateTime(output["httpdate"]));
2590-
}
25912588
return contents;
25922589
};
25932590

private/aws-protocoltests-query/test/functional/awsquery.spec.ts

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -593,49 +593,6 @@ it("AwsQueryDateTimeWithFractionalSeconds:Response", async () => {
593593
});
594594
});
595595

596-
/**
597-
* Ensures that clients can correctly parse http-date timestamps with fractional seconds
598-
*/
599-
it("AwsQueryHttpDateWithFractionalSeconds:Response", async () => {
600-
const client = new QueryProtocolClient({
601-
...clientParams,
602-
requestHandler: new ResponseDeserializationTestHandler(
603-
true,
604-
200,
605-
{
606-
"content-type": "text/xml",
607-
},
608-
`<FractionalSecondsResponse xmlns="https://example.com/">
609-
<FractionalSecondsResult>
610-
<httpdate>Sun, 02 Jan 2000 20:34:56.456 GMT</httpdate>
611-
</FractionalSecondsResult>
612-
</FractionalSecondsResponse>
613-
`
614-
),
615-
});
616-
617-
const params: any = {};
618-
const command = new FractionalSecondsCommand(params);
619-
620-
let r: any;
621-
try {
622-
r = await client.send(command);
623-
} catch (err) {
624-
fail("Expected a valid response to be returned, got " + err);
625-
return;
626-
}
627-
expect(r["$metadata"].httpStatusCode).toBe(200);
628-
const paramsToValidate: any = [
629-
{
630-
httpdate: new Date(9.46845296456e8000),
631-
},
632-
][0];
633-
Object.keys(paramsToValidate).forEach((param) => {
634-
expect(r[param]).toBeDefined();
635-
expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true);
636-
});
637-
});
638-
639596
/**
640597
* Ensures that operations with errors successfully know how to deserialize the successful response
641598
*/

private/aws-protocoltests-restjson/src/models/models_0.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ export class FooError extends __BaseException {
195195
*/
196196
export interface FractionalSecondsOutput {
197197
datetime?: Date;
198-
httpdate?: Date;
199198
}
200199

201200
/**

private/aws-protocoltests-restjson/src/protocols/Aws_restJson1.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3647,7 +3647,6 @@ export const de_FractionalSecondsCommand = async (
36473647
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
36483648
const doc = take(data, {
36493649
datetime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3650-
httpdate: (_) => __expectNonNull(__parseRfc7231DateTime(_)),
36513650
});
36523651
Object.assign(contents, doc);
36533652
return contents;

private/aws-protocoltests-restjson/test/functional/restjson1.spec.ts

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,45 +1556,6 @@ it("RestJsonDateTimeWithFractionalSeconds:Response", async () => {
15561556
});
15571557
});
15581558

1559-
/**
1560-
* Ensures that clients can correctly parse http-date timestamps with fractional seconds
1561-
*/
1562-
it("RestJsonHttpDateWithFractionalSeconds:Response", async () => {
1563-
const client = new RestJsonProtocolClient({
1564-
...clientParams,
1565-
requestHandler: new ResponseDeserializationTestHandler(
1566-
true,
1567-
200,
1568-
undefined,
1569-
` {
1570-
"httpdate": "Sun, 02 Jan 2000 20:34:56.456 GMT"
1571-
}
1572-
`
1573-
),
1574-
});
1575-
1576-
const params: any = {};
1577-
const command = new FractionalSecondsCommand(params);
1578-
1579-
let r: any;
1580-
try {
1581-
r = await client.send(command);
1582-
} catch (err) {
1583-
fail("Expected a valid response to be returned, got " + err);
1584-
return;
1585-
}
1586-
expect(r["$metadata"].httpStatusCode).toBe(200);
1587-
const paramsToValidate: any = [
1588-
{
1589-
httpdate: new Date(9.46845296456e8000),
1590-
},
1591-
][0];
1592-
Object.keys(paramsToValidate).forEach((param) => {
1593-
expect(r[param]).toBeDefined();
1594-
expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true);
1595-
});
1596-
});
1597-
15981559
/**
15991560
* Ensures that operations with errors successfully know how
16001561
* to deserialize a successful response. As of January 2021,

private/aws-protocoltests-restxml/src/models/models_0.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ export interface FlattenedXmlMapWithXmlNamespaceOutput {
178178
*/
179179
export interface FractionalSecondsOutput {
180180
datetime?: Date;
181-
httpdate?: Date;
182181
}
183182

184183
/**

private/aws-protocoltests-restxml/src/protocols/Aws_restXml.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2989,9 +2989,6 @@ export const de_FractionalSecondsCommand = async (
29892989
if (data["datetime"] !== undefined) {
29902990
contents.datetime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data["datetime"]));
29912991
}
2992-
if (data["httpdate"] !== undefined) {
2993-
contents.httpdate = __expectNonNull(__parseRfc7231DateTime(data["httpdate"]));
2994-
}
29952992
return contents;
29962993
};
29972994

private/aws-protocoltests-restxml/test/functional/restxml.spec.ts

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,47 +1213,6 @@ it("RestXmlDateTimeWithFractionalSeconds:Response", async () => {
12131213
});
12141214
});
12151215

1216-
/**
1217-
* Ensures that clients can correctly parse http-date timestamps with fractional seconds
1218-
*/
1219-
it("RestXmlHttpDateWithFractionalSeconds:Response", async () => {
1220-
const client = new RestXmlProtocolClient({
1221-
...clientParams,
1222-
requestHandler: new ResponseDeserializationTestHandler(
1223-
true,
1224-
200,
1225-
{
1226-
"content-type": "application/xml",
1227-
},
1228-
`<FractionalSecondsOutput>
1229-
<httpdate>Sun, 02 Jan 2000 20:34:56.456 GMT</httpdate>
1230-
</FractionalSecondsOutput>
1231-
`
1232-
),
1233-
});
1234-
1235-
const params: any = {};
1236-
const command = new FractionalSecondsCommand(params);
1237-
1238-
let r: any;
1239-
try {
1240-
r = await client.send(command);
1241-
} catch (err) {
1242-
fail("Expected a valid response to be returned, got " + err);
1243-
return;
1244-
}
1245-
expect(r["$metadata"].httpStatusCode).toBe(200);
1246-
const paramsToValidate: any = [
1247-
{
1248-
httpdate: new Date(9.46845296456e8000),
1249-
},
1250-
][0];
1251-
Object.keys(paramsToValidate).forEach((param) => {
1252-
expect(r[param]).toBeDefined();
1253-
expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true);
1254-
});
1255-
});
1256-
12571216
/**
12581217
* Ensures that operations with errors successfully know how to deserialize the successful response
12591218
*/

private/aws-restjson-server/src/models/models_0.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -670,13 +670,11 @@ export class FooError extends __BaseException {
670670
*/
671671
export interface FractionalSecondsOutput {
672672
datetime?: Date;
673-
httpdate?: Date;
674673
}
675674

676675
export namespace FractionalSecondsOutput {
677676
const memberValidators: {
678677
datetime?: __MultiConstraintValidator<Date>;
679-
httpdate?: __MultiConstraintValidator<Date>;
680678
} = {};
681679
/**
682680
* @internal
@@ -691,18 +689,11 @@ export namespace FractionalSecondsOutput {
691689
memberValidators["datetime"] = new __NoOpValidator();
692690
break;
693691
}
694-
case "httpdate": {
695-
memberValidators["httpdate"] = new __NoOpValidator();
696-
break;
697-
}
698692
}
699693
}
700694
return memberValidators[member]!;
701695
}
702-
return [
703-
...getMemberValidator("datetime").validate(obj.datetime, `${path}/datetime`),
704-
...getMemberValidator("httpdate").validate(obj.httpdate, `${path}/httpdate`),
705-
];
696+
return [...getMemberValidator("datetime").validate(obj.datetime, `${path}/datetime`)];
706697
};
707698
}
708699

private/aws-restjson-server/src/protocols/Aws_restJson1.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3927,7 +3927,6 @@ export const serializeFractionalSecondsResponse = async (
39273927
body = JSON.stringify(
39283928
take(input, {
39293929
datetime: (_) => _.toISOString().split(".")[0] + "Z",
3930-
httpdate: (_) => __dateToUtcString(_),
39313930
})
39323931
);
39333932
if (

0 commit comments

Comments
 (0)