Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: codegen for fix uriencoding path #894

Merged
merged 1 commit into from
Feb 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
73 changes: 14 additions & 59 deletions clients/client-accessanalyzer/protocols/Aws_restJson1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,7 @@ export async function serializeAws_restJson1_1CreateArchiveRuleCommand(
}
resolvedPath = resolvedPath.replace(
"{analyzerName}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
encodeURIComponent(labelValue)
);
} else {
throw new Error("No value provided for input HTTP label: analyzerName.");
Expand Down Expand Up @@ -211,10 +208,7 @@ export async function serializeAws_restJson1_1DeleteAnalyzerCommand(
}
resolvedPath = resolvedPath.replace(
"{analyzerName}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
encodeURIComponent(labelValue)
);
} else {
throw new Error("No value provided for input HTTP label: analyzerName.");
Expand Down Expand Up @@ -249,10 +243,7 @@ export async function serializeAws_restJson1_1DeleteArchiveRuleCommand(
}
resolvedPath = resolvedPath.replace(
"{analyzerName}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
encodeURIComponent(labelValue)
);
} else {
throw new Error("No value provided for input HTTP label: analyzerName.");
Expand All @@ -264,10 +255,7 @@ export async function serializeAws_restJson1_1DeleteArchiveRuleCommand(
}
resolvedPath = resolvedPath.replace(
"{ruleName}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
encodeURIComponent(labelValue)
);
} else {
throw new Error("No value provided for input HTTP label: ruleName.");
Expand Down Expand Up @@ -326,10 +314,7 @@ export async function serializeAws_restJson1_1GetAnalyzerCommand(
}
resolvedPath = resolvedPath.replace(
"{analyzerName}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
encodeURIComponent(labelValue)
);
} else {
throw new Error("No value provided for input HTTP label: analyzerName.");
Expand Down Expand Up @@ -359,10 +344,7 @@ export async function serializeAws_restJson1_1GetArchiveRuleCommand(
}
resolvedPath = resolvedPath.replace(
"{analyzerName}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
encodeURIComponent(labelValue)
);
} else {
throw new Error("No value provided for input HTTP label: analyzerName.");
Expand All @@ -374,10 +356,7 @@ export async function serializeAws_restJson1_1GetArchiveRuleCommand(
}
resolvedPath = resolvedPath.replace(
"{ruleName}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
encodeURIComponent(labelValue)
);
} else {
throw new Error("No value provided for input HTTP label: ruleName.");
Expand All @@ -403,13 +382,7 @@ export async function serializeAws_restJson1_1GetFindingCommand(
if (labelValue.length <= 0) {
throw new Error("Empty value provided for input HTTP label: id.");
}
resolvedPath = resolvedPath.replace(
"{id}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
);
resolvedPath = resolvedPath.replace("{id}", encodeURIComponent(labelValue));
} else {
throw new Error("No value provided for input HTTP label: id.");
}
Expand Down Expand Up @@ -502,10 +475,7 @@ export async function serializeAws_restJson1_1ListArchiveRulesCommand(
}
resolvedPath = resolvedPath.replace(
"{analyzerName}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
encodeURIComponent(labelValue)
);
} else {
throw new Error("No value provided for input HTTP label: analyzerName.");
Expand Down Expand Up @@ -584,10 +554,7 @@ export async function serializeAws_restJson1_1ListTagsForResourceCommand(
}
resolvedPath = resolvedPath.replace(
"{resourceArn}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
encodeURIComponent(labelValue)
);
} else {
throw new Error("No value provided for input HTTP label: resourceArn.");
Expand Down Expand Up @@ -643,10 +610,7 @@ export async function serializeAws_restJson1_1TagResourceCommand(
}
resolvedPath = resolvedPath.replace(
"{resourceArn}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
encodeURIComponent(labelValue)
);
} else {
throw new Error("No value provided for input HTTP label: resourceArn.");
Expand Down Expand Up @@ -683,10 +647,7 @@ export async function serializeAws_restJson1_1UntagResourceCommand(
}
resolvedPath = resolvedPath.replace(
"{resourceArn}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
encodeURIComponent(labelValue)
);
} else {
throw new Error("No value provided for input HTTP label: resourceArn.");
Expand Down Expand Up @@ -721,10 +682,7 @@ export async function serializeAws_restJson1_1UpdateArchiveRuleCommand(
}
resolvedPath = resolvedPath.replace(
"{analyzerName}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
encodeURIComponent(labelValue)
);
} else {
throw new Error("No value provided for input HTTP label: analyzerName.");
Expand All @@ -736,10 +694,7 @@ export async function serializeAws_restJson1_1UpdateArchiveRuleCommand(
}
resolvedPath = resolvedPath.replace(
"{ruleName}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
encodeURIComponent(labelValue)
);
} else {
throw new Error("No value provided for input HTTP label: ruleName.");
Expand Down