diff --git a/modules/swagger-codegen/src/main/resources/typescript-angular2/api.mustache b/modules/swagger-codegen/src/main/resources/typescript-angular2/api.mustache index cff9a078f65a..6f085fe34119 100644 --- a/modules/swagger-codegen/src/main/resources/typescript-angular2/api.mustache +++ b/modules/swagger-codegen/src/main/resources/typescript-angular2/api.mustache @@ -98,10 +98,9 @@ export class {{classname}} { } {{/queryParams}} -{{#headers}} +{{#headerParams}} headers.set('{{baseName}}', String({{paramName}})); - -{{/headers}} +{{/headerParams}} // to determine the Content-Type header let consumes: string[] = [ diff --git a/samples/client/petstore/typescript-angular2/default/api/PetApi.ts b/samples/client/petstore/typescript-angular2/default/api/PetApi.ts index ae42240256f3..70ab123c5a5d 100644 --- a/samples/client/petstore/typescript-angular2/default/api/PetApi.ts +++ b/samples/client/petstore/typescript-angular2/default/api/PetApi.ts @@ -255,6 +255,7 @@ export class PetApi { throw new Error('Required parameter petId was null or undefined when calling deletePet.'); } + headers.set('api_key', String(apiKey)); // to determine the Content-Type header let consumes: string[] = [ diff --git a/samples/client/petstore/typescript-angular2/npm/README.md b/samples/client/petstore/typescript-angular2/npm/README.md index 578fb3165a20..1c4f0c5bd4ff 100644 --- a/samples/client/petstore/typescript-angular2/npm/README.md +++ b/samples/client/petstore/typescript-angular2/npm/README.md @@ -1,4 +1,4 @@ -## @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201612011557 +## @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201612061134 ### Building @@ -19,7 +19,7 @@ navigate to the folder of your consuming project and run one of next commando's. _published:_ ``` -npm install @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201612011557 --save +npm install @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201612061134 --save ``` _unPublished (not recommended):_ diff --git a/samples/client/petstore/typescript-angular2/npm/api/PetApi.ts b/samples/client/petstore/typescript-angular2/npm/api/PetApi.ts index ae42240256f3..70ab123c5a5d 100644 --- a/samples/client/petstore/typescript-angular2/npm/api/PetApi.ts +++ b/samples/client/petstore/typescript-angular2/npm/api/PetApi.ts @@ -255,6 +255,7 @@ export class PetApi { throw new Error('Required parameter petId was null or undefined when calling deletePet.'); } + headers.set('api_key', String(apiKey)); // to determine the Content-Type header let consumes: string[] = [ diff --git a/samples/client/petstore/typescript-angular2/npm/package.json b/samples/client/petstore/typescript-angular2/npm/package.json index 30cd1eb08016..eeeca81bcbb8 100644 --- a/samples/client/petstore/typescript-angular2/npm/package.json +++ b/samples/client/petstore/typescript-angular2/npm/package.json @@ -1,6 +1,6 @@ { "name": "@swagger/angular2-typescript-petstore", - "version": "0.0.1-SNAPSHOT.201612011557", + "version": "0.0.1-SNAPSHOT.201612061134", "description": "swagger client for @swagger/angular2-typescript-petstore", "author": "Swagger Codegen Contributors", "keywords": [