Skip to content

Commit c0f919b

Browse files
authored
chore: codegen for fix uriencoding path (#894)
1 parent 1c996e1 commit c0f919b

File tree

72 files changed

+2348
-9053
lines changed

Some content is hidden

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

72 files changed

+2348
-9053
lines changed

clients/client-accessanalyzer/protocols/Aws_restJson1_1.ts

+14-59
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,7 @@ export async function serializeAws_restJson1_1CreateArchiveRuleCommand(
159159
}
160160
resolvedPath = resolvedPath.replace(
161161
"{analyzerName}",
162-
labelValue
163-
.split("/")
164-
.map(segment => encodeURIComponent(segment))
165-
.join("/")
162+
encodeURIComponent(labelValue)
166163
);
167164
} else {
168165
throw new Error("No value provided for input HTTP label: analyzerName.");
@@ -211,10 +208,7 @@ export async function serializeAws_restJson1_1DeleteAnalyzerCommand(
211208
}
212209
resolvedPath = resolvedPath.replace(
213210
"{analyzerName}",
214-
labelValue
215-
.split("/")
216-
.map(segment => encodeURIComponent(segment))
217-
.join("/")
211+
encodeURIComponent(labelValue)
218212
);
219213
} else {
220214
throw new Error("No value provided for input HTTP label: analyzerName.");
@@ -249,10 +243,7 @@ export async function serializeAws_restJson1_1DeleteArchiveRuleCommand(
249243
}
250244
resolvedPath = resolvedPath.replace(
251245
"{analyzerName}",
252-
labelValue
253-
.split("/")
254-
.map(segment => encodeURIComponent(segment))
255-
.join("/")
246+
encodeURIComponent(labelValue)
256247
);
257248
} else {
258249
throw new Error("No value provided for input HTTP label: analyzerName.");
@@ -264,10 +255,7 @@ export async function serializeAws_restJson1_1DeleteArchiveRuleCommand(
264255
}
265256
resolvedPath = resolvedPath.replace(
266257
"{ruleName}",
267-
labelValue
268-
.split("/")
269-
.map(segment => encodeURIComponent(segment))
270-
.join("/")
258+
encodeURIComponent(labelValue)
271259
);
272260
} else {
273261
throw new Error("No value provided for input HTTP label: ruleName.");
@@ -326,10 +314,7 @@ export async function serializeAws_restJson1_1GetAnalyzerCommand(
326314
}
327315
resolvedPath = resolvedPath.replace(
328316
"{analyzerName}",
329-
labelValue
330-
.split("/")
331-
.map(segment => encodeURIComponent(segment))
332-
.join("/")
317+
encodeURIComponent(labelValue)
333318
);
334319
} else {
335320
throw new Error("No value provided for input HTTP label: analyzerName.");
@@ -359,10 +344,7 @@ export async function serializeAws_restJson1_1GetArchiveRuleCommand(
359344
}
360345
resolvedPath = resolvedPath.replace(
361346
"{analyzerName}",
362-
labelValue
363-
.split("/")
364-
.map(segment => encodeURIComponent(segment))
365-
.join("/")
347+
encodeURIComponent(labelValue)
366348
);
367349
} else {
368350
throw new Error("No value provided for input HTTP label: analyzerName.");
@@ -374,10 +356,7 @@ export async function serializeAws_restJson1_1GetArchiveRuleCommand(
374356
}
375357
resolvedPath = resolvedPath.replace(
376358
"{ruleName}",
377-
labelValue
378-
.split("/")
379-
.map(segment => encodeURIComponent(segment))
380-
.join("/")
359+
encodeURIComponent(labelValue)
381360
);
382361
} else {
383362
throw new Error("No value provided for input HTTP label: ruleName.");
@@ -403,13 +382,7 @@ export async function serializeAws_restJson1_1GetFindingCommand(
403382
if (labelValue.length <= 0) {
404383
throw new Error("Empty value provided for input HTTP label: id.");
405384
}
406-
resolvedPath = resolvedPath.replace(
407-
"{id}",
408-
labelValue
409-
.split("/")
410-
.map(segment => encodeURIComponent(segment))
411-
.join("/")
412-
);
385+
resolvedPath = resolvedPath.replace("{id}", encodeURIComponent(labelValue));
413386
} else {
414387
throw new Error("No value provided for input HTTP label: id.");
415388
}
@@ -502,10 +475,7 @@ export async function serializeAws_restJson1_1ListArchiveRulesCommand(
502475
}
503476
resolvedPath = resolvedPath.replace(
504477
"{analyzerName}",
505-
labelValue
506-
.split("/")
507-
.map(segment => encodeURIComponent(segment))
508-
.join("/")
478+
encodeURIComponent(labelValue)
509479
);
510480
} else {
511481
throw new Error("No value provided for input HTTP label: analyzerName.");
@@ -584,10 +554,7 @@ export async function serializeAws_restJson1_1ListTagsForResourceCommand(
584554
}
585555
resolvedPath = resolvedPath.replace(
586556
"{resourceArn}",
587-
labelValue
588-
.split("/")
589-
.map(segment => encodeURIComponent(segment))
590-
.join("/")
557+
encodeURIComponent(labelValue)
591558
);
592559
} else {
593560
throw new Error("No value provided for input HTTP label: resourceArn.");
@@ -643,10 +610,7 @@ export async function serializeAws_restJson1_1TagResourceCommand(
643610
}
644611
resolvedPath = resolvedPath.replace(
645612
"{resourceArn}",
646-
labelValue
647-
.split("/")
648-
.map(segment => encodeURIComponent(segment))
649-
.join("/")
613+
encodeURIComponent(labelValue)
650614
);
651615
} else {
652616
throw new Error("No value provided for input HTTP label: resourceArn.");
@@ -683,10 +647,7 @@ export async function serializeAws_restJson1_1UntagResourceCommand(
683647
}
684648
resolvedPath = resolvedPath.replace(
685649
"{resourceArn}",
686-
labelValue
687-
.split("/")
688-
.map(segment => encodeURIComponent(segment))
689-
.join("/")
650+
encodeURIComponent(labelValue)
690651
);
691652
} else {
692653
throw new Error("No value provided for input HTTP label: resourceArn.");
@@ -721,10 +682,7 @@ export async function serializeAws_restJson1_1UpdateArchiveRuleCommand(
721682
}
722683
resolvedPath = resolvedPath.replace(
723684
"{analyzerName}",
724-
labelValue
725-
.split("/")
726-
.map(segment => encodeURIComponent(segment))
727-
.join("/")
685+
encodeURIComponent(labelValue)
728686
);
729687
} else {
730688
throw new Error("No value provided for input HTTP label: analyzerName.");
@@ -736,10 +694,7 @@ export async function serializeAws_restJson1_1UpdateArchiveRuleCommand(
736694
}
737695
resolvedPath = resolvedPath.replace(
738696
"{ruleName}",
739-
labelValue
740-
.split("/")
741-
.map(segment => encodeURIComponent(segment))
742-
.join("/")
697+
encodeURIComponent(labelValue)
743698
);
744699
} else {
745700
throw new Error("No value provided for input HTTP label: ruleName.");

0 commit comments

Comments
 (0)