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 b9047381190..273d611bb53 100644 --- a/modules/swagger-codegen/src/main/resources/typescript-angular2/api.mustache +++ b/modules/swagger-codegen/src/main/resources/typescript-angular2/api.mustache @@ -205,9 +205,8 @@ export class {{classname}} { body: formParams.toString(), {{/hasFormParams}} search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); diff --git a/modules/swagger-codegen/src/main/resources/typescript-angular2/configuration.mustache b/modules/swagger-codegen/src/main/resources/typescript-angular2/configuration.mustache index a566a180e4e..c94aa4cbce9 100644 --- a/modules/swagger-codegen/src/main/resources/typescript-angular2/configuration.mustache +++ b/modules/swagger-codegen/src/main/resources/typescript-angular2/configuration.mustache @@ -3,4 +3,5 @@ export class Configuration { username: string; password: string; accessToken: string | (() => string); + withCredentials: boolean; } \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular2/default/api/PetApi.ts b/samples/client/petstore/typescript-angular2/default/api/PetApi.ts index 92c4da44669..d346647df3c 100644 --- a/samples/client/petstore/typescript-angular2/default/api/PetApi.ts +++ b/samples/client/petstore/typescript-angular2/default/api/PetApi.ts @@ -212,9 +212,8 @@ export class PetApi { headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -264,9 +263,8 @@ export class PetApi { method: RequestMethod.Delete, headers: headers, search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -314,9 +312,8 @@ export class PetApi { method: RequestMethod.Get, headers: headers, search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -364,9 +361,8 @@ export class PetApi { method: RequestMethod.Get, headers: headers, search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -418,9 +414,8 @@ export class PetApi { method: RequestMethod.Get, headers: headers, search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -467,9 +462,8 @@ export class PetApi { headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -532,9 +526,8 @@ export class PetApi { headers: headers, body: formParams.toString(), search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -597,9 +590,8 @@ export class PetApi { headers: headers, body: formParams.toString(), search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); diff --git a/samples/client/petstore/typescript-angular2/default/api/StoreApi.ts b/samples/client/petstore/typescript-angular2/default/api/StoreApi.ts index b58d06865ed..ab4ef909a5f 100644 --- a/samples/client/petstore/typescript-angular2/default/api/StoreApi.ts +++ b/samples/client/petstore/typescript-angular2/default/api/StoreApi.ts @@ -133,9 +133,8 @@ export class StoreApi { method: RequestMethod.Delete, headers: headers, search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -172,9 +171,8 @@ export class StoreApi { method: RequestMethod.Get, headers: headers, search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -212,9 +210,8 @@ export class StoreApi { method: RequestMethod.Get, headers: headers, search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -250,9 +247,8 @@ export class StoreApi { headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); diff --git a/samples/client/petstore/typescript-angular2/default/api/UserApi.ts b/samples/client/petstore/typescript-angular2/default/api/UserApi.ts index 8027ce31ae1..b1095986e92 100644 --- a/samples/client/petstore/typescript-angular2/default/api/UserApi.ts +++ b/samples/client/petstore/typescript-angular2/default/api/UserApi.ts @@ -197,9 +197,8 @@ export class UserApi { headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -235,9 +234,8 @@ export class UserApi { headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -273,9 +271,8 @@ export class UserApi { headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -313,9 +310,8 @@ export class UserApi { method: RequestMethod.Delete, headers: headers, search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -353,9 +349,8 @@ export class UserApi { method: RequestMethod.Get, headers: headers, search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -397,9 +392,8 @@ export class UserApi { method: RequestMethod.Get, headers: headers, search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -431,9 +425,8 @@ export class UserApi { method: RequestMethod.Get, headers: headers, search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -475,9 +468,8 @@ export class UserApi { headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); diff --git a/samples/client/petstore/typescript-angular2/default/configuration.ts b/samples/client/petstore/typescript-angular2/default/configuration.ts index a566a180e4e..c94aa4cbce9 100644 --- a/samples/client/petstore/typescript-angular2/default/configuration.ts +++ b/samples/client/petstore/typescript-angular2/default/configuration.ts @@ -3,4 +3,5 @@ export class Configuration { username: string; password: string; accessToken: string | (() => string); + withCredentials: boolean; } \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular2/npm/README.md b/samples/client/petstore/typescript-angular2/npm/README.md index dc87504299b..d1acd28ff12 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.201704132011 +## @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201704272137 ### 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.201704132011 --save +npm install @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201704272137 --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 92c4da44669..d346647df3c 100644 --- a/samples/client/petstore/typescript-angular2/npm/api/PetApi.ts +++ b/samples/client/petstore/typescript-angular2/npm/api/PetApi.ts @@ -212,9 +212,8 @@ export class PetApi { headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -264,9 +263,8 @@ export class PetApi { method: RequestMethod.Delete, headers: headers, search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -314,9 +312,8 @@ export class PetApi { method: RequestMethod.Get, headers: headers, search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -364,9 +361,8 @@ export class PetApi { method: RequestMethod.Get, headers: headers, search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -418,9 +414,8 @@ export class PetApi { method: RequestMethod.Get, headers: headers, search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -467,9 +462,8 @@ export class PetApi { headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -532,9 +526,8 @@ export class PetApi { headers: headers, body: formParams.toString(), search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -597,9 +590,8 @@ export class PetApi { headers: headers, body: formParams.toString(), search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); diff --git a/samples/client/petstore/typescript-angular2/npm/api/StoreApi.ts b/samples/client/petstore/typescript-angular2/npm/api/StoreApi.ts index b58d06865ed..ab4ef909a5f 100644 --- a/samples/client/petstore/typescript-angular2/npm/api/StoreApi.ts +++ b/samples/client/petstore/typescript-angular2/npm/api/StoreApi.ts @@ -133,9 +133,8 @@ export class StoreApi { method: RequestMethod.Delete, headers: headers, search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -172,9 +171,8 @@ export class StoreApi { method: RequestMethod.Get, headers: headers, search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -212,9 +210,8 @@ export class StoreApi { method: RequestMethod.Get, headers: headers, search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -250,9 +247,8 @@ export class StoreApi { headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); diff --git a/samples/client/petstore/typescript-angular2/npm/api/UserApi.ts b/samples/client/petstore/typescript-angular2/npm/api/UserApi.ts index 8027ce31ae1..b1095986e92 100644 --- a/samples/client/petstore/typescript-angular2/npm/api/UserApi.ts +++ b/samples/client/petstore/typescript-angular2/npm/api/UserApi.ts @@ -197,9 +197,8 @@ export class UserApi { headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -235,9 +234,8 @@ export class UserApi { headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -273,9 +271,8 @@ export class UserApi { headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -313,9 +310,8 @@ export class UserApi { method: RequestMethod.Delete, headers: headers, search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -353,9 +349,8 @@ export class UserApi { method: RequestMethod.Get, headers: headers, search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -397,9 +392,8 @@ export class UserApi { method: RequestMethod.Get, headers: headers, search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -431,9 +425,8 @@ export class UserApi { method: RequestMethod.Get, headers: headers, search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -475,9 +468,8 @@ export class UserApi { headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters, - withCredentials:true + withCredentials:this.configuration.withCredentials }); - // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); diff --git a/samples/client/petstore/typescript-angular2/npm/configuration.ts b/samples/client/petstore/typescript-angular2/npm/configuration.ts index a566a180e4e..c94aa4cbce9 100644 --- a/samples/client/petstore/typescript-angular2/npm/configuration.ts +++ b/samples/client/petstore/typescript-angular2/npm/configuration.ts @@ -3,4 +3,5 @@ export class Configuration { username: string; password: string; accessToken: string | (() => string); + withCredentials: boolean; } \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular2/npm/package.json b/samples/client/petstore/typescript-angular2/npm/package.json index b4ea8a079bc..1f735d58290 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.201704132011", + "version": "0.0.1-SNAPSHOT.201704272137", "description": "swagger client for @swagger/angular2-typescript-petstore", "author": "Swagger Codegen Contributors", "keywords": [