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 6a713376146..5a735cc58e1 100644 --- a/modules/swagger-codegen/src/main/resources/typescript-angular/api.mustache +++ b/modules/swagger-codegen/src/main/resources/typescript-angular/api.mustache @@ -18,7 +18,7 @@ namespace {{package}} { static $inject: string[] = ['$http', '$httpParamSerializer', 'basePath']; constructor(protected $http: ng.IHttpService, protected $httpParamSerializer?: (d: any) => any, basePath?: string) { - if (basePath) { + if (basePath !== undefined) { this.basePath = basePath; } } diff --git a/samples/client/petstore/typescript-angular/API/Client/PetApi.ts b/samples/client/petstore/typescript-angular/API/Client/PetApi.ts index b9567bd6780..90b44ec3e73 100644 --- a/samples/client/petstore/typescript-angular/API/Client/PetApi.ts +++ b/samples/client/petstore/typescript-angular/API/Client/PetApi.ts @@ -12,7 +12,7 @@ namespace API.Client { static $inject: string[] = ['$http', '$httpParamSerializer', 'basePath']; constructor(protected $http: ng.IHttpService, protected $httpParamSerializer?: (d: any) => any, basePath?: string) { - if (basePath) { + if (basePath !== undefined) { this.basePath = basePath; } } diff --git a/samples/client/petstore/typescript-angular/API/Client/StoreApi.ts b/samples/client/petstore/typescript-angular/API/Client/StoreApi.ts index 530a46fe1e6..7c3fed82fa3 100644 --- a/samples/client/petstore/typescript-angular/API/Client/StoreApi.ts +++ b/samples/client/petstore/typescript-angular/API/Client/StoreApi.ts @@ -12,7 +12,7 @@ namespace API.Client { static $inject: string[] = ['$http', '$httpParamSerializer', 'basePath']; constructor(protected $http: ng.IHttpService, protected $httpParamSerializer?: (d: any) => any, basePath?: string) { - if (basePath) { + if (basePath !== undefined) { this.basePath = basePath; } } diff --git a/samples/client/petstore/typescript-angular/API/Client/UserApi.ts b/samples/client/petstore/typescript-angular/API/Client/UserApi.ts index cd079c32f9d..d237038d7da 100644 --- a/samples/client/petstore/typescript-angular/API/Client/UserApi.ts +++ b/samples/client/petstore/typescript-angular/API/Client/UserApi.ts @@ -12,7 +12,7 @@ namespace API.Client { static $inject: string[] = ['$http', '$httpParamSerializer', 'basePath']; constructor(protected $http: ng.IHttpService, protected $httpParamSerializer?: (d: any) => any, basePath?: string) { - if (basePath) { + if (basePath !== undefined) { this.basePath = basePath; } }