From 3eaada953f9200e3f0bdf2ce8eaa242bb67842d7 Mon Sep 17 00:00:00 2001 From: "boros.gergely" <boros.gergely@virgo.hu> Date: Tue, 9 Jul 2019 23:26:56 +0200 Subject: [PATCH] [typescript-fetch] fix access token type --- .../src/main/resources/typescript-fetch/apis.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache index f91cf183d72..b4c50a10fa7 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache @@ -113,8 +113,8 @@ export class {{classname}} extends runtime.BaseAPI { } {{/isBasicBasic}} {{#isBasicBearer}} - if (this.configuration && (this.configuration.accessToken || this.configuration.apiKey)) { - const token = this.configuration.accessToken || this.configuration.apiKey; + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; const tokenString = typeof token === 'function' ? token("{{name}}", [{{#scopes}}"{{{scope}}}"{{^-last}}, {{/-last}}{{/scopes}}]) : token; if (tokenString) { -- GitLab