diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache index a8d7af2354c..624feac809f 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache @@ -198,6 +198,7 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string { } return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; }) + .filter(part => part.length > 0) .join('&'); } diff --git a/samples/client/petstore/typescript-fetch/builds/default/runtime.ts b/samples/client/petstore/typescript-fetch/builds/default/runtime.ts index 0afb0ba14c0..be61a90a51f 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/runtime.ts @@ -209,6 +209,7 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string { } return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; }) + .filter(part => part.length > 0) .join('&'); } diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/runtime.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/runtime.ts index 0afb0ba14c0..be61a90a51f 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/runtime.ts @@ -209,6 +209,7 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string { } return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; }) + .filter(part => part.length > 0) .join('&'); } diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts index 0afb0ba14c0..be61a90a51f 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts @@ -209,6 +209,7 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string { } return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; }) + .filter(part => part.length > 0) .join('&'); } diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/runtime.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/runtime.ts index 0afb0ba14c0..be61a90a51f 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/runtime.ts @@ -209,6 +209,7 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string { } return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; }) + .filter(part => part.length > 0) .join('&'); }