forked from loafle/openapi-generator-original
[typescript-axios] add temination condition for flattening url parameters (#14018)
This commit is contained in:
parent
fdf1ce6c51
commit
1b344597bf
@ -77,6 +77,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
||||||
|
if (parameter == null) return;
|
||||||
if (typeof parameter === "object") {
|
if (typeof parameter === "object") {
|
||||||
if (Array.isArray(parameter)) {
|
if (Array.isArray(parameter)) {
|
||||||
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
||||||
|
@ -85,6 +85,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
||||||
|
if (parameter == null) return;
|
||||||
if (typeof parameter === "object") {
|
if (typeof parameter === "object") {
|
||||||
if (Array.isArray(parameter)) {
|
if (Array.isArray(parameter)) {
|
||||||
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
||||||
|
@ -85,6 +85,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
||||||
|
if (parameter == null) return;
|
||||||
if (typeof parameter === "object") {
|
if (typeof parameter === "object") {
|
||||||
if (Array.isArray(parameter)) {
|
if (Array.isArray(parameter)) {
|
||||||
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
||||||
|
@ -85,6 +85,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
||||||
|
if (parameter == null) return;
|
||||||
if (typeof parameter === "object") {
|
if (typeof parameter === "object") {
|
||||||
if (Array.isArray(parameter)) {
|
if (Array.isArray(parameter)) {
|
||||||
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
||||||
|
@ -85,6 +85,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
||||||
|
if (parameter == null) return;
|
||||||
if (typeof parameter === "object") {
|
if (typeof parameter === "object") {
|
||||||
if (Array.isArray(parameter)) {
|
if (Array.isArray(parameter)) {
|
||||||
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
||||||
|
@ -85,6 +85,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
||||||
|
if (parameter == null) return;
|
||||||
if (typeof parameter === "object") {
|
if (typeof parameter === "object") {
|
||||||
if (Array.isArray(parameter)) {
|
if (Array.isArray(parameter)) {
|
||||||
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
||||||
|
@ -85,6 +85,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
||||||
|
if (parameter == null) return;
|
||||||
if (typeof parameter === "object") {
|
if (typeof parameter === "object") {
|
||||||
if (Array.isArray(parameter)) {
|
if (Array.isArray(parameter)) {
|
||||||
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
||||||
|
@ -85,6 +85,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
||||||
|
if (parameter == null) return;
|
||||||
if (typeof parameter === "object") {
|
if (typeof parameter === "object") {
|
||||||
if (Array.isArray(parameter)) {
|
if (Array.isArray(parameter)) {
|
||||||
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
||||||
|
@ -86,6 +86,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
||||||
|
if (parameter == null) return;
|
||||||
if (typeof parameter === "object") {
|
if (typeof parameter === "object") {
|
||||||
if (Array.isArray(parameter)) {
|
if (Array.isArray(parameter)) {
|
||||||
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
||||||
|
@ -85,6 +85,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
||||||
|
if (parameter == null) return;
|
||||||
if (typeof parameter === "object") {
|
if (typeof parameter === "object") {
|
||||||
if (Array.isArray(parameter)) {
|
if (Array.isArray(parameter)) {
|
||||||
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
||||||
|
@ -85,6 +85,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
||||||
|
if (parameter == null) return;
|
||||||
if (typeof parameter === "object") {
|
if (typeof parameter === "object") {
|
||||||
if (Array.isArray(parameter)) {
|
if (Array.isArray(parameter)) {
|
||||||
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
||||||
|
@ -85,6 +85,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
||||||
|
if (parameter == null) return;
|
||||||
if (typeof parameter === "object") {
|
if (typeof parameter === "object") {
|
||||||
if (Array.isArray(parameter)) {
|
if (Array.isArray(parameter)) {
|
||||||
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
||||||
|
@ -85,6 +85,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
||||||
|
if (parameter == null) return;
|
||||||
if (typeof parameter === "object") {
|
if (typeof parameter === "object") {
|
||||||
if (Array.isArray(parameter)) {
|
if (Array.isArray(parameter)) {
|
||||||
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user