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 10080d47c04..261f70b3226 100644 --- a/modules/openapi-generator/src/main/resources/typescript/auth/auth.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/auth/auth.mustache @@ -1,10 +1,11 @@ import {RequestContext} from '../http/http'; // typings for btoa are incorrect +{{#platforms}} {{#node}} //@ts-ignore import * as btoa from "btoa"; {{/node}} - +{{/platforms}} /** * 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 c41281ab893..14d9b9e8dfd 100644 --- a/modules/openapi-generator/src/main/resources/typescript/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/package.mustache @@ -18,34 +18,32 @@ }, "dependencies": { {{#frameworks}} - {{#fetch-api}} - {{#platforms}} - {{#node}} + {{#fetch-api}} + {{#platforms}} + {{#node}} "node-fetch": "^2.6.0", "@types/node-fetch": "^2.5.7", - {{/node}} - {{#browser}} + {{/node}} + {{#browser}} "whatwg-fetch": "^3.0.0", - {{/browser}} - {{/platforms}} - {{/fetch-api}} - {{#jquery}} + {{/browser}} + {{/platforms}} + {{/fetch-api}} + {{#jquery}} "@types/jquery": "^3.3.29", "jquery": "^3.4.1", - {{/jquery}} + {{/jquery}} {{/frameworks}} {{#platforms}} - {{#node}} + {{#node}} "@types/node": "*", "form-data": "^2.5.0", - {{/node}} + "btoa": "^1.2.1", + {{/node}} {{/platforms}} {{#useRxJS}} "rxjs": "^6.4.0", {{/useRxJS}} - {{#node}} - "btoa": "^1.2.1", - {{/node}} "es6-promise": "^4.2.4", "url-parse": "^1.4.3" }, diff --git a/samples/openapi3/client/petstore/typescript/builds/default/auth/auth.ts b/samples/openapi3/client/petstore/typescript/builds/default/auth/auth.ts index 603ae0fd96c..8a368648456 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/auth/auth.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/auth/auth.ts @@ -2,7 +2,6 @@ import {RequestContext} from '../http/http'; // typings for btoa are incorrect //@ts-ignore import * as btoa from "btoa"; - /** * Base class for all authentication schemes. * @@ -30,21 +29,6 @@ export abstract class SecurityAuthentication { } -/** - * Applies no authentication. - * - */ -export class NoAuthentication extends SecurityAuthentication { - - public constructor() { - super("_no_auth"); - } - - public applySecurityAuthentication(_context: RequestContext) { - - } -} - /** * Applies an api key to the request context. * diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/auth/auth.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/auth/auth.ts index 603ae0fd96c..5601b82c317 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/auth/auth.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/auth/auth.ts @@ -1,8 +1,5 @@ import {RequestContext} from '../http/http'; // typings for btoa are incorrect -//@ts-ignore -import * as btoa from "btoa"; - /** * Base class for all authentication schemes. * @@ -30,21 +27,6 @@ export abstract class SecurityAuthentication { } -/** - * Applies no authentication. - * - */ -export class NoAuthentication extends SecurityAuthentication { - - public constructor() { - super("_no_auth"); - } - - public applySecurityAuthentication(_context: RequestContext) { - - } -} - /** * Applies an api key to the request context. * diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/package.json b/samples/openapi3/client/petstore/typescript/builds/jquery/package.json index 65361baea54..ccacdf6b715 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/package.json @@ -19,7 +19,6 @@ "dependencies": { "@types/jquery": "^3.3.29", "jquery": "^3.4.1", - "btoa": "^1.2.1", "es6-promise": "^4.2.4", "url-parse": "^1.4.3" },