Skip to content

Commit 65e0ce0

Browse files
authored
chore: codegen for undo query encoding (#938)
remove the query encoding in the codegenerator. It will be handled inside request handler. Corresponding V3 PR: [#935](#935)
1 parent 251dd57 commit 65e0ce0

File tree

73 files changed

+1434
-4310
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1434
-4310
lines changed

clients/client-accessanalyzer/protocols/Aws_restJson1_1.ts

Lines changed: 11 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,7 @@ export async function serializeAws_restJson1_1DeleteAnalyzerCommand(
218218
}
219219
const query: any = {};
220220
if (input.clientToken !== undefined) {
221-
query[
222-
__extendedEncodeURIComponent("clientToken")
223-
] = __extendedEncodeURIComponent(input.clientToken);
221+
query["clientToken"] = input.clientToken;
224222
}
225223
return new __HttpRequest({
226224
...context.endpoint,
@@ -267,9 +265,7 @@ export async function serializeAws_restJson1_1DeleteArchiveRuleCommand(
267265
}
268266
const query: any = {};
269267
if (input.clientToken !== undefined) {
270-
query[
271-
__extendedEncodeURIComponent("clientToken")
272-
] = __extendedEncodeURIComponent(input.clientToken);
268+
query["clientToken"] = input.clientToken;
273269
}
274270
return new __HttpRequest({
275271
...context.endpoint,
@@ -290,14 +286,10 @@ export async function serializeAws_restJson1_1GetAnalyzedResourceCommand(
290286
let resolvedPath = "/analyzed-resource";
291287
const query: any = {};
292288
if (input.analyzerArn !== undefined) {
293-
query[
294-
__extendedEncodeURIComponent("analyzerArn")
295-
] = __extendedEncodeURIComponent(input.analyzerArn);
289+
query["analyzerArn"] = input.analyzerArn;
296290
}
297291
if (input.resourceArn !== undefined) {
298-
query[
299-
__extendedEncodeURIComponent("resourceArn")
300-
] = __extendedEncodeURIComponent(input.resourceArn);
292+
query["resourceArn"] = input.resourceArn;
301293
}
302294
return new __HttpRequest({
303295
...context.endpoint,
@@ -402,9 +394,7 @@ export async function serializeAws_restJson1_1GetFindingCommand(
402394
}
403395
const query: any = {};
404396
if (input.analyzerArn !== undefined) {
405-
query[
406-
__extendedEncodeURIComponent("analyzerArn")
407-
] = __extendedEncodeURIComponent(input.analyzerArn);
397+
query["analyzerArn"] = input.analyzerArn;
408398
}
409399
return new __HttpRequest({
410400
...context.endpoint,
@@ -457,19 +447,13 @@ export async function serializeAws_restJson1_1ListAnalyzersCommand(
457447
let resolvedPath = "/analyzer";
458448
const query: any = {};
459449
if (input.maxResults !== undefined) {
460-
query[
461-
__extendedEncodeURIComponent("maxResults")
462-
] = __extendedEncodeURIComponent(input.maxResults.toString());
450+
query["maxResults"] = input.maxResults.toString();
463451
}
464452
if (input.nextToken !== undefined) {
465-
query[
466-
__extendedEncodeURIComponent("nextToken")
467-
] = __extendedEncodeURIComponent(input.nextToken);
453+
query["nextToken"] = input.nextToken;
468454
}
469455
if (input.type !== undefined) {
470-
query[__extendedEncodeURIComponent("type")] = __extendedEncodeURIComponent(
471-
input.type
472-
);
456+
query["type"] = input.type;
473457
}
474458
return new __HttpRequest({
475459
...context.endpoint,
@@ -504,14 +488,10 @@ export async function serializeAws_restJson1_1ListArchiveRulesCommand(
504488
}
505489
const query: any = {};
506490
if (input.maxResults !== undefined) {
507-
query[
508-
__extendedEncodeURIComponent("maxResults")
509-
] = __extendedEncodeURIComponent(input.maxResults.toString());
491+
query["maxResults"] = input.maxResults.toString();
510492
}
511493
if (input.nextToken !== undefined) {
512-
query[
513-
__extendedEncodeURIComponent("nextToken")
514-
] = __extendedEncodeURIComponent(input.nextToken);
494+
query["nextToken"] = input.nextToken;
515495
}
516496
return new __HttpRequest({
517497
...context.endpoint,
@@ -680,9 +660,7 @@ export async function serializeAws_restJson1_1UntagResourceCommand(
680660
}
681661
const query: any = {};
682662
if (input.tagKeys !== undefined) {
683-
query[__extendedEncodeURIComponent("tagKeys")] = input.tagKeys.map(entry =>
684-
__extendedEncodeURIComponent(entry)
685-
);
663+
query["tagKeys"] = input.tagKeys;
686664
}
687665
return new __HttpRequest({
688666
...context.endpoint,

clients/client-amplify/protocols/Aws_restJson1_1.ts

Lines changed: 15 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,14 +1069,10 @@ export async function serializeAws_restJson1_1ListAppsCommand(
10691069
let resolvedPath = "/apps";
10701070
const query: any = {};
10711071
if (input.maxResults !== undefined) {
1072-
query[
1073-
__extendedEncodeURIComponent("maxResults")
1074-
] = __extendedEncodeURIComponent(input.maxResults.toString());
1072+
query["maxResults"] = input.maxResults.toString();
10751073
}
10761074
if (input.nextToken !== undefined) {
1077-
query[
1078-
__extendedEncodeURIComponent("nextToken")
1079-
] = __extendedEncodeURIComponent(input.nextToken);
1075+
query["nextToken"] = input.nextToken;
10801076
}
10811077
return new __HttpRequest({
10821078
...context.endpoint,
@@ -1134,14 +1130,10 @@ export async function serializeAws_restJson1_1ListArtifactsCommand(
11341130
}
11351131
const query: any = {};
11361132
if (input.maxResults !== undefined) {
1137-
query[
1138-
__extendedEncodeURIComponent("maxResults")
1139-
] = __extendedEncodeURIComponent(input.maxResults.toString());
1133+
query["maxResults"] = input.maxResults.toString();
11401134
}
11411135
if (input.nextToken !== undefined) {
1142-
query[
1143-
__extendedEncodeURIComponent("nextToken")
1144-
] = __extendedEncodeURIComponent(input.nextToken);
1136+
query["nextToken"] = input.nextToken;
11451137
}
11461138
return new __HttpRequest({
11471139
...context.endpoint,
@@ -1174,14 +1166,10 @@ export async function serializeAws_restJson1_1ListBackendEnvironmentsCommand(
11741166
}
11751167
const query: any = {};
11761168
if (input.maxResults !== undefined) {
1177-
query[
1178-
__extendedEncodeURIComponent("maxResults")
1179-
] = __extendedEncodeURIComponent(input.maxResults.toString());
1169+
query["maxResults"] = input.maxResults.toString();
11801170
}
11811171
if (input.nextToken !== undefined) {
1182-
query[
1183-
__extendedEncodeURIComponent("nextToken")
1184-
] = __extendedEncodeURIComponent(input.nextToken);
1172+
query["nextToken"] = input.nextToken;
11851173
}
11861174
let body: any;
11871175
const bodyParams: any = {};
@@ -1221,14 +1209,10 @@ export async function serializeAws_restJson1_1ListBranchesCommand(
12211209
}
12221210
const query: any = {};
12231211
if (input.maxResults !== undefined) {
1224-
query[
1225-
__extendedEncodeURIComponent("maxResults")
1226-
] = __extendedEncodeURIComponent(input.maxResults.toString());
1212+
query["maxResults"] = input.maxResults.toString();
12271213
}
12281214
if (input.nextToken !== undefined) {
1229-
query[
1230-
__extendedEncodeURIComponent("nextToken")
1231-
] = __extendedEncodeURIComponent(input.nextToken);
1215+
query["nextToken"] = input.nextToken;
12321216
}
12331217
return new __HttpRequest({
12341218
...context.endpoint,
@@ -1261,14 +1245,10 @@ export async function serializeAws_restJson1_1ListDomainAssociationsCommand(
12611245
}
12621246
const query: any = {};
12631247
if (input.maxResults !== undefined) {
1264-
query[
1265-
__extendedEncodeURIComponent("maxResults")
1266-
] = __extendedEncodeURIComponent(input.maxResults.toString());
1248+
query["maxResults"] = input.maxResults.toString();
12671249
}
12681250
if (input.nextToken !== undefined) {
1269-
query[
1270-
__extendedEncodeURIComponent("nextToken")
1271-
] = __extendedEncodeURIComponent(input.nextToken);
1251+
query["nextToken"] = input.nextToken;
12721252
}
12731253
return new __HttpRequest({
12741254
...context.endpoint,
@@ -1313,14 +1293,10 @@ export async function serializeAws_restJson1_1ListJobsCommand(
13131293
}
13141294
const query: any = {};
13151295
if (input.maxResults !== undefined) {
1316-
query[
1317-
__extendedEncodeURIComponent("maxResults")
1318-
] = __extendedEncodeURIComponent(input.maxResults.toString());
1296+
query["maxResults"] = input.maxResults.toString();
13191297
}
13201298
if (input.nextToken !== undefined) {
1321-
query[
1322-
__extendedEncodeURIComponent("nextToken")
1323-
] = __extendedEncodeURIComponent(input.nextToken);
1299+
query["nextToken"] = input.nextToken;
13241300
}
13251301
return new __HttpRequest({
13261302
...context.endpoint,
@@ -1383,14 +1359,10 @@ export async function serializeAws_restJson1_1ListWebhooksCommand(
13831359
}
13841360
const query: any = {};
13851361
if (input.maxResults !== undefined) {
1386-
query[
1387-
__extendedEncodeURIComponent("maxResults")
1388-
] = __extendedEncodeURIComponent(input.maxResults.toString());
1362+
query["maxResults"] = input.maxResults.toString();
13891363
}
13901364
if (input.nextToken !== undefined) {
1391-
query[
1392-
__extendedEncodeURIComponent("nextToken")
1393-
] = __extendedEncodeURIComponent(input.nextToken);
1365+
query["nextToken"] = input.nextToken;
13941366
}
13951367
return new __HttpRequest({
13961368
...context.endpoint,
@@ -1626,9 +1598,7 @@ export async function serializeAws_restJson1_1UntagResourceCommand(
16261598
}
16271599
const query: any = {};
16281600
if (input.tagKeys !== undefined) {
1629-
query[__extendedEncodeURIComponent("tagKeys")] = input.tagKeys.map(entry =>
1630-
__extendedEncodeURIComponent(entry)
1631-
);
1601+
query["tagKeys"] = input.tagKeys;
16321602
}
16331603
return new __HttpRequest({
16341604
...context.endpoint,

0 commit comments

Comments
 (0)