From 81e073df2cc8446865d4eb9355b45686f7cfb7af Mon Sep 17 00:00:00 2001 From: hello-brsd Date: Mon, 15 Jul 2019 08:03:09 +0200 Subject: [PATCH] [typescript-fetch] fix access token type (#3323) --- .../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 8d0daf61cab..b903769d8a3 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) {