mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-03 14:10:56 +00:00
[typescript-fetch] Double ampersand in query string with empty nested object (#2679)
* [typescript-fetch] Filter empty parts from querystring before joining with '&' * [typescript-fetch] Update samples
This commit is contained in:
parent
6a11a107d1
commit
e17890d526
@ -198,6 +198,7 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string {
|
||||
}
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
||||
})
|
||||
.filter(part => part.length > 0)
|
||||
.join('&');
|
||||
}
|
||||
|
||||
|
@ -209,6 +209,7 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string {
|
||||
}
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
||||
})
|
||||
.filter(part => part.length > 0)
|
||||
.join('&');
|
||||
}
|
||||
|
||||
|
@ -209,6 +209,7 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string {
|
||||
}
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
||||
})
|
||||
.filter(part => part.length > 0)
|
||||
.join('&');
|
||||
}
|
||||
|
||||
|
@ -209,6 +209,7 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string {
|
||||
}
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
||||
})
|
||||
.filter(part => part.length > 0)
|
||||
.join('&');
|
||||
}
|
||||
|
||||
|
@ -209,6 +209,7 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string {
|
||||
}
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
||||
})
|
||||
.filter(part => part.length > 0)
|
||||
.join('&');
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user