From 402f2d29fa070c467420a9c71d848fb09bd48d07 Mon Sep 17 00:00:00 2001 From: tsiq-jeremy Date: Mon, 22 Jul 2019 14:57:40 -0400 Subject: [PATCH 1/2] fix axios issue --- .../src/main/resources/typescript-axios/apiInner.mustache | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache index 36f96f299a25..80e467febb1d 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache @@ -118,7 +118,9 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur {{/isDateTime}} {{^isDateTime}} {{#isDate}} - localVarQueryParameter['{{baseName}}'] = ({{paramName}} as any).toISOString(); + localVarQueryParameter['{{baseName}}'] = ({{paramName}} as any instanceof Date) ? + ({{paramName}} as any).toISOString().substr(0,10); : + {{paramName}}; {{/isDate}} {{^isDate}} localVarQueryParameter['{{baseName}}'] = {{paramName}}; From dc86c79283b366538c9d4d3598b3cd5e6872a5c8 Mon Sep 17 00:00:00 2001 From: tsiq-jeremy Date: Mon, 22 Jul 2019 14:59:08 -0400 Subject: [PATCH 2/2] fix typo --- .../src/main/resources/typescript-axios/apiInner.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache index 80e467febb1d..52c5354446c0 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache @@ -119,7 +119,7 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur {{^isDateTime}} {{#isDate}} localVarQueryParameter['{{baseName}}'] = ({{paramName}} as any instanceof Date) ? - ({{paramName}} as any).toISOString().substr(0,10); : + ({{paramName}} as any).toISOString().substr(0,10) : {{paramName}}; {{/isDate}} {{^isDate}}