From 86daa2b9940039b8d9c11d026fa24c550221def9 Mon Sep 17 00:00:00 2001 From: Tino Fuhrmann Date: Mon, 1 Jun 2020 01:30:45 +0200 Subject: [PATCH] Exclude btoa in browser --- .../src/main/resources/typescript/auth/auth.mustache | 2 ++ .../src/main/resources/typescript/package.mustache | 2 ++ 2 files changed, 4 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/typescript/auth/auth.mustache b/modules/openapi-generator/src/main/resources/typescript/auth/auth.mustache index d64eb2b25826..10080d47c048 100644 --- a/modules/openapi-generator/src/main/resources/typescript/auth/auth.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/auth/auth.mustache @@ -1,7 +1,9 @@ import {RequestContext} from '../http/http'; // typings for btoa are incorrect +{{#node}} //@ts-ignore import * as btoa from "btoa"; +{{/node}} /** * Base class for all authentication schemes. diff --git a/modules/openapi-generator/src/main/resources/typescript/package.mustache b/modules/openapi-generator/src/main/resources/typescript/package.mustache index 50475a5d4675..c41281ab8933 100644 --- a/modules/openapi-generator/src/main/resources/typescript/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/package.mustache @@ -43,7 +43,9 @@ {{#useRxJS}} "rxjs": "^6.4.0", {{/useRxJS}} + {{#node}} "btoa": "^1.2.1", + {{/node}} "es6-promise": "^4.2.4", "url-parse": "^1.4.3" },