From 959dd6effadc9dbf5e568f423ef72d541c568380 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Malard?= Date: Thu, 9 Jan 2020 11:02:45 +0100 Subject: [PATCH] Fix missing quotes Introduced in 4b74540 --- .../handlebars/typescript-angular/api.service.mustache | 10 +++++----- .../mustache/typescript-angular/api.service.mustache | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/resources/handlebars/typescript-angular/api.service.mustache b/src/main/resources/handlebars/typescript-angular/api.service.mustache index 71cc3d46d0..24291587d8 100644 --- a/src/main/resources/handlebars/typescript-angular/api.service.mustache +++ b/src/main/resources/handlebars/typescript-angular/api.service.mustache @@ -320,13 +320,13 @@ export class {{classname}} { {{/hasFormParams}} {{#useHttpClient}} - return this.httpClient.request{{^isResponseFile}}<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>{{/isResponseFile}}({{httpMethod}},`${this.basePath}{{{path}}}`, + return this.httpClient.request{{^isResponseFile}}<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>{{/isResponseFile}}('{{httpMethod}}',`${this.basePath}{{{path}}}`, { {{#bodyParam}} - body: {{paramName}} + body: {{paramName}}, {{/bodyParam}} {{#hasFormParams}} - body: convertFormParamsToString ? formParams.toString() : formParams + body: convertFormParamsToString ? formParams.toString() : formParams, {{/hasFormParams}} {{#hasQueryParams}} params: queryParameters, @@ -343,7 +343,7 @@ export class {{classname}} { {{/useHttpClient}} {{^useHttpClient}} let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: {{httpMethod}}, + method: '{{httpMethod}}', headers: headers, {{#bodyParam}} body: {{paramName}} == null ? '' : JSON.stringify({{paramName}}), // https://github.com/angular/angular/issues/10612 @@ -357,7 +357,7 @@ export class {{classname}} { {{#hasQueryParams}} search: queryParameters, {{/hasQueryParams}} - withCredentials:this.configuration.withCredentials + withCredentials: this.configuration.withCredentials }); // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { diff --git a/src/main/resources/mustache/typescript-angular/api.service.mustache b/src/main/resources/mustache/typescript-angular/api.service.mustache index e25822b31f..8c03561e5b 100644 --- a/src/main/resources/mustache/typescript-angular/api.service.mustache +++ b/src/main/resources/mustache/typescript-angular/api.service.mustache @@ -320,13 +320,13 @@ export class {{classname}} { {{/hasFormParams}} {{#useHttpClient}} - return this.httpClient.request{{^isResponseFile}}<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>{{/isResponseFile}}({{httpMethod}},`${this.basePath}{{{path}}}`, + return this.httpClient.request{{^isResponseFile}}<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>{{/isResponseFile}}('{{httpMethod}}',`${this.basePath}{{{path}}}`, { {{#bodyParam}} - body: {{paramName}} + body: {{paramName}}, {{/bodyParam}} {{#hasFormParams}} - body: convertFormParamsToString ? formParams.toString() : formParams + body: convertFormParamsToString ? formParams.toString() : formParams, {{/hasFormParams}} {{#hasQueryParams}} params: queryParameters, @@ -343,7 +343,7 @@ export class {{classname}} { {{/useHttpClient}} {{^useHttpClient}} let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: {{httpMethod}}, + method: '{{httpMethod}}', headers: headers, {{#bodyParam}} body: {{paramName}} == null ? '' : JSON.stringify({{paramName}}), // https://github.com/angular/angular/issues/10612 @@ -357,7 +357,7 @@ export class {{classname}} { {{#hasQueryParams}} search: queryParameters, {{/hasQueryParams}} - withCredentials:this.configuration.withCredentials + withCredentials: this.configuration.withCredentials }); // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) {