From c45af23946779a88444dab5a9795a19a41accbe5 Mon Sep 17 00:00:00 2001 From: Martin Hardorf Date: Tue, 23 Jun 2015 12:05:43 +0200 Subject: [PATCH] Fixed headerParams and paramName --- .../src/main/resources/TypeScript-Angular/api.mustache | 8 ++++---- .../src/main/resources/TypeScript-node/api.mustache | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/TypeScript-Angular/api.mustache b/modules/swagger-codegen/src/main/resources/TypeScript-Angular/api.mustache index 1095667b245..1bc4a8a02a1 100644 --- a/modules/swagger-codegen/src/main/resources/TypeScript-Angular/api.mustache +++ b/modules/swagger-codegen/src/main/resources/TypeScript-Angular/api.mustache @@ -22,13 +22,13 @@ module {{package}} { } } {{#operation}} - public {{nickname}} ({{#allParams}}{{paramName}}: {{{dataType}}}, {{/allParams}} extraHttpRequestParams?: any ) : ng.IHttpPromise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}{}{{/returnType}}> { + public {{nickname}} ({{#allParams}}{{paramName}}: {{{dataType}}}{{#hasMore}}, {{/hasMore}} {{/allParams}} extraHttpRequestParams?: any ) : ng.IHttpPromise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}{}{{/returnType}}> { var path = this.basePath + '{{path}}'; {{#pathParams}} path = path.replace('{' + '{{paramName}}' + '}', String({{paramName}})); {{/pathParams}} var queryParameters: any = {}; - var headers: any = {}; + var headerParams: any = {}; {{#allParams}}{{#required}} // verify required parameter '{{paramName}}' is set if (!{{paramName}}) { @@ -43,10 +43,10 @@ module {{package}} { method: '{{httpMethod}}', url: path, json: true, - {{#bodyParam}}data: body, + {{#bodyParam}}data: {{paramName}}, {{/bodyParam}} params: queryParameters, - headers: headers + headers: headerParams }; if (extraHttpRequestParams) { diff --git a/modules/swagger-codegen/src/main/resources/TypeScript-node/api.mustache b/modules/swagger-codegen/src/main/resources/TypeScript-node/api.mustache index 156ad63f72d..eb569cdc928 100644 --- a/modules/swagger-codegen/src/main/resources/TypeScript-node/api.mustache +++ b/modules/swagger-codegen/src/main/resources/TypeScript-node/api.mustache @@ -24,7 +24,7 @@ export class {{classname}} { {{/pathParams}} var queryParameters: any = {}; - var headers: any = {}; + var headerParams: any = {}; {{#allParams}}{{#required}} // verify required parameter '{{paramName}}' is set @@ -48,7 +48,7 @@ export class {{classname}} { qs: queryParameters, uri: path, json: true, - {{#bodyParam}}body: body, + {{#bodyParam}}body: {{paramName}}, {{/bodyParam}} auth: { username: this.username, password: this.password