Fixed call of toISOString on a string type when using string type-mapping (#5057)

This commit is contained in:
Liam Martens
2020-01-20 16:59:16 +01:00
committed by Esteban Gehring
parent 2416fc0c76
commit 7599531960

View File

@@ -115,7 +115,9 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur
{{^isListContainer}}
if ({{paramName}} !== undefined) {
{{#isDateTime}}
localVarQueryParameter['{{baseName}}'] = ({{paramName}} as any).toISOString();
localVarQueryParameter['{{baseName}}'] = ({{paramName}} as any instanceof Date) ?
({{paramName}} as any).toISOString() :
{{paramName}};
{{/isDateTime}}
{{^isDateTime}}
{{#isDate}}