diff --git a/modules/openapi-generator/src/main/resources/typescript-node/api-single.mustache b/modules/openapi-generator/src/main/resources/typescript-node/api-single.mustache index 99c84a6fbb4..37990e66656 100644 --- a/modules/openapi-generator/src/main/resources/typescript-node/api-single.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-node/api-single.mustache @@ -133,7 +133,7 @@ export class {{classname}} { {{/isBasicBearer}} {{#isOAuth}} - set accessToken(token: string) { + set accessToken{{name}}(token: string) { this.authentications.{{name}}.accessToken = token; } {{/isOAuth}} diff --git a/samples/client/petstore/typescript-node/default/api/storeApi.ts b/samples/client/petstore/typescript-node/default/api/storeApi.ts index f3f5b8ca651..fd8c9ccff16 100644 --- a/samples/client/petstore/typescript-node/default/api/storeApi.ts +++ b/samples/client/petstore/typescript-node/default/api/storeApi.ts @@ -86,7 +86,7 @@ export class StoreApi { (this.authentications as any)[StoreApiApiKeys[key]].apiKey = value; } - set accessToken(token: string) { + set accessTokenpetstore_auth(token: string) { this.authentications.petstore_auth.accessToken = token; } diff --git a/samples/client/petstore/typescript-node/default/api/userApi.ts b/samples/client/petstore/typescript-node/default/api/userApi.ts index fbeb9660bdf..f90683d687e 100644 --- a/samples/client/petstore/typescript-node/default/api/userApi.ts +++ b/samples/client/petstore/typescript-node/default/api/userApi.ts @@ -86,7 +86,7 @@ export class UserApi { (this.authentications as any)[UserApiApiKeys[key]].apiKey = value; } - set accessToken(token: string) { + set accessTokenpetstore_auth(token: string) { this.authentications.petstore_auth.accessToken = token; } diff --git a/samples/client/petstore/typescript-node/npm/api/petApi.ts b/samples/client/petstore/typescript-node/npm/api/petApi.ts index 45e173378a5..14cc1705727 100644 --- a/samples/client/petstore/typescript-node/npm/api/petApi.ts +++ b/samples/client/petstore/typescript-node/npm/api/petApi.ts @@ -87,7 +87,7 @@ export class PetApi { (this.authentications as any)[PetApiApiKeys[key]].apiKey = value; } - set accessToken(token: string) { + set accessTokenpetstore_auth(token: string) { this.authentications.petstore_auth.accessToken = token; } diff --git a/samples/client/petstore/typescript-node/npm/api/storeApi.ts b/samples/client/petstore/typescript-node/npm/api/storeApi.ts index f3f5b8ca651..fd8c9ccff16 100644 --- a/samples/client/petstore/typescript-node/npm/api/storeApi.ts +++ b/samples/client/petstore/typescript-node/npm/api/storeApi.ts @@ -86,7 +86,7 @@ export class StoreApi { (this.authentications as any)[StoreApiApiKeys[key]].apiKey = value; } - set accessToken(token: string) { + set accessTokenpetstore_auth(token: string) { this.authentications.petstore_auth.accessToken = token; } diff --git a/samples/client/petstore/typescript-node/npm/api/userApi.ts b/samples/client/petstore/typescript-node/npm/api/userApi.ts index fbeb9660bdf..f90683d687e 100644 --- a/samples/client/petstore/typescript-node/npm/api/userApi.ts +++ b/samples/client/petstore/typescript-node/npm/api/userApi.ts @@ -86,7 +86,7 @@ export class UserApi { (this.authentications as any)[UserApiApiKeys[key]].apiKey = value; } - set accessToken(token: string) { + set accessTokenpetstore_auth(token: string) { this.authentications.petstore_auth.accessToken = token; }