From 0f8f18e72711727837bb23f47ffd55304c85e856 Mon Sep 17 00:00:00 2001 From: Yoonho Go Date: Fri, 25 Aug 2023 17:41:22 +0900 Subject: [PATCH] Update api.service.mustache (#16406) Fix miscast types. At compile time, it says it can't find toISOString because the parameter is of type string, because modifies the whole thing. --- .../src/main/resources/typescript-nestjs/api.service.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-nestjs/api.service.mustache b/modules/openapi-generator/src/main/resources/typescript-nestjs/api.service.mustache index 1cc4e0ef41a..5c17513f994 100644 --- a/modules/openapi-generator/src/main/resources/typescript-nestjs/api.service.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-nestjs/api.service.mustache @@ -93,7 +93,7 @@ export class {{classname}} { {{^isArray}} if ({{paramName}} !== undefined && {{paramName}} !== null) { {{#isDateTime}} - queryParameters.append('{{baseName}}', {{paramName}}.toISOString()); + queryParameters.append('{{baseName}}', ({{paramName}}).toISOString()); {{/isDateTime}} {{^isDateTime}} queryParameters.append('{{baseName}}', {{paramName}});