diff --git a/modules/swagger-codegen/src/main/resources/typescript-angular/api.service.mustache b/modules/swagger-codegen/src/main/resources/typescript-angular/api.service.mustache index 5da473f5ccb..65d1d2ca78d 100644 --- a/modules/swagger-codegen/src/main/resources/typescript-angular/api.service.mustache +++ b/modules/swagger-codegen/src/main/resources/typescript-angular/api.service.mustache @@ -117,7 +117,7 @@ export class {{classname}} { {{/allParams}}*/ public {{nickname}}WithHttpInfo({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}extraHttpRequestParams?: any): Observable { const path = this.basePath + '{{{path}}}'{{#pathParams}} - .replace('${' + '{{baseName}}' + '}', String({{paramName}})){{/pathParams}}; + .replace('${' + '{{baseName}}' + '}', encodeURIComponent(String({{paramName}}))){{/pathParams}}; let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 diff --git a/modules/swagger-codegen/src/main/resources/typescript-angularjs/api.mustache b/modules/swagger-codegen/src/main/resources/typescript-angularjs/api.mustache index 3027c399afb..b6aa0b6ae96 100644 --- a/modules/swagger-codegen/src/main/resources/typescript-angularjs/api.mustache +++ b/modules/swagger-codegen/src/main/resources/typescript-angularjs/api.mustache @@ -33,7 +33,7 @@ export class {{classname}} { {{/allParams}}*/ public {{nickname}} ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}extraHttpRequestParams?: any ) : ng.IHttpPromise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}{}{{/returnType}}> { const localVarPath = this.basePath + '{{{path}}}'{{#pathParams}} - .replace('{' + '{{baseName}}' + '}', String({{paramName}})){{/pathParams}}; + .replace('{' + '{{baseName}}' + '}', encodeURIComponent(String({{paramName}}))){{/pathParams}}; let queryParameters: any = {}; let headerParams: any = (Object).assign({}, this.defaultHeaders); diff --git a/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts index b05fe8fc637..aa86f7c4236 100644 --- a/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts @@ -265,7 +265,7 @@ export class PetService { */ public deletePetWithHttpInfo(petId: number, apiKey?: string, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/pet/${petId}' - .replace('${' + 'petId' + '}', String(petId)); + .replace('${' + 'petId' + '}', encodeURIComponent(String(petId))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 @@ -416,7 +416,7 @@ export class PetService { */ public getPetByIdWithHttpInfo(petId: number, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/pet/${petId}' - .replace('${' + 'petId' + '}', String(petId)); + .replace('${' + 'petId' + '}', encodeURIComponent(String(petId))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 @@ -510,7 +510,7 @@ export class PetService { */ public updatePetWithFormWithHttpInfo(petId: number, name?: string, status?: string, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/pet/${petId}' - .replace('${' + 'petId' + '}', String(petId)); + .replace('${' + 'petId' + '}', encodeURIComponent(String(petId))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 @@ -577,7 +577,7 @@ export class PetService { */ public uploadFileWithHttpInfo(petId: number, additionalMetadata?: string, file?: Blob, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/pet/${petId}/uploadImage' - .replace('${' + 'petId' + '}', String(petId)); + .replace('${' + 'petId' + '}', encodeURIComponent(String(petId))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 diff --git a/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts index 8765ad7c4a9..f606cadf04e 100644 --- a/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts @@ -144,7 +144,7 @@ export class StoreService { */ public deleteOrderWithHttpInfo(orderId: string, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/store/order/${orderId}' - .replace('${' + 'orderId' + '}', String(orderId)); + .replace('${' + 'orderId' + '}', encodeURIComponent(String(orderId))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 @@ -218,7 +218,7 @@ export class StoreService { */ public getOrderByIdWithHttpInfo(orderId: number, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/store/order/${orderId}' - .replace('${' + 'orderId' + '}', String(orderId)); + .replace('${' + 'orderId' + '}', encodeURIComponent(String(orderId))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 diff --git a/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts index 4322a11f7ef..8074ab54fcd 100644 --- a/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts @@ -330,7 +330,7 @@ export class UserService { */ public deleteUserWithHttpInfo(username: string, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/user/${username}' - .replace('${' + 'username' + '}', String(username)); + .replace('${' + 'username' + '}', encodeURIComponent(String(username))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 @@ -368,7 +368,7 @@ export class UserService { */ public getUserByNameWithHttpInfo(username: string, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/user/${username}' - .replace('${' + 'username' + '}', String(username)); + .replace('${' + 'username' + '}', encodeURIComponent(String(username))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 @@ -489,7 +489,7 @@ export class UserService { */ public updateUserWithHttpInfo(username: string, body: User, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/user/${username}' - .replace('${' + 'username' + '}', String(username)); + .replace('${' + 'username' + '}', encodeURIComponent(String(username))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 diff --git a/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts index b05fe8fc637..aa86f7c4236 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts @@ -265,7 +265,7 @@ export class PetService { */ public deletePetWithHttpInfo(petId: number, apiKey?: string, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/pet/${petId}' - .replace('${' + 'petId' + '}', String(petId)); + .replace('${' + 'petId' + '}', encodeURIComponent(String(petId))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 @@ -416,7 +416,7 @@ export class PetService { */ public getPetByIdWithHttpInfo(petId: number, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/pet/${petId}' - .replace('${' + 'petId' + '}', String(petId)); + .replace('${' + 'petId' + '}', encodeURIComponent(String(petId))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 @@ -510,7 +510,7 @@ export class PetService { */ public updatePetWithFormWithHttpInfo(petId: number, name?: string, status?: string, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/pet/${petId}' - .replace('${' + 'petId' + '}', String(petId)); + .replace('${' + 'petId' + '}', encodeURIComponent(String(petId))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 @@ -577,7 +577,7 @@ export class PetService { */ public uploadFileWithHttpInfo(petId: number, additionalMetadata?: string, file?: Blob, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/pet/${petId}/uploadImage' - .replace('${' + 'petId' + '}', String(petId)); + .replace('${' + 'petId' + '}', encodeURIComponent(String(petId))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 diff --git a/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts index 8765ad7c4a9..f606cadf04e 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts @@ -144,7 +144,7 @@ export class StoreService { */ public deleteOrderWithHttpInfo(orderId: string, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/store/order/${orderId}' - .replace('${' + 'orderId' + '}', String(orderId)); + .replace('${' + 'orderId' + '}', encodeURIComponent(String(orderId))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 @@ -218,7 +218,7 @@ export class StoreService { */ public getOrderByIdWithHttpInfo(orderId: number, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/store/order/${orderId}' - .replace('${' + 'orderId' + '}', String(orderId)); + .replace('${' + 'orderId' + '}', encodeURIComponent(String(orderId))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 diff --git a/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts index 4322a11f7ef..8074ab54fcd 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts @@ -330,7 +330,7 @@ export class UserService { */ public deleteUserWithHttpInfo(username: string, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/user/${username}' - .replace('${' + 'username' + '}', String(username)); + .replace('${' + 'username' + '}', encodeURIComponent(String(username))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 @@ -368,7 +368,7 @@ export class UserService { */ public getUserByNameWithHttpInfo(username: string, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/user/${username}' - .replace('${' + 'username' + '}', String(username)); + .replace('${' + 'username' + '}', encodeURIComponent(String(username))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 @@ -489,7 +489,7 @@ export class UserService { */ public updateUserWithHttpInfo(username: string, body: User, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/user/${username}' - .replace('${' + 'username' + '}', String(username)); + .replace('${' + 'username' + '}', encodeURIComponent(String(username))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts index cfba1741216..33c43377bd0 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts @@ -266,7 +266,7 @@ export class PetService implements PetServiceInterface { */ public deletePetWithHttpInfo(petId: number, apiKey?: string, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/pet/${petId}' - .replace('${' + 'petId' + '}', String(petId)); + .replace('${' + 'petId' + '}', encodeURIComponent(String(petId))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 @@ -417,7 +417,7 @@ export class PetService implements PetServiceInterface { */ public getPetByIdWithHttpInfo(petId: number, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/pet/${petId}' - .replace('${' + 'petId' + '}', String(petId)); + .replace('${' + 'petId' + '}', encodeURIComponent(String(petId))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 @@ -511,7 +511,7 @@ export class PetService implements PetServiceInterface { */ public updatePetWithFormWithHttpInfo(petId: number, name?: string, status?: string, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/pet/${petId}' - .replace('${' + 'petId' + '}', String(petId)); + .replace('${' + 'petId' + '}', encodeURIComponent(String(petId))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 @@ -578,7 +578,7 @@ export class PetService implements PetServiceInterface { */ public uploadFileWithHttpInfo(petId: number, additionalMetadata?: string, file?: Blob, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/pet/${petId}/uploadImage' - .replace('${' + 'petId' + '}', String(petId)); + .replace('${' + 'petId' + '}', encodeURIComponent(String(petId))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts index 6a3d0fc745c..7f2096736d6 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts @@ -145,7 +145,7 @@ export class StoreService implements StoreServiceInterface { */ public deleteOrderWithHttpInfo(orderId: string, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/store/order/${orderId}' - .replace('${' + 'orderId' + '}', String(orderId)); + .replace('${' + 'orderId' + '}', encodeURIComponent(String(orderId))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 @@ -219,7 +219,7 @@ export class StoreService implements StoreServiceInterface { */ public getOrderByIdWithHttpInfo(orderId: number, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/store/order/${orderId}' - .replace('${' + 'orderId' + '}', String(orderId)); + .replace('${' + 'orderId' + '}', encodeURIComponent(String(orderId))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts index 593c8d71a92..6d98a88f3b7 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts @@ -331,7 +331,7 @@ export class UserService implements UserServiceInterface { */ public deleteUserWithHttpInfo(username: string, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/user/${username}' - .replace('${' + 'username' + '}', String(username)); + .replace('${' + 'username' + '}', encodeURIComponent(String(username))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 @@ -369,7 +369,7 @@ export class UserService implements UserServiceInterface { */ public getUserByNameWithHttpInfo(username: string, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/user/${username}' - .replace('${' + 'username' + '}', String(username)); + .replace('${' + 'username' + '}', encodeURIComponent(String(username))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 @@ -490,7 +490,7 @@ export class UserService implements UserServiceInterface { */ public updateUserWithHttpInfo(username: string, body: User, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/user/${username}' - .replace('${' + 'username' + '}', String(username)); + .replace('${' + 'username' + '}', encodeURIComponent(String(username))); let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper()); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 diff --git a/samples/client/petstore/typescript-angularjs/api/PetApi.ts b/samples/client/petstore/typescript-angularjs/api/PetApi.ts index eedcbb36425..a830833d94b 100644 --- a/samples/client/petstore/typescript-angularjs/api/PetApi.ts +++ b/samples/client/petstore/typescript-angularjs/api/PetApi.ts @@ -62,7 +62,7 @@ export class PetApi { */ public deletePet (petId: number, apiKey?: string, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { const localVarPath = this.basePath + '/pet/{petId}' - .replace('{' + 'petId' + '}', String(petId)); + .replace('{' + 'petId' + '}', encodeURIComponent(String(petId))); let queryParameters: any = {}; let headerParams: any = (Object).assign({}, this.defaultHeaders); @@ -154,7 +154,7 @@ export class PetApi { */ public getPetById (petId: number, extraHttpRequestParams?: any ) : ng.IHttpPromise { const localVarPath = this.basePath + '/pet/{petId}' - .replace('{' + 'petId' + '}', String(petId)); + .replace('{' + 'petId' + '}', encodeURIComponent(String(petId))); let queryParameters: any = {}; let headerParams: any = (Object).assign({}, this.defaultHeaders); @@ -212,7 +212,7 @@ export class PetApi { */ public updatePetWithForm (petId: number, name?: string, status?: string, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { const localVarPath = this.basePath + '/pet/{petId}' - .replace('{' + 'petId' + '}', String(petId)); + .replace('{' + 'petId' + '}', encodeURIComponent(String(petId))); let queryParameters: any = {}; let headerParams: any = (Object).assign({}, this.defaultHeaders); @@ -251,7 +251,7 @@ export class PetApi { */ public uploadFile (petId: number, additionalMetadata?: string, file?: any, extraHttpRequestParams?: any ) : ng.IHttpPromise { const localVarPath = this.basePath + '/pet/{petId}/uploadImage' - .replace('{' + 'petId' + '}', String(petId)); + .replace('{' + 'petId' + '}', encodeURIComponent(String(petId))); let queryParameters: any = {}; let headerParams: any = (Object).assign({}, this.defaultHeaders); diff --git a/samples/client/petstore/typescript-angularjs/api/StoreApi.ts b/samples/client/petstore/typescript-angularjs/api/StoreApi.ts index 3946a8d47a8..93199134ab8 100644 --- a/samples/client/petstore/typescript-angularjs/api/StoreApi.ts +++ b/samples/client/petstore/typescript-angularjs/api/StoreApi.ts @@ -33,7 +33,7 @@ export class StoreApi { */ public deleteOrder (orderId: string, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { const localVarPath = this.basePath + '/store/order/{orderId}' - .replace('{' + 'orderId' + '}', String(orderId)); + .replace('{' + 'orderId' + '}', encodeURIComponent(String(orderId))); let queryParameters: any = {}; let headerParams: any = (Object).assign({}, this.defaultHeaders); @@ -83,7 +83,7 @@ export class StoreApi { */ public getOrderById (orderId: number, extraHttpRequestParams?: any ) : ng.IHttpPromise { const localVarPath = this.basePath + '/store/order/{orderId}' - .replace('{' + 'orderId' + '}', String(orderId)); + .replace('{' + 'orderId' + '}', encodeURIComponent(String(orderId))); let queryParameters: any = {}; let headerParams: any = (Object).assign({}, this.defaultHeaders); diff --git a/samples/client/petstore/typescript-angularjs/api/UserApi.ts b/samples/client/petstore/typescript-angularjs/api/UserApi.ts index 74092f7541f..903abecb803 100644 --- a/samples/client/petstore/typescript-angularjs/api/UserApi.ts +++ b/samples/client/petstore/typescript-angularjs/api/UserApi.ts @@ -117,7 +117,7 @@ export class UserApi { */ public deleteUser (username: string, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { const localVarPath = this.basePath + '/user/{username}' - .replace('{' + 'username' + '}', String(username)); + .replace('{' + 'username' + '}', encodeURIComponent(String(username))); let queryParameters: any = {}; let headerParams: any = (Object).assign({}, this.defaultHeaders); @@ -145,7 +145,7 @@ export class UserApi { */ public getUserByName (username: string, extraHttpRequestParams?: any ) : ng.IHttpPromise { const localVarPath = this.basePath + '/user/{username}' - .replace('{' + 'username' + '}', String(username)); + .replace('{' + 'username' + '}', encodeURIComponent(String(username))); let queryParameters: any = {}; let headerParams: any = (Object).assign({}, this.defaultHeaders); @@ -236,7 +236,7 @@ export class UserApi { */ public updateUser (username: string, body: models.User, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { const localVarPath = this.basePath + '/user/{username}' - .replace('{' + 'username' + '}', String(username)); + .replace('{' + 'username' + '}', encodeURIComponent(String(username))); let queryParameters: any = {}; let headerParams: any = (Object).assign({}, this.defaultHeaders);