Skip to content

Commit da2c085

Browse files
authored
chore(codegen): pin smithy to minor version 1.7.x (#2197)
1 parent 5fe8ed6 commit da2c085

File tree

18 files changed

+1147
-22
lines changed

18 files changed

+1147
-22
lines changed

Diff for: codegen/protocol-test-codegen/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ plugins {
2020
}
2121

2222
dependencies {
23-
implementation("software.amazon.smithy:smithy-aws-protocol-tests:[1.6.0, 1.7.0[")
23+
implementation("software.amazon.smithy:smithy-aws-protocol-tests:[1.7.0, 1.8.0[")
2424
compile(project(":smithy-aws-typescript-codegen"))
2525
}
2626

Diff for: codegen/smithy-aws-typescript-codegen/build.gradle.kts

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ extra["displayName"] = "Smithy :: AWS :: Typescript :: Codegen"
1818
extra["moduleName"] = "software.amazon.smithy.aws.typescript.codegen"
1919

2020
dependencies {
21-
api("software.amazon.smithy:smithy-aws-traits:[1.6.0, 1.7.0[")
22-
api("software.amazon.smithy:smithy-waiters:[1.6.0, 1.7.0[")
23-
api("software.amazon.smithy:smithy-aws-iam-traits:[1.6.0, 1.7.0[")
21+
api("software.amazon.smithy:smithy-aws-traits:[1.7.0, 1.8.0[")
22+
api("software.amazon.smithy:smithy-waiters:[1.7.0, 1.8.0[")
23+
api("software.amazon.smithy:smithy-aws-iam-traits:[1.7.0, 1.8.0[")
2424
api("software.amazon.smithy:smithy-typescript-codegen:0.3.0")
2525
}

Diff for: protocol_tests/aws-restjson/RestJsonProtocol.ts

+68
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,16 @@ import {
144144
QueryIdempotencyTokenAutoFillCommandInput,
145145
QueryIdempotencyTokenAutoFillCommandOutput,
146146
} from "./commands/QueryIdempotencyTokenAutoFillCommand";
147+
import {
148+
QueryParamsAsStringListMapCommand,
149+
QueryParamsAsStringListMapCommandInput,
150+
QueryParamsAsStringListMapCommandOutput,
151+
} from "./commands/QueryParamsAsStringListMapCommand";
152+
import {
153+
QueryPrecedenceCommand,
154+
QueryPrecedenceCommandInput,
155+
QueryPrecedenceCommandOutput,
156+
} from "./commands/QueryPrecedenceCommand";
147157
import {
148158
RecursiveShapesCommand,
149159
RecursiveShapesCommandInput,
@@ -1238,6 +1248,64 @@ export class RestJsonProtocol extends RestJsonProtocolClient {
12381248
}
12391249
}
12401250

1251+
public queryParamsAsStringListMap(
1252+
args: QueryParamsAsStringListMapCommandInput,
1253+
options?: __HttpHandlerOptions
1254+
): Promise<QueryParamsAsStringListMapCommandOutput>;
1255+
public queryParamsAsStringListMap(
1256+
args: QueryParamsAsStringListMapCommandInput,
1257+
cb: (err: any, data?: QueryParamsAsStringListMapCommandOutput) => void
1258+
): void;
1259+
public queryParamsAsStringListMap(
1260+
args: QueryParamsAsStringListMapCommandInput,
1261+
options: __HttpHandlerOptions,
1262+
cb: (err: any, data?: QueryParamsAsStringListMapCommandOutput) => void
1263+
): void;
1264+
public queryParamsAsStringListMap(
1265+
args: QueryParamsAsStringListMapCommandInput,
1266+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: QueryParamsAsStringListMapCommandOutput) => void),
1267+
cb?: (err: any, data?: QueryParamsAsStringListMapCommandOutput) => void
1268+
): Promise<QueryParamsAsStringListMapCommandOutput> | void {
1269+
const command = new QueryParamsAsStringListMapCommand(args);
1270+
if (typeof optionsOrCb === "function") {
1271+
this.send(command, optionsOrCb);
1272+
} else if (typeof cb === "function") {
1273+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1274+
this.send(command, optionsOrCb || {}, cb);
1275+
} else {
1276+
return this.send(command, optionsOrCb);
1277+
}
1278+
}
1279+
1280+
public queryPrecedence(
1281+
args: QueryPrecedenceCommandInput,
1282+
options?: __HttpHandlerOptions
1283+
): Promise<QueryPrecedenceCommandOutput>;
1284+
public queryPrecedence(
1285+
args: QueryPrecedenceCommandInput,
1286+
cb: (err: any, data?: QueryPrecedenceCommandOutput) => void
1287+
): void;
1288+
public queryPrecedence(
1289+
args: QueryPrecedenceCommandInput,
1290+
options: __HttpHandlerOptions,
1291+
cb: (err: any, data?: QueryPrecedenceCommandOutput) => void
1292+
): void;
1293+
public queryPrecedence(
1294+
args: QueryPrecedenceCommandInput,
1295+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: QueryPrecedenceCommandOutput) => void),
1296+
cb?: (err: any, data?: QueryPrecedenceCommandOutput) => void
1297+
): Promise<QueryPrecedenceCommandOutput> | void {
1298+
const command = new QueryPrecedenceCommand(args);
1299+
if (typeof optionsOrCb === "function") {
1300+
this.send(command, optionsOrCb);
1301+
} else if (typeof cb === "function") {
1302+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1303+
this.send(command, optionsOrCb || {}, cb);
1304+
} else {
1305+
return this.send(command, optionsOrCb);
1306+
}
1307+
}
1308+
12411309
/**
12421310
* Recursive shapes
12431311
*/

Diff for: protocol_tests/aws-restjson/RestJsonProtocolClient.ts

+9
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ import {
8585
QueryIdempotencyTokenAutoFillCommandInput,
8686
QueryIdempotencyTokenAutoFillCommandOutput,
8787
} from "./commands/QueryIdempotencyTokenAutoFillCommand";
88+
import {
89+
QueryParamsAsStringListMapCommandInput,
90+
QueryParamsAsStringListMapCommandOutput,
91+
} from "./commands/QueryParamsAsStringListMapCommand";
92+
import { QueryPrecedenceCommandInput, QueryPrecedenceCommandOutput } from "./commands/QueryPrecedenceCommand";
8893
import { RecursiveShapesCommandInput, RecursiveShapesCommandOutput } from "./commands/RecursiveShapesCommand";
8994
import {
9095
SimpleScalarPropertiesCommandInput,
@@ -188,6 +193,8 @@ export type ServiceInputTypes =
188193
| NullAndEmptyHeadersServerCommandInput
189194
| OmitsNullSerializesEmptyStringCommandInput
190195
| QueryIdempotencyTokenAutoFillCommandInput
196+
| QueryParamsAsStringListMapCommandInput
197+
| QueryPrecedenceCommandInput
191198
| RecursiveShapesCommandInput
192199
| SimpleScalarPropertiesCommandInput
193200
| StreamingTraitsCommandInput
@@ -229,6 +236,8 @@ export type ServiceOutputTypes =
229236
| NullAndEmptyHeadersServerCommandOutput
230237
| OmitsNullSerializesEmptyStringCommandOutput
231238
| QueryIdempotencyTokenAutoFillCommandOutput
239+
| QueryParamsAsStringListMapCommandOutput
240+
| QueryPrecedenceCommandOutput
232241
| RecursiveShapesCommandOutput
233242
| SimpleScalarPropertiesCommandOutput
234243
| StreamingTraitsCommandOutput
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
import { RestJsonProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RestJsonProtocolClient";
2+
import { QueryParamsAsStringListMapInput } from "../models/models_0";
3+
import {
4+
deserializeAws_restJson1QueryParamsAsStringListMapCommand,
5+
serializeAws_restJson1QueryParamsAsStringListMapCommand,
6+
} from "../protocols/Aws_restJson1";
7+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
8+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
9+
import { Command as $Command } from "@aws-sdk/smithy-client";
10+
import {
11+
FinalizeHandlerArguments,
12+
Handler,
13+
HandlerExecutionContext,
14+
MiddlewareStack,
15+
HttpHandlerOptions as __HttpHandlerOptions,
16+
MetadataBearer as __MetadataBearer,
17+
SerdeContext as __SerdeContext,
18+
} from "@aws-sdk/types";
19+
20+
export type QueryParamsAsStringListMapCommandInput = QueryParamsAsStringListMapInput;
21+
export type QueryParamsAsStringListMapCommandOutput = __MetadataBearer;
22+
23+
export class QueryParamsAsStringListMapCommand extends $Command<
24+
QueryParamsAsStringListMapCommandInput,
25+
QueryParamsAsStringListMapCommandOutput,
26+
RestJsonProtocolClientResolvedConfig
27+
> {
28+
// Start section: command_properties
29+
// End section: command_properties
30+
31+
constructor(readonly input: QueryParamsAsStringListMapCommandInput) {
32+
// Start section: command_constructor
33+
super();
34+
// End section: command_constructor
35+
}
36+
37+
/**
38+
* @internal
39+
*/
40+
resolveMiddleware(
41+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
42+
configuration: RestJsonProtocolClientResolvedConfig,
43+
options?: __HttpHandlerOptions
44+
): Handler<QueryParamsAsStringListMapCommandInput, QueryParamsAsStringListMapCommandOutput> {
45+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
46+
47+
const stack = clientStack.concat(this.middlewareStack);
48+
49+
const { logger } = configuration;
50+
const clientName = "RestJsonProtocolClient";
51+
const commandName = "QueryParamsAsStringListMapCommand";
52+
const handlerExecutionContext: HandlerExecutionContext = {
53+
logger,
54+
clientName,
55+
commandName,
56+
inputFilterSensitiveLog: QueryParamsAsStringListMapInput.filterSensitiveLog,
57+
outputFilterSensitiveLog: (output: any) => output,
58+
};
59+
const { requestHandler } = configuration;
60+
return stack.resolve(
61+
(request: FinalizeHandlerArguments<any>) =>
62+
requestHandler.handle(request.request as __HttpRequest, options || {}),
63+
handlerExecutionContext
64+
);
65+
}
66+
67+
private serialize(input: QueryParamsAsStringListMapCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
68+
return serializeAws_restJson1QueryParamsAsStringListMapCommand(input, context);
69+
}
70+
71+
private deserialize(
72+
output: __HttpResponse,
73+
context: __SerdeContext
74+
): Promise<QueryParamsAsStringListMapCommandOutput> {
75+
return deserializeAws_restJson1QueryParamsAsStringListMapCommand(output, context);
76+
}
77+
78+
// Start section: command_body_extra
79+
// End section: command_body_extra
80+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
import { RestJsonProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RestJsonProtocolClient";
2+
import { QueryPrecedenceInput } from "../models/models_0";
3+
import {
4+
deserializeAws_restJson1QueryPrecedenceCommand,
5+
serializeAws_restJson1QueryPrecedenceCommand,
6+
} from "../protocols/Aws_restJson1";
7+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
8+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
9+
import { Command as $Command } from "@aws-sdk/smithy-client";
10+
import {
11+
FinalizeHandlerArguments,
12+
Handler,
13+
HandlerExecutionContext,
14+
MiddlewareStack,
15+
HttpHandlerOptions as __HttpHandlerOptions,
16+
MetadataBearer as __MetadataBearer,
17+
SerdeContext as __SerdeContext,
18+
} from "@aws-sdk/types";
19+
20+
export type QueryPrecedenceCommandInput = QueryPrecedenceInput;
21+
export type QueryPrecedenceCommandOutput = __MetadataBearer;
22+
23+
export class QueryPrecedenceCommand extends $Command<
24+
QueryPrecedenceCommandInput,
25+
QueryPrecedenceCommandOutput,
26+
RestJsonProtocolClientResolvedConfig
27+
> {
28+
// Start section: command_properties
29+
// End section: command_properties
30+
31+
constructor(readonly input: QueryPrecedenceCommandInput) {
32+
// Start section: command_constructor
33+
super();
34+
// End section: command_constructor
35+
}
36+
37+
/**
38+
* @internal
39+
*/
40+
resolveMiddleware(
41+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
42+
configuration: RestJsonProtocolClientResolvedConfig,
43+
options?: __HttpHandlerOptions
44+
): Handler<QueryPrecedenceCommandInput, QueryPrecedenceCommandOutput> {
45+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
46+
47+
const stack = clientStack.concat(this.middlewareStack);
48+
49+
const { logger } = configuration;
50+
const clientName = "RestJsonProtocolClient";
51+
const commandName = "QueryPrecedenceCommand";
52+
const handlerExecutionContext: HandlerExecutionContext = {
53+
logger,
54+
clientName,
55+
commandName,
56+
inputFilterSensitiveLog: QueryPrecedenceInput.filterSensitiveLog,
57+
outputFilterSensitiveLog: (output: any) => output,
58+
};
59+
const { requestHandler } = configuration;
60+
return stack.resolve(
61+
(request: FinalizeHandlerArguments<any>) =>
62+
requestHandler.handle(request.request as __HttpRequest, options || {}),
63+
handlerExecutionContext
64+
);
65+
}
66+
67+
private serialize(input: QueryPrecedenceCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
68+
return serializeAws_restJson1QueryPrecedenceCommand(input, context);
69+
}
70+
71+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<QueryPrecedenceCommandOutput> {
72+
return deserializeAws_restJson1QueryPrecedenceCommand(output, context);
73+
}
74+
75+
// Start section: command_body_extra
76+
// End section: command_body_extra
77+
}

Diff for: protocol_tests/aws-restjson/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ export * from "./commands/NullAndEmptyHeadersClientCommand";
3333
export * from "./commands/NullAndEmptyHeadersServerCommand";
3434
export * from "./commands/OmitsNullSerializesEmptyStringCommand";
3535
export * from "./commands/QueryIdempotencyTokenAutoFillCommand";
36+
export * from "./commands/QueryParamsAsStringListMapCommand";
37+
export * from "./commands/QueryPrecedenceCommand";
3638
export * from "./commands/RecursiveShapesCommand";
3739
export * from "./commands/SimpleScalarPropertiesCommand";
3840
export * from "./commands/StreamingTraitsCommand";

0 commit comments

Comments
 (0)