From 571780b94515668d8de04776149911c3e34a1399 Mon Sep 17 00:00:00 2001 From: David Gamero Date: Wed, 12 Jan 2022 17:19:43 -0500 Subject: [PATCH 01/21] add default auth --- .../src/main/resources/typescript/api/api.mustache | 8 +++++++- .../resources/typescript/types/ObservableAPI.mustache | 5 +++++ .../main/resources/typescript/types/PromiseAPI.mustache | 5 +++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache index 4ccded577e47..d763d9be0486 100644 --- a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache @@ -9,6 +9,7 @@ import { URLSearchParams } from 'url'; {{/node}} {{/platforms}} import {ObjectSerializer} from '../models/ObjectSerializer{{extensionForDeno}}'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception{{extensionForDeno}}'; import {canConsumeForm, isCodeInRange} from '../util{{extensionForDeno}}'; @@ -28,6 +29,11 @@ import { {{classname}} } from '..{{filename}}{{extensionForDeno}}'; @injectable() {{/useInversify}} export class {{classname}}RequestFactory extends BaseAPIRequestFactory { + let defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } {{#operation}} /** @@ -155,7 +161,7 @@ export class {{classname}}RequestFactory extends BaseAPIRequestFactory { {{/hasAuthMethods}} {{#authMethods}} // Apply auth methods - authMethod = _config.authMethods["{{name}}"] + authMethod = defaultSecurityAuthentication || _config.authMethods["{{name}}"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/modules/openapi-generator/src/main/resources/typescript/types/ObservableAPI.mustache b/modules/openapi-generator/src/main/resources/typescript/types/ObservableAPI.mustache index 80b41d323641..7a1734fcd65b 100644 --- a/modules/openapi-generator/src/main/resources/typescript/types/ObservableAPI.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/types/ObservableAPI.mustache @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http{{extensionForDeno}}'; import * as models from '../models/all{{extensionForDeno}}'; import { Configuration} from '../configuration{{extensionForDeno}}' +import { SecurityAuthentication } from '../auth/auth'; import { Observable, of, from } from {{#useRxJS}}'rxjs'{{/useRxJS}}{{^useRxJS}}'../rxjsStub{{extensionForDeno}}'{{/useRxJS}}; import {mergeMap, map} from {{#useRxJS}}'rxjs/operators'{{/useRxJS}}{{^useRxJS}}'../rxjsStub{{extensionForDeno}}'{{/useRxJS}}; {{#useInversify}} @@ -50,6 +51,10 @@ export class Observable{{classname}} { this.responseProcessor = responseProcessor || new {{classname}}ResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + {{#operation}} /** {{#notes}} diff --git a/modules/openapi-generator/src/main/resources/typescript/types/PromiseAPI.mustache b/modules/openapi-generator/src/main/resources/typescript/types/PromiseAPI.mustache index 2c424db21fb4..ca508318392a 100644 --- a/modules/openapi-generator/src/main/resources/typescript/types/PromiseAPI.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/types/PromiseAPI.mustache @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http{{extensionForDeno}}'; import * as models from '../models/all{{extensionForDeno}}'; import { Configuration} from '../configuration{{extensionForDeno}}' +import { SecurityAuthentication } from '../auth/auth'; {{#useInversify}} import { injectable, inject, optional } from "inversify"; import { AbstractConfiguration } from "../services/configuration"; @@ -40,6 +41,10 @@ export class Promise{{classname}} { this.api = new Observable{{classname}}(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + {{#operation}} /** {{#notes}} From be8d8e0031c64ced35cc604c0600ea1951fc0427 Mon Sep 17 00:00:00 2001 From: David Gamero Date: Wed, 12 Jan 2022 18:10:18 -0500 Subject: [PATCH 02/21] private --- .../src/main/resources/typescript/api/api.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache index d763d9be0486..43300055ca87 100644 --- a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache @@ -29,7 +29,7 @@ import { {{classname}} } from '..{{filename}}{{extensionForDeno}}'; @injectable() {{/useInversify}} export class {{classname}}RequestFactory extends BaseAPIRequestFactory { - let defaultSecurityAuthentication: SecurityAuthentication | undefined; + private defaultSecurityAuthentication: SecurityAuthentication | undefined; public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ this.defaultSecurityAuthentication = auth; From b2cb75ea2c388f664152a2fe905f4450cfa653d1 Mon Sep 17 00:00:00 2001 From: David Gamero Date: Fri, 14 Jan 2022 13:10:32 -0500 Subject: [PATCH 03/21] default when optional params and fix types --- .../src/main/resources/typescript/api/api.mustache | 4 ++-- .../resources/typescript/services/ObjectParamAPI.mustache | 2 +- .../main/resources/typescript/types/ObjectParamAPI.mustache | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache index 43300055ca87..13bff19cdc60 100644 --- a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache @@ -157,11 +157,11 @@ export class {{classname}}RequestFactory extends BaseAPIRequestFactory { {{/bodyParam}} {{#hasAuthMethods}} - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; {{/hasAuthMethods}} {{#authMethods}} // Apply auth methods - authMethod = defaultSecurityAuthentication || _config.authMethods["{{name}}"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["{{name}}"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/modules/openapi-generator/src/main/resources/typescript/services/ObjectParamAPI.mustache b/modules/openapi-generator/src/main/resources/typescript/services/ObjectParamAPI.mustache index e6aabfc12244..3da87babf6ba 100644 --- a/modules/openapi-generator/src/main/resources/typescript/services/ObjectParamAPI.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/services/ObjectParamAPI.mustache @@ -26,7 +26,7 @@ export abstract class AbstractObject{{classname}} { {{/summary}} * @param param the request object */ - public abstract {{nickname}}(param: req.{{classname}}{{operationIdCamelCase}}Request, options?: Configuration): {{#useRxJS}}Observable{{/useRxJS}}{{^useRxJS}}Promise{{/useRxJS}}<{{{returnType}}}{{^returnType}}void{{/returnType}}>; + public abstract {{nickname}}(param: req.{{classname}}{{operationIdCamelCase}}Request {{^hasRequiredParams}} = {}{{/hasRequiredParams}}, options?: Configuration): {{#useRxJS}}Observable{{/useRxJS}}{{^useRxJS}}Promise{{/useRxJS}}<{{{returnType}}}{{^returnType}}void{{/returnType}}>; {{/operation}} } diff --git a/modules/openapi-generator/src/main/resources/typescript/types/ObjectParamAPI.mustache b/modules/openapi-generator/src/main/resources/typescript/types/ObjectParamAPI.mustache index d44164bd0191..b0d24f188c3e 100644 --- a/modules/openapi-generator/src/main/resources/typescript/types/ObjectParamAPI.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/types/ObjectParamAPI.mustache @@ -47,7 +47,7 @@ export class Object{{classname}} { {{/summary}} * @param param the request object */ - public {{nickname}}(param: {{classname}}{{operationIdCamelCase}}Request, options?: Configuration): {{#useRxJS}}Observable{{/useRxJS}}{{^useRxJS}}Promise{{/useRxJS}}<{{{returnType}}}{{^returnType}}void{{/returnType}}> { + public {{nickname}}(param: {{classname}}{{operationIdCamelCase}}Request {{^hasRequiredParams}}= {}{{/hasRequiredParams}}, options?: Configuration): {{#useRxJS}}Observable{{/useRxJS}}{{^useRxJS}}Promise{{/useRxJS}}<{{{returnType}}}{{^returnType}}void{{/returnType}}> { return this.api.{{nickname}}({{#allParams}}param.{{paramName}}, {{/allParams}} options){{^useRxJS}}.toPromise(){{/useRxJS}}; } From 07a07d63703aa4077bbe2091506f407826c799af Mon Sep 17 00:00:00 2001 From: David Gamero Date: Fri, 14 Jan 2022 17:06:28 -0500 Subject: [PATCH 04/21] build samples --- .../composed-schemas/apis/DefaultApi.ts | 6 +++ .../composed-schemas/types/ObjectParamAPI.ts | 6 +-- .../composed-schemas/types/ObservableAPI.ts | 5 +++ .../composed-schemas/types/PromiseAPI.ts | 5 +++ .../typescript/builds/default/apis/PetApi.ts | 38 ++++++++++-------- .../builds/default/apis/StoreApi.ts | 10 ++++- .../typescript/builds/default/apis/UserApi.ts | 30 ++++++++------ .../builds/default/types/ObjectParamAPI.ts | 40 +++++++++---------- .../builds/default/types/ObservableAPI.ts | 13 ++++++ .../builds/default/types/PromiseAPI.ts | 13 ++++++ .../typescript/builds/deno/apis/PetApi.ts | 38 ++++++++++-------- .../typescript/builds/deno/apis/StoreApi.ts | 10 ++++- .../typescript/builds/deno/apis/UserApi.ts | 30 ++++++++------ .../builds/deno/types/ObjectParamAPI.ts | 40 +++++++++---------- .../builds/deno/types/ObservableAPI.ts | 13 ++++++ .../builds/deno/types/PromiseAPI.ts | 13 ++++++ .../builds/inversify/apis/PetApi.ts | 38 ++++++++++-------- .../builds/inversify/apis/StoreApi.ts | 10 ++++- .../builds/inversify/apis/UserApi.ts | 30 ++++++++------ .../inversify/services/ObjectParamAPI.ts | 40 +++++++++---------- .../builds/inversify/types/ObjectParamAPI.ts | 40 +++++++++---------- .../builds/inversify/types/ObservableAPI.ts | 13 ++++++ .../builds/inversify/types/PromiseAPI.ts | 13 ++++++ .../typescript/builds/jquery/apis/PetApi.ts | 38 ++++++++++-------- .../typescript/builds/jquery/apis/StoreApi.ts | 10 ++++- .../typescript/builds/jquery/apis/UserApi.ts | 30 ++++++++------ .../builds/jquery/types/ObjectParamAPI.ts | 40 +++++++++---------- .../builds/jquery/types/ObservableAPI.ts | 13 ++++++ .../builds/jquery/types/PromiseAPI.ts | 13 ++++++ .../builds/object_params/apis/PetApi.ts | 38 ++++++++++-------- .../builds/object_params/apis/StoreApi.ts | 10 ++++- .../builds/object_params/apis/UserApi.ts | 30 ++++++++------ .../object_params/types/ObjectParamAPI.ts | 40 +++++++++---------- .../object_params/types/ObservableAPI.ts | 13 ++++++ .../builds/object_params/types/PromiseAPI.ts | 13 ++++++ 35 files changed, 509 insertions(+), 273 deletions(-) diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts index 59a3ac169736..3c28b9d89f55 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts @@ -3,6 +3,7 @@ import { BaseAPIRequestFactory, RequiredError } from './baseapi'; import {Configuration} from '../configuration'; import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import {ObjectSerializer} from '../models/ObjectSerializer'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; @@ -17,6 +18,11 @@ import { PetByType } from '../models/PetByType'; * no description */ export class DefaultApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * @param inlineObject diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObjectParamAPI.ts index d94a613229e6..84ebc7d8c699 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObjectParamAPI.ts @@ -50,21 +50,21 @@ export class ObjectDefaultApi { /** * @param param the request object */ - public filePost(param: DefaultApiFilePostRequest, options?: Configuration): Promise { + public filePost(param: DefaultApiFilePostRequest = {}, options?: Configuration): Promise { return this.api.filePost(param.inlineObject, options).toPromise(); } /** * @param param the request object */ - public petsFilteredPatch(param: DefaultApiPetsFilteredPatchRequest, options?: Configuration): Promise { + public petsFilteredPatch(param: DefaultApiPetsFilteredPatchRequest = {}, options?: Configuration): Promise { return this.api.petsFilteredPatch(param.petByAgePetByType, options).toPromise(); } /** * @param param the request object */ - public petsPatch(param: DefaultApiPetsPatchRequest, options?: Configuration): Promise { + public petsPatch(param: DefaultApiPetsPatchRequest = {}, options?: Configuration): Promise { return this.api.petsPatch(param.catDog, options).toPromise(); } diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts index ef56e3758b8a..2c3eac8e91d7 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' +import { SecurityAuthentication } from '../auth/auth'; import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { Cat } from '../models/Cat'; @@ -27,6 +28,10 @@ export class ObservableDefaultApi { this.responseProcessor = responseProcessor || new DefaultApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * @param inlineObject */ diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/PromiseAPI.ts index 4939db8127b3..efb81ea6639d 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/PromiseAPI.ts @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' +import { SecurityAuthentication } from '../auth/auth'; import { Cat } from '../models/Cat'; import { CatAllOf } from '../models/CatAllOf'; @@ -23,6 +24,10 @@ export class PromiseDefaultApi { this.api = new ObservableDefaultApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * @param inlineObject */ diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts index ff3b13bc8455..512d4b0abf70 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts @@ -5,6 +5,7 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; @@ -16,6 +17,11 @@ import { Pet } from '../models/Pet'; * no description */ export class PetApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * Add a new pet to the store @@ -51,9 +57,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -88,9 +94,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("api_key", ObjectSerializer.serialize(apiKey, "string", "")); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -125,9 +131,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -162,9 +168,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -195,9 +201,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -239,9 +245,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -304,9 +310,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Content-Type", contentType); } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -371,9 +377,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Content-Type", contentType); } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts index 46cf6d33efc7..17ab0194847b 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts @@ -5,6 +5,7 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; @@ -15,6 +16,11 @@ import { Order } from '../models/Order'; * no description */ export class StoreApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -58,9 +64,9 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts index 99a7c43b2e5c..2fb5b8966977 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts @@ -5,6 +5,7 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; @@ -15,6 +16,11 @@ import { User } from '../models/User'; * no description */ export class UserApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * This can only be done by the logged in user. @@ -49,9 +55,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -91,9 +97,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -133,9 +139,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -166,9 +172,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -258,9 +264,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -309,9 +315,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/default/types/ObjectParamAPI.ts index 829c9d0363a8..7915c0f83ed4 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/types/ObjectParamAPI.ts @@ -125,7 +125,7 @@ export class ObjectPetApi { * Add a new pet to the store * @param param the request object */ - public addPet(param: PetApiAddPetRequest, options?: Configuration): Promise { + public addPet(param: PetApiAddPetRequest , options?: Configuration): Promise { return this.api.addPet(param.pet, options).toPromise(); } @@ -133,7 +133,7 @@ export class ObjectPetApi { * Deletes a pet * @param param the request object */ - public deletePet(param: PetApiDeletePetRequest, options?: Configuration): Promise { + public deletePet(param: PetApiDeletePetRequest , options?: Configuration): Promise { return this.api.deletePet(param.petId, param.apiKey, options).toPromise(); } @@ -142,7 +142,7 @@ export class ObjectPetApi { * Finds Pets by status * @param param the request object */ - public findPetsByStatus(param: PetApiFindPetsByStatusRequest, options?: Configuration): Promise> { + public findPetsByStatus(param: PetApiFindPetsByStatusRequest , options?: Configuration): Promise> { return this.api.findPetsByStatus(param.status, options).toPromise(); } @@ -151,7 +151,7 @@ export class ObjectPetApi { * Finds Pets by tags * @param param the request object */ - public findPetsByTags(param: PetApiFindPetsByTagsRequest, options?: Configuration): Promise> { + public findPetsByTags(param: PetApiFindPetsByTagsRequest , options?: Configuration): Promise> { return this.api.findPetsByTags(param.tags, options).toPromise(); } @@ -160,7 +160,7 @@ export class ObjectPetApi { * Find pet by ID * @param param the request object */ - public getPetById(param: PetApiGetPetByIdRequest, options?: Configuration): Promise { + public getPetById(param: PetApiGetPetByIdRequest , options?: Configuration): Promise { return this.api.getPetById(param.petId, options).toPromise(); } @@ -168,7 +168,7 @@ export class ObjectPetApi { * Update an existing pet * @param param the request object */ - public updatePet(param: PetApiUpdatePetRequest, options?: Configuration): Promise { + public updatePet(param: PetApiUpdatePetRequest , options?: Configuration): Promise { return this.api.updatePet(param.pet, options).toPromise(); } @@ -176,7 +176,7 @@ export class ObjectPetApi { * Updates a pet in the store with form data * @param param the request object */ - public updatePetWithForm(param: PetApiUpdatePetWithFormRequest, options?: Configuration): Promise { + public updatePetWithForm(param: PetApiUpdatePetWithFormRequest , options?: Configuration): Promise { return this.api.updatePetWithForm(param.petId, param.name, param.status, options).toPromise(); } @@ -184,7 +184,7 @@ export class ObjectPetApi { * uploads an image * @param param the request object */ - public uploadFile(param: PetApiUploadFileRequest, options?: Configuration): Promise { + public uploadFile(param: PetApiUploadFileRequest , options?: Configuration): Promise { return this.api.uploadFile(param.petId, param.additionalMetadata, param.file, options).toPromise(); } @@ -235,7 +235,7 @@ export class ObjectStoreApi { * Delete purchase order by ID * @param param the request object */ - public deleteOrder(param: StoreApiDeleteOrderRequest, options?: Configuration): Promise { + public deleteOrder(param: StoreApiDeleteOrderRequest , options?: Configuration): Promise { return this.api.deleteOrder(param.orderId, options).toPromise(); } @@ -244,7 +244,7 @@ export class ObjectStoreApi { * Returns pet inventories by status * @param param the request object */ - public getInventory(param: StoreApiGetInventoryRequest, options?: Configuration): Promise<{ [key: string]: number; }> { + public getInventory(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }> { return this.api.getInventory( options).toPromise(); } @@ -253,7 +253,7 @@ export class ObjectStoreApi { * Find purchase order by ID * @param param the request object */ - public getOrderById(param: StoreApiGetOrderByIdRequest, options?: Configuration): Promise { + public getOrderById(param: StoreApiGetOrderByIdRequest , options?: Configuration): Promise { return this.api.getOrderById(param.orderId, options).toPromise(); } @@ -261,7 +261,7 @@ export class ObjectStoreApi { * Place an order for a pet * @param param the request object */ - public placeOrder(param: StoreApiPlaceOrderRequest, options?: Configuration): Promise { + public placeOrder(param: StoreApiPlaceOrderRequest , options?: Configuration): Promise { return this.api.placeOrder(param.order, options).toPromise(); } @@ -360,7 +360,7 @@ export class ObjectUserApi { * Create user * @param param the request object */ - public createUser(param: UserApiCreateUserRequest, options?: Configuration): Promise { + public createUser(param: UserApiCreateUserRequest , options?: Configuration): Promise { return this.api.createUser(param.user, options).toPromise(); } @@ -368,7 +368,7 @@ export class ObjectUserApi { * Creates list of users with given input array * @param param the request object */ - public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest, options?: Configuration): Promise { + public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest , options?: Configuration): Promise { return this.api.createUsersWithArrayInput(param.user, options).toPromise(); } @@ -376,7 +376,7 @@ export class ObjectUserApi { * Creates list of users with given input array * @param param the request object */ - public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest, options?: Configuration): Promise { + public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest , options?: Configuration): Promise { return this.api.createUsersWithListInput(param.user, options).toPromise(); } @@ -385,7 +385,7 @@ export class ObjectUserApi { * Delete user * @param param the request object */ - public deleteUser(param: UserApiDeleteUserRequest, options?: Configuration): Promise { + public deleteUser(param: UserApiDeleteUserRequest , options?: Configuration): Promise { return this.api.deleteUser(param.username, options).toPromise(); } @@ -393,7 +393,7 @@ export class ObjectUserApi { * Get user by user name * @param param the request object */ - public getUserByName(param: UserApiGetUserByNameRequest, options?: Configuration): Promise { + public getUserByName(param: UserApiGetUserByNameRequest , options?: Configuration): Promise { return this.api.getUserByName(param.username, options).toPromise(); } @@ -401,7 +401,7 @@ export class ObjectUserApi { * Logs user into the system * @param param the request object */ - public loginUser(param: UserApiLoginUserRequest, options?: Configuration): Promise { + public loginUser(param: UserApiLoginUserRequest , options?: Configuration): Promise { return this.api.loginUser(param.username, param.password, options).toPromise(); } @@ -409,7 +409,7 @@ export class ObjectUserApi { * Logs out current logged in user session * @param param the request object */ - public logoutUser(param: UserApiLogoutUserRequest, options?: Configuration): Promise { + public logoutUser(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise { return this.api.logoutUser( options).toPromise(); } @@ -418,7 +418,7 @@ export class ObjectUserApi { * Updated user * @param param the request object */ - public updateUser(param: UserApiUpdateUserRequest, options?: Configuration): Promise { + public updateUser(param: UserApiUpdateUserRequest , options?: Configuration): Promise { return this.api.updateUser(param.username, param.user, options).toPromise(); } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts index 4207fd5102dc..f040e33cd57c 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' +import { SecurityAuthentication } from '../auth/auth'; import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { ApiResponse } from '../models/ApiResponse'; @@ -26,6 +27,10 @@ export class ObservablePetApi { this.responseProcessor = responseProcessor || new PetApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -236,6 +241,10 @@ export class ObservableStoreApi { this.responseProcessor = responseProcessor || new StoreApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -348,6 +357,10 @@ export class ObservableUserApi { this.responseProcessor = responseProcessor || new UserApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/default/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/default/types/PromiseAPI.ts index ac44ba7a13b2..cb64631a1453 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/types/PromiseAPI.ts @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' +import { SecurityAuthentication } from '../auth/auth'; import { ApiResponse } from '../models/ApiResponse'; import { Category } from '../models/Category'; @@ -22,6 +23,10 @@ export class PromisePetApi { this.api = new ObservablePetApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -121,6 +126,10 @@ export class PromiseStoreApi { this.api = new ObservableStoreApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -178,6 +187,10 @@ export class PromiseUserApi { this.api = new ObservableUserApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts index 9ae92b9b2120..f03905576e51 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts @@ -3,6 +3,7 @@ import { BaseAPIRequestFactory, RequiredError } from './baseapi.ts'; import {Configuration} from '../configuration.ts'; import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http.ts'; import {ObjectSerializer} from '../models/ObjectSerializer.ts'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception.ts'; import {canConsumeForm, isCodeInRange} from '../util.ts'; @@ -14,6 +15,11 @@ import { Pet } from '../models/Pet.ts'; * no description */ export class PetApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * Add a new pet to the store @@ -49,9 +55,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -86,9 +92,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("api_key", ObjectSerializer.serialize(apiKey, "string", "")); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -123,9 +129,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -160,9 +166,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -193,9 +199,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -237,9 +243,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -302,9 +308,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Content-Type", contentType); } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -369,9 +375,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Content-Type", contentType); } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts index 767734aed21e..d8bbd379b038 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts @@ -3,6 +3,7 @@ import { BaseAPIRequestFactory, RequiredError } from './baseapi.ts'; import {Configuration} from '../configuration.ts'; import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http.ts'; import {ObjectSerializer} from '../models/ObjectSerializer.ts'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception.ts'; import {canConsumeForm, isCodeInRange} from '../util.ts'; @@ -13,6 +14,11 @@ import { Order } from '../models/Order.ts'; * no description */ export class StoreApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -56,9 +62,9 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts index 7caf789d015d..d9c13ccad1b6 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts @@ -3,6 +3,7 @@ import { BaseAPIRequestFactory, RequiredError } from './baseapi.ts'; import {Configuration} from '../configuration.ts'; import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http.ts'; import {ObjectSerializer} from '../models/ObjectSerializer.ts'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception.ts'; import {canConsumeForm, isCodeInRange} from '../util.ts'; @@ -13,6 +14,11 @@ import { User } from '../models/User.ts'; * no description */ export class UserApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * This can only be done by the logged in user. @@ -47,9 +53,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -89,9 +95,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -131,9 +137,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -164,9 +170,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -256,9 +262,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -307,9 +313,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/deno/types/ObjectParamAPI.ts index ebcd714f27c5..8b3bf3f0fd4e 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/types/ObjectParamAPI.ts @@ -125,7 +125,7 @@ export class ObjectPetApi { * Add a new pet to the store * @param param the request object */ - public addPet(param: PetApiAddPetRequest, options?: Configuration): Promise { + public addPet(param: PetApiAddPetRequest , options?: Configuration): Promise { return this.api.addPet(param.pet, options).toPromise(); } @@ -133,7 +133,7 @@ export class ObjectPetApi { * Deletes a pet * @param param the request object */ - public deletePet(param: PetApiDeletePetRequest, options?: Configuration): Promise { + public deletePet(param: PetApiDeletePetRequest , options?: Configuration): Promise { return this.api.deletePet(param.petId, param.apiKey, options).toPromise(); } @@ -142,7 +142,7 @@ export class ObjectPetApi { * Finds Pets by status * @param param the request object */ - public findPetsByStatus(param: PetApiFindPetsByStatusRequest, options?: Configuration): Promise> { + public findPetsByStatus(param: PetApiFindPetsByStatusRequest , options?: Configuration): Promise> { return this.api.findPetsByStatus(param.status, options).toPromise(); } @@ -151,7 +151,7 @@ export class ObjectPetApi { * Finds Pets by tags * @param param the request object */ - public findPetsByTags(param: PetApiFindPetsByTagsRequest, options?: Configuration): Promise> { + public findPetsByTags(param: PetApiFindPetsByTagsRequest , options?: Configuration): Promise> { return this.api.findPetsByTags(param.tags, options).toPromise(); } @@ -160,7 +160,7 @@ export class ObjectPetApi { * Find pet by ID * @param param the request object */ - public getPetById(param: PetApiGetPetByIdRequest, options?: Configuration): Promise { + public getPetById(param: PetApiGetPetByIdRequest , options?: Configuration): Promise { return this.api.getPetById(param.petId, options).toPromise(); } @@ -168,7 +168,7 @@ export class ObjectPetApi { * Update an existing pet * @param param the request object */ - public updatePet(param: PetApiUpdatePetRequest, options?: Configuration): Promise { + public updatePet(param: PetApiUpdatePetRequest , options?: Configuration): Promise { return this.api.updatePet(param.pet, options).toPromise(); } @@ -176,7 +176,7 @@ export class ObjectPetApi { * Updates a pet in the store with form data * @param param the request object */ - public updatePetWithForm(param: PetApiUpdatePetWithFormRequest, options?: Configuration): Promise { + public updatePetWithForm(param: PetApiUpdatePetWithFormRequest , options?: Configuration): Promise { return this.api.updatePetWithForm(param.petId, param.name, param.status, options).toPromise(); } @@ -184,7 +184,7 @@ export class ObjectPetApi { * uploads an image * @param param the request object */ - public uploadFile(param: PetApiUploadFileRequest, options?: Configuration): Promise { + public uploadFile(param: PetApiUploadFileRequest , options?: Configuration): Promise { return this.api.uploadFile(param.petId, param.additionalMetadata, param.file, options).toPromise(); } @@ -235,7 +235,7 @@ export class ObjectStoreApi { * Delete purchase order by ID * @param param the request object */ - public deleteOrder(param: StoreApiDeleteOrderRequest, options?: Configuration): Promise { + public deleteOrder(param: StoreApiDeleteOrderRequest , options?: Configuration): Promise { return this.api.deleteOrder(param.orderId, options).toPromise(); } @@ -244,7 +244,7 @@ export class ObjectStoreApi { * Returns pet inventories by status * @param param the request object */ - public getInventory(param: StoreApiGetInventoryRequest, options?: Configuration): Promise<{ [key: string]: number; }> { + public getInventory(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }> { return this.api.getInventory( options).toPromise(); } @@ -253,7 +253,7 @@ export class ObjectStoreApi { * Find purchase order by ID * @param param the request object */ - public getOrderById(param: StoreApiGetOrderByIdRequest, options?: Configuration): Promise { + public getOrderById(param: StoreApiGetOrderByIdRequest , options?: Configuration): Promise { return this.api.getOrderById(param.orderId, options).toPromise(); } @@ -261,7 +261,7 @@ export class ObjectStoreApi { * Place an order for a pet * @param param the request object */ - public placeOrder(param: StoreApiPlaceOrderRequest, options?: Configuration): Promise { + public placeOrder(param: StoreApiPlaceOrderRequest , options?: Configuration): Promise { return this.api.placeOrder(param.order, options).toPromise(); } @@ -360,7 +360,7 @@ export class ObjectUserApi { * Create user * @param param the request object */ - public createUser(param: UserApiCreateUserRequest, options?: Configuration): Promise { + public createUser(param: UserApiCreateUserRequest , options?: Configuration): Promise { return this.api.createUser(param.user, options).toPromise(); } @@ -368,7 +368,7 @@ export class ObjectUserApi { * Creates list of users with given input array * @param param the request object */ - public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest, options?: Configuration): Promise { + public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest , options?: Configuration): Promise { return this.api.createUsersWithArrayInput(param.user, options).toPromise(); } @@ -376,7 +376,7 @@ export class ObjectUserApi { * Creates list of users with given input array * @param param the request object */ - public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest, options?: Configuration): Promise { + public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest , options?: Configuration): Promise { return this.api.createUsersWithListInput(param.user, options).toPromise(); } @@ -385,7 +385,7 @@ export class ObjectUserApi { * Delete user * @param param the request object */ - public deleteUser(param: UserApiDeleteUserRequest, options?: Configuration): Promise { + public deleteUser(param: UserApiDeleteUserRequest , options?: Configuration): Promise { return this.api.deleteUser(param.username, options).toPromise(); } @@ -393,7 +393,7 @@ export class ObjectUserApi { * Get user by user name * @param param the request object */ - public getUserByName(param: UserApiGetUserByNameRequest, options?: Configuration): Promise { + public getUserByName(param: UserApiGetUserByNameRequest , options?: Configuration): Promise { return this.api.getUserByName(param.username, options).toPromise(); } @@ -401,7 +401,7 @@ export class ObjectUserApi { * Logs user into the system * @param param the request object */ - public loginUser(param: UserApiLoginUserRequest, options?: Configuration): Promise { + public loginUser(param: UserApiLoginUserRequest , options?: Configuration): Promise { return this.api.loginUser(param.username, param.password, options).toPromise(); } @@ -409,7 +409,7 @@ export class ObjectUserApi { * Logs out current logged in user session * @param param the request object */ - public logoutUser(param: UserApiLogoutUserRequest, options?: Configuration): Promise { + public logoutUser(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise { return this.api.logoutUser( options).toPromise(); } @@ -418,7 +418,7 @@ export class ObjectUserApi { * Updated user * @param param the request object */ - public updateUser(param: UserApiUpdateUserRequest, options?: Configuration): Promise { + public updateUser(param: UserApiUpdateUserRequest , options?: Configuration): Promise { return this.api.updateUser(param.username, param.user, options).toPromise(); } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts index ff6f2d0869bb..41b30a01b3be 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http.ts'; import * as models from '../models/all.ts'; import { Configuration} from '../configuration.ts' +import { SecurityAuthentication } from '../auth/auth'; import { Observable, of, from } from '../rxjsStub.ts'; import {mergeMap, map} from '../rxjsStub.ts'; import { ApiResponse } from '../models/ApiResponse.ts'; @@ -26,6 +27,10 @@ export class ObservablePetApi { this.responseProcessor = responseProcessor || new PetApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -236,6 +241,10 @@ export class ObservableStoreApi { this.responseProcessor = responseProcessor || new StoreApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -348,6 +357,10 @@ export class ObservableUserApi { this.responseProcessor = responseProcessor || new UserApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/deno/types/PromiseAPI.ts index 76db56cbc8bd..b5c8a2533030 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/types/PromiseAPI.ts @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http.ts'; import * as models from '../models/all.ts'; import { Configuration} from '../configuration.ts' +import { SecurityAuthentication } from '../auth/auth'; import { ApiResponse } from '../models/ApiResponse.ts'; import { Category } from '../models/Category.ts'; @@ -22,6 +23,10 @@ export class PromisePetApi { this.api = new ObservablePetApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -121,6 +126,10 @@ export class PromiseStoreApi { this.api = new ObservableStoreApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -178,6 +187,10 @@ export class PromiseUserApi { this.api = new ObservableUserApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts index 9b8cd23af11e..2a4f90ba9759 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts @@ -5,6 +5,7 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; @@ -18,6 +19,11 @@ import { Pet } from '../models/Pet'; */ @injectable() export class PetApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * Add a new pet to the store @@ -53,9 +59,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -90,9 +96,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("api_key", ObjectSerializer.serialize(apiKey, "string", "")); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -127,9 +133,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -164,9 +170,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -197,9 +203,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -241,9 +247,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -306,9 +312,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Content-Type", contentType); } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -373,9 +379,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Content-Type", contentType); } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts index 356d2cfbc4d0..7a33942e455a 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts @@ -5,6 +5,7 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; @@ -17,6 +18,11 @@ import { Order } from '../models/Order'; */ @injectable() export class StoreApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -60,9 +66,9 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts index 3991a33b383b..2d41919cb265 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts @@ -5,6 +5,7 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; @@ -17,6 +18,11 @@ import { User } from '../models/User'; */ @injectable() export class UserApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * This can only be done by the logged in user. @@ -51,9 +57,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -93,9 +99,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -135,9 +141,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -168,9 +174,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -260,9 +266,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -311,9 +317,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/services/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/services/ObjectParamAPI.ts index d0cdd02e78de..fd229bfc9a50 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/services/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/services/ObjectParamAPI.ts @@ -15,52 +15,52 @@ export abstract class AbstractObjectPetApi { * Add a new pet to the store * @param param the request object */ - public abstract addPet(param: req.PetApiAddPetRequest, options?: Configuration): Promise; + public abstract addPet(param: req.PetApiAddPetRequest , options?: Configuration): Promise; /** * Deletes a pet * @param param the request object */ - public abstract deletePet(param: req.PetApiDeletePetRequest, options?: Configuration): Promise; + public abstract deletePet(param: req.PetApiDeletePetRequest , options?: Configuration): Promise; /** * Multiple status values can be provided with comma separated strings * Finds Pets by status * @param param the request object */ - public abstract findPetsByStatus(param: req.PetApiFindPetsByStatusRequest, options?: Configuration): Promise>; + public abstract findPetsByStatus(param: req.PetApiFindPetsByStatusRequest , options?: Configuration): Promise>; /** * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * Finds Pets by tags * @param param the request object */ - public abstract findPetsByTags(param: req.PetApiFindPetsByTagsRequest, options?: Configuration): Promise>; + public abstract findPetsByTags(param: req.PetApiFindPetsByTagsRequest , options?: Configuration): Promise>; /** * Returns a single pet * Find pet by ID * @param param the request object */ - public abstract getPetById(param: req.PetApiGetPetByIdRequest, options?: Configuration): Promise; + public abstract getPetById(param: req.PetApiGetPetByIdRequest , options?: Configuration): Promise; /** * Update an existing pet * @param param the request object */ - public abstract updatePet(param: req.PetApiUpdatePetRequest, options?: Configuration): Promise; + public abstract updatePet(param: req.PetApiUpdatePetRequest , options?: Configuration): Promise; /** * Updates a pet in the store with form data * @param param the request object */ - public abstract updatePetWithForm(param: req.PetApiUpdatePetWithFormRequest, options?: Configuration): Promise; + public abstract updatePetWithForm(param: req.PetApiUpdatePetWithFormRequest , options?: Configuration): Promise; /** * uploads an image * @param param the request object */ - public abstract uploadFile(param: req.PetApiUploadFileRequest, options?: Configuration): Promise; + public abstract uploadFile(param: req.PetApiUploadFileRequest , options?: Configuration): Promise; } @@ -71,27 +71,27 @@ export abstract class AbstractObjectStoreApi { * Delete purchase order by ID * @param param the request object */ - public abstract deleteOrder(param: req.StoreApiDeleteOrderRequest, options?: Configuration): Promise; + public abstract deleteOrder(param: req.StoreApiDeleteOrderRequest , options?: Configuration): Promise; /** * Returns a map of status codes to quantities * Returns pet inventories by status * @param param the request object */ - public abstract getInventory(param: req.StoreApiGetInventoryRequest, options?: Configuration): Promise<{ [key: string]: number; }>; + public abstract getInventory(param: req.StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }>; /** * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * Find purchase order by ID * @param param the request object */ - public abstract getOrderById(param: req.StoreApiGetOrderByIdRequest, options?: Configuration): Promise; + public abstract getOrderById(param: req.StoreApiGetOrderByIdRequest , options?: Configuration): Promise; /** * Place an order for a pet * @param param the request object */ - public abstract placeOrder(param: req.StoreApiPlaceOrderRequest, options?: Configuration): Promise; + public abstract placeOrder(param: req.StoreApiPlaceOrderRequest , options?: Configuration): Promise; } @@ -102,50 +102,50 @@ export abstract class AbstractObjectUserApi { * Create user * @param param the request object */ - public abstract createUser(param: req.UserApiCreateUserRequest, options?: Configuration): Promise; + public abstract createUser(param: req.UserApiCreateUserRequest , options?: Configuration): Promise; /** * Creates list of users with given input array * @param param the request object */ - public abstract createUsersWithArrayInput(param: req.UserApiCreateUsersWithArrayInputRequest, options?: Configuration): Promise; + public abstract createUsersWithArrayInput(param: req.UserApiCreateUsersWithArrayInputRequest , options?: Configuration): Promise; /** * Creates list of users with given input array * @param param the request object */ - public abstract createUsersWithListInput(param: req.UserApiCreateUsersWithListInputRequest, options?: Configuration): Promise; + public abstract createUsersWithListInput(param: req.UserApiCreateUsersWithListInputRequest , options?: Configuration): Promise; /** * This can only be done by the logged in user. * Delete user * @param param the request object */ - public abstract deleteUser(param: req.UserApiDeleteUserRequest, options?: Configuration): Promise; + public abstract deleteUser(param: req.UserApiDeleteUserRequest , options?: Configuration): Promise; /** * Get user by user name * @param param the request object */ - public abstract getUserByName(param: req.UserApiGetUserByNameRequest, options?: Configuration): Promise; + public abstract getUserByName(param: req.UserApiGetUserByNameRequest , options?: Configuration): Promise; /** * Logs user into the system * @param param the request object */ - public abstract loginUser(param: req.UserApiLoginUserRequest, options?: Configuration): Promise; + public abstract loginUser(param: req.UserApiLoginUserRequest , options?: Configuration): Promise; /** * Logs out current logged in user session * @param param the request object */ - public abstract logoutUser(param: req.UserApiLogoutUserRequest, options?: Configuration): Promise; + public abstract logoutUser(param: req.UserApiLogoutUserRequest = {}, options?: Configuration): Promise; /** * This can only be done by the logged in user. * Updated user * @param param the request object */ - public abstract updateUser(param: req.UserApiUpdateUserRequest, options?: Configuration): Promise; + public abstract updateUser(param: req.UserApiUpdateUserRequest , options?: Configuration): Promise; } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObjectParamAPI.ts index 829c9d0363a8..7915c0f83ed4 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObjectParamAPI.ts @@ -125,7 +125,7 @@ export class ObjectPetApi { * Add a new pet to the store * @param param the request object */ - public addPet(param: PetApiAddPetRequest, options?: Configuration): Promise { + public addPet(param: PetApiAddPetRequest , options?: Configuration): Promise { return this.api.addPet(param.pet, options).toPromise(); } @@ -133,7 +133,7 @@ export class ObjectPetApi { * Deletes a pet * @param param the request object */ - public deletePet(param: PetApiDeletePetRequest, options?: Configuration): Promise { + public deletePet(param: PetApiDeletePetRequest , options?: Configuration): Promise { return this.api.deletePet(param.petId, param.apiKey, options).toPromise(); } @@ -142,7 +142,7 @@ export class ObjectPetApi { * Finds Pets by status * @param param the request object */ - public findPetsByStatus(param: PetApiFindPetsByStatusRequest, options?: Configuration): Promise> { + public findPetsByStatus(param: PetApiFindPetsByStatusRequest , options?: Configuration): Promise> { return this.api.findPetsByStatus(param.status, options).toPromise(); } @@ -151,7 +151,7 @@ export class ObjectPetApi { * Finds Pets by tags * @param param the request object */ - public findPetsByTags(param: PetApiFindPetsByTagsRequest, options?: Configuration): Promise> { + public findPetsByTags(param: PetApiFindPetsByTagsRequest , options?: Configuration): Promise> { return this.api.findPetsByTags(param.tags, options).toPromise(); } @@ -160,7 +160,7 @@ export class ObjectPetApi { * Find pet by ID * @param param the request object */ - public getPetById(param: PetApiGetPetByIdRequest, options?: Configuration): Promise { + public getPetById(param: PetApiGetPetByIdRequest , options?: Configuration): Promise { return this.api.getPetById(param.petId, options).toPromise(); } @@ -168,7 +168,7 @@ export class ObjectPetApi { * Update an existing pet * @param param the request object */ - public updatePet(param: PetApiUpdatePetRequest, options?: Configuration): Promise { + public updatePet(param: PetApiUpdatePetRequest , options?: Configuration): Promise { return this.api.updatePet(param.pet, options).toPromise(); } @@ -176,7 +176,7 @@ export class ObjectPetApi { * Updates a pet in the store with form data * @param param the request object */ - public updatePetWithForm(param: PetApiUpdatePetWithFormRequest, options?: Configuration): Promise { + public updatePetWithForm(param: PetApiUpdatePetWithFormRequest , options?: Configuration): Promise { return this.api.updatePetWithForm(param.petId, param.name, param.status, options).toPromise(); } @@ -184,7 +184,7 @@ export class ObjectPetApi { * uploads an image * @param param the request object */ - public uploadFile(param: PetApiUploadFileRequest, options?: Configuration): Promise { + public uploadFile(param: PetApiUploadFileRequest , options?: Configuration): Promise { return this.api.uploadFile(param.petId, param.additionalMetadata, param.file, options).toPromise(); } @@ -235,7 +235,7 @@ export class ObjectStoreApi { * Delete purchase order by ID * @param param the request object */ - public deleteOrder(param: StoreApiDeleteOrderRequest, options?: Configuration): Promise { + public deleteOrder(param: StoreApiDeleteOrderRequest , options?: Configuration): Promise { return this.api.deleteOrder(param.orderId, options).toPromise(); } @@ -244,7 +244,7 @@ export class ObjectStoreApi { * Returns pet inventories by status * @param param the request object */ - public getInventory(param: StoreApiGetInventoryRequest, options?: Configuration): Promise<{ [key: string]: number; }> { + public getInventory(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }> { return this.api.getInventory( options).toPromise(); } @@ -253,7 +253,7 @@ export class ObjectStoreApi { * Find purchase order by ID * @param param the request object */ - public getOrderById(param: StoreApiGetOrderByIdRequest, options?: Configuration): Promise { + public getOrderById(param: StoreApiGetOrderByIdRequest , options?: Configuration): Promise { return this.api.getOrderById(param.orderId, options).toPromise(); } @@ -261,7 +261,7 @@ export class ObjectStoreApi { * Place an order for a pet * @param param the request object */ - public placeOrder(param: StoreApiPlaceOrderRequest, options?: Configuration): Promise { + public placeOrder(param: StoreApiPlaceOrderRequest , options?: Configuration): Promise { return this.api.placeOrder(param.order, options).toPromise(); } @@ -360,7 +360,7 @@ export class ObjectUserApi { * Create user * @param param the request object */ - public createUser(param: UserApiCreateUserRequest, options?: Configuration): Promise { + public createUser(param: UserApiCreateUserRequest , options?: Configuration): Promise { return this.api.createUser(param.user, options).toPromise(); } @@ -368,7 +368,7 @@ export class ObjectUserApi { * Creates list of users with given input array * @param param the request object */ - public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest, options?: Configuration): Promise { + public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest , options?: Configuration): Promise { return this.api.createUsersWithArrayInput(param.user, options).toPromise(); } @@ -376,7 +376,7 @@ export class ObjectUserApi { * Creates list of users with given input array * @param param the request object */ - public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest, options?: Configuration): Promise { + public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest , options?: Configuration): Promise { return this.api.createUsersWithListInput(param.user, options).toPromise(); } @@ -385,7 +385,7 @@ export class ObjectUserApi { * Delete user * @param param the request object */ - public deleteUser(param: UserApiDeleteUserRequest, options?: Configuration): Promise { + public deleteUser(param: UserApiDeleteUserRequest , options?: Configuration): Promise { return this.api.deleteUser(param.username, options).toPromise(); } @@ -393,7 +393,7 @@ export class ObjectUserApi { * Get user by user name * @param param the request object */ - public getUserByName(param: UserApiGetUserByNameRequest, options?: Configuration): Promise { + public getUserByName(param: UserApiGetUserByNameRequest , options?: Configuration): Promise { return this.api.getUserByName(param.username, options).toPromise(); } @@ -401,7 +401,7 @@ export class ObjectUserApi { * Logs user into the system * @param param the request object */ - public loginUser(param: UserApiLoginUserRequest, options?: Configuration): Promise { + public loginUser(param: UserApiLoginUserRequest , options?: Configuration): Promise { return this.api.loginUser(param.username, param.password, options).toPromise(); } @@ -409,7 +409,7 @@ export class ObjectUserApi { * Logs out current logged in user session * @param param the request object */ - public logoutUser(param: UserApiLogoutUserRequest, options?: Configuration): Promise { + public logoutUser(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise { return this.api.logoutUser( options).toPromise(); } @@ -418,7 +418,7 @@ export class ObjectUserApi { * Updated user * @param param the request object */ - public updateUser(param: UserApiUpdateUserRequest, options?: Configuration): Promise { + public updateUser(param: UserApiUpdateUserRequest , options?: Configuration): Promise { return this.api.updateUser(param.username, param.user, options).toPromise(); } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts index 98cbc9f37402..c224e837eb0f 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' +import { SecurityAuthentication } from '../auth/auth'; import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { injectable, inject, optional } from "inversify"; @@ -31,6 +32,10 @@ export class ObservablePetApi { this.responseProcessor = responseProcessor || new PetApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -244,6 +249,10 @@ export class ObservableStoreApi { this.responseProcessor = responseProcessor || new StoreApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -359,6 +368,10 @@ export class ObservableUserApi { this.responseProcessor = responseProcessor || new UserApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/types/PromiseAPI.ts index a6135ddbd244..69f549c27d0f 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/types/PromiseAPI.ts @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' +import { SecurityAuthentication } from '../auth/auth'; import { injectable, inject, optional } from "inversify"; import { AbstractConfiguration } from "../services/configuration"; @@ -27,6 +28,10 @@ export class PromisePetApi { this.api = new ObservablePetApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -129,6 +134,10 @@ export class PromiseStoreApi { this.api = new ObservableStoreApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -189,6 +198,10 @@ export class PromiseUserApi { this.api = new ObservableUserApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts index a2b9813749e5..5b73c428dd43 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts @@ -3,6 +3,7 @@ import { BaseAPIRequestFactory, RequiredError } from './baseapi'; import {Configuration} from '../configuration'; import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import {ObjectSerializer} from '../models/ObjectSerializer'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; @@ -14,6 +15,11 @@ import { Pet } from '../models/Pet'; * no description */ export class PetApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * Add a new pet to the store @@ -49,9 +55,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -86,9 +92,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("api_key", ObjectSerializer.serialize(apiKey, "string", "")); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -123,9 +129,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -160,9 +166,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -193,9 +199,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -237,9 +243,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -302,9 +308,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Content-Type", contentType); } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -369,9 +375,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Content-Type", contentType); } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts index a8bc438d420d..5c6f34fd0cf1 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts @@ -3,6 +3,7 @@ import { BaseAPIRequestFactory, RequiredError } from './baseapi'; import {Configuration} from '../configuration'; import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import {ObjectSerializer} from '../models/ObjectSerializer'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; @@ -13,6 +14,11 @@ import { Order } from '../models/Order'; * no description */ export class StoreApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -56,9 +62,9 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts index 3f493441c39d..6063fe740a17 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts @@ -3,6 +3,7 @@ import { BaseAPIRequestFactory, RequiredError } from './baseapi'; import {Configuration} from '../configuration'; import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import {ObjectSerializer} from '../models/ObjectSerializer'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; @@ -13,6 +14,11 @@ import { User } from '../models/User'; * no description */ export class UserApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * This can only be done by the logged in user. @@ -47,9 +53,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -89,9 +95,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -131,9 +137,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -164,9 +170,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -256,9 +262,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -307,9 +313,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObjectParamAPI.ts index 829c9d0363a8..7915c0f83ed4 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObjectParamAPI.ts @@ -125,7 +125,7 @@ export class ObjectPetApi { * Add a new pet to the store * @param param the request object */ - public addPet(param: PetApiAddPetRequest, options?: Configuration): Promise { + public addPet(param: PetApiAddPetRequest , options?: Configuration): Promise { return this.api.addPet(param.pet, options).toPromise(); } @@ -133,7 +133,7 @@ export class ObjectPetApi { * Deletes a pet * @param param the request object */ - public deletePet(param: PetApiDeletePetRequest, options?: Configuration): Promise { + public deletePet(param: PetApiDeletePetRequest , options?: Configuration): Promise { return this.api.deletePet(param.petId, param.apiKey, options).toPromise(); } @@ -142,7 +142,7 @@ export class ObjectPetApi { * Finds Pets by status * @param param the request object */ - public findPetsByStatus(param: PetApiFindPetsByStatusRequest, options?: Configuration): Promise> { + public findPetsByStatus(param: PetApiFindPetsByStatusRequest , options?: Configuration): Promise> { return this.api.findPetsByStatus(param.status, options).toPromise(); } @@ -151,7 +151,7 @@ export class ObjectPetApi { * Finds Pets by tags * @param param the request object */ - public findPetsByTags(param: PetApiFindPetsByTagsRequest, options?: Configuration): Promise> { + public findPetsByTags(param: PetApiFindPetsByTagsRequest , options?: Configuration): Promise> { return this.api.findPetsByTags(param.tags, options).toPromise(); } @@ -160,7 +160,7 @@ export class ObjectPetApi { * Find pet by ID * @param param the request object */ - public getPetById(param: PetApiGetPetByIdRequest, options?: Configuration): Promise { + public getPetById(param: PetApiGetPetByIdRequest , options?: Configuration): Promise { return this.api.getPetById(param.petId, options).toPromise(); } @@ -168,7 +168,7 @@ export class ObjectPetApi { * Update an existing pet * @param param the request object */ - public updatePet(param: PetApiUpdatePetRequest, options?: Configuration): Promise { + public updatePet(param: PetApiUpdatePetRequest , options?: Configuration): Promise { return this.api.updatePet(param.pet, options).toPromise(); } @@ -176,7 +176,7 @@ export class ObjectPetApi { * Updates a pet in the store with form data * @param param the request object */ - public updatePetWithForm(param: PetApiUpdatePetWithFormRequest, options?: Configuration): Promise { + public updatePetWithForm(param: PetApiUpdatePetWithFormRequest , options?: Configuration): Promise { return this.api.updatePetWithForm(param.petId, param.name, param.status, options).toPromise(); } @@ -184,7 +184,7 @@ export class ObjectPetApi { * uploads an image * @param param the request object */ - public uploadFile(param: PetApiUploadFileRequest, options?: Configuration): Promise { + public uploadFile(param: PetApiUploadFileRequest , options?: Configuration): Promise { return this.api.uploadFile(param.petId, param.additionalMetadata, param.file, options).toPromise(); } @@ -235,7 +235,7 @@ export class ObjectStoreApi { * Delete purchase order by ID * @param param the request object */ - public deleteOrder(param: StoreApiDeleteOrderRequest, options?: Configuration): Promise { + public deleteOrder(param: StoreApiDeleteOrderRequest , options?: Configuration): Promise { return this.api.deleteOrder(param.orderId, options).toPromise(); } @@ -244,7 +244,7 @@ export class ObjectStoreApi { * Returns pet inventories by status * @param param the request object */ - public getInventory(param: StoreApiGetInventoryRequest, options?: Configuration): Promise<{ [key: string]: number; }> { + public getInventory(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }> { return this.api.getInventory( options).toPromise(); } @@ -253,7 +253,7 @@ export class ObjectStoreApi { * Find purchase order by ID * @param param the request object */ - public getOrderById(param: StoreApiGetOrderByIdRequest, options?: Configuration): Promise { + public getOrderById(param: StoreApiGetOrderByIdRequest , options?: Configuration): Promise { return this.api.getOrderById(param.orderId, options).toPromise(); } @@ -261,7 +261,7 @@ export class ObjectStoreApi { * Place an order for a pet * @param param the request object */ - public placeOrder(param: StoreApiPlaceOrderRequest, options?: Configuration): Promise { + public placeOrder(param: StoreApiPlaceOrderRequest , options?: Configuration): Promise { return this.api.placeOrder(param.order, options).toPromise(); } @@ -360,7 +360,7 @@ export class ObjectUserApi { * Create user * @param param the request object */ - public createUser(param: UserApiCreateUserRequest, options?: Configuration): Promise { + public createUser(param: UserApiCreateUserRequest , options?: Configuration): Promise { return this.api.createUser(param.user, options).toPromise(); } @@ -368,7 +368,7 @@ export class ObjectUserApi { * Creates list of users with given input array * @param param the request object */ - public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest, options?: Configuration): Promise { + public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest , options?: Configuration): Promise { return this.api.createUsersWithArrayInput(param.user, options).toPromise(); } @@ -376,7 +376,7 @@ export class ObjectUserApi { * Creates list of users with given input array * @param param the request object */ - public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest, options?: Configuration): Promise { + public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest , options?: Configuration): Promise { return this.api.createUsersWithListInput(param.user, options).toPromise(); } @@ -385,7 +385,7 @@ export class ObjectUserApi { * Delete user * @param param the request object */ - public deleteUser(param: UserApiDeleteUserRequest, options?: Configuration): Promise { + public deleteUser(param: UserApiDeleteUserRequest , options?: Configuration): Promise { return this.api.deleteUser(param.username, options).toPromise(); } @@ -393,7 +393,7 @@ export class ObjectUserApi { * Get user by user name * @param param the request object */ - public getUserByName(param: UserApiGetUserByNameRequest, options?: Configuration): Promise { + public getUserByName(param: UserApiGetUserByNameRequest , options?: Configuration): Promise { return this.api.getUserByName(param.username, options).toPromise(); } @@ -401,7 +401,7 @@ export class ObjectUserApi { * Logs user into the system * @param param the request object */ - public loginUser(param: UserApiLoginUserRequest, options?: Configuration): Promise { + public loginUser(param: UserApiLoginUserRequest , options?: Configuration): Promise { return this.api.loginUser(param.username, param.password, options).toPromise(); } @@ -409,7 +409,7 @@ export class ObjectUserApi { * Logs out current logged in user session * @param param the request object */ - public logoutUser(param: UserApiLogoutUserRequest, options?: Configuration): Promise { + public logoutUser(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise { return this.api.logoutUser( options).toPromise(); } @@ -418,7 +418,7 @@ export class ObjectUserApi { * Updated user * @param param the request object */ - public updateUser(param: UserApiUpdateUserRequest, options?: Configuration): Promise { + public updateUser(param: UserApiUpdateUserRequest , options?: Configuration): Promise { return this.api.updateUser(param.username, param.user, options).toPromise(); } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts index 4207fd5102dc..f040e33cd57c 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' +import { SecurityAuthentication } from '../auth/auth'; import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { ApiResponse } from '../models/ApiResponse'; @@ -26,6 +27,10 @@ export class ObservablePetApi { this.responseProcessor = responseProcessor || new PetApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -236,6 +241,10 @@ export class ObservableStoreApi { this.responseProcessor = responseProcessor || new StoreApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -348,6 +357,10 @@ export class ObservableUserApi { this.responseProcessor = responseProcessor || new UserApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/types/PromiseAPI.ts index ac44ba7a13b2..cb64631a1453 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/types/PromiseAPI.ts @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' +import { SecurityAuthentication } from '../auth/auth'; import { ApiResponse } from '../models/ApiResponse'; import { Category } from '../models/Category'; @@ -22,6 +23,10 @@ export class PromisePetApi { this.api = new ObservablePetApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -121,6 +126,10 @@ export class PromiseStoreApi { this.api = new ObservableStoreApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -178,6 +187,10 @@ export class PromiseUserApi { this.api = new ObservableUserApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts index ff3b13bc8455..512d4b0abf70 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts @@ -5,6 +5,7 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; @@ -16,6 +17,11 @@ import { Pet } from '../models/Pet'; * no description */ export class PetApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * Add a new pet to the store @@ -51,9 +57,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -88,9 +94,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("api_key", ObjectSerializer.serialize(apiKey, "string", "")); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -125,9 +131,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -162,9 +168,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -195,9 +201,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -239,9 +245,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -304,9 +310,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Content-Type", contentType); } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -371,9 +377,9 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Content-Type", contentType); } - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts index 46cf6d33efc7..17ab0194847b 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts @@ -5,6 +5,7 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; @@ -15,6 +16,11 @@ import { Order } from '../models/Order'; * no description */ export class StoreApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -58,9 +64,9 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts index 99a7c43b2e5c..2fb5b8966977 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts @@ -5,6 +5,7 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; @@ -15,6 +16,11 @@ import { User } from '../models/User'; * no description */ export class UserApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * This can only be done by the logged in user. @@ -49,9 +55,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -91,9 +97,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -133,9 +139,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -166,9 +172,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -258,9 +264,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -309,9 +315,9 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - let authMethod = null; + let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObjectParamAPI.ts index 829c9d0363a8..7915c0f83ed4 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObjectParamAPI.ts @@ -125,7 +125,7 @@ export class ObjectPetApi { * Add a new pet to the store * @param param the request object */ - public addPet(param: PetApiAddPetRequest, options?: Configuration): Promise { + public addPet(param: PetApiAddPetRequest , options?: Configuration): Promise { return this.api.addPet(param.pet, options).toPromise(); } @@ -133,7 +133,7 @@ export class ObjectPetApi { * Deletes a pet * @param param the request object */ - public deletePet(param: PetApiDeletePetRequest, options?: Configuration): Promise { + public deletePet(param: PetApiDeletePetRequest , options?: Configuration): Promise { return this.api.deletePet(param.petId, param.apiKey, options).toPromise(); } @@ -142,7 +142,7 @@ export class ObjectPetApi { * Finds Pets by status * @param param the request object */ - public findPetsByStatus(param: PetApiFindPetsByStatusRequest, options?: Configuration): Promise> { + public findPetsByStatus(param: PetApiFindPetsByStatusRequest , options?: Configuration): Promise> { return this.api.findPetsByStatus(param.status, options).toPromise(); } @@ -151,7 +151,7 @@ export class ObjectPetApi { * Finds Pets by tags * @param param the request object */ - public findPetsByTags(param: PetApiFindPetsByTagsRequest, options?: Configuration): Promise> { + public findPetsByTags(param: PetApiFindPetsByTagsRequest , options?: Configuration): Promise> { return this.api.findPetsByTags(param.tags, options).toPromise(); } @@ -160,7 +160,7 @@ export class ObjectPetApi { * Find pet by ID * @param param the request object */ - public getPetById(param: PetApiGetPetByIdRequest, options?: Configuration): Promise { + public getPetById(param: PetApiGetPetByIdRequest , options?: Configuration): Promise { return this.api.getPetById(param.petId, options).toPromise(); } @@ -168,7 +168,7 @@ export class ObjectPetApi { * Update an existing pet * @param param the request object */ - public updatePet(param: PetApiUpdatePetRequest, options?: Configuration): Promise { + public updatePet(param: PetApiUpdatePetRequest , options?: Configuration): Promise { return this.api.updatePet(param.pet, options).toPromise(); } @@ -176,7 +176,7 @@ export class ObjectPetApi { * Updates a pet in the store with form data * @param param the request object */ - public updatePetWithForm(param: PetApiUpdatePetWithFormRequest, options?: Configuration): Promise { + public updatePetWithForm(param: PetApiUpdatePetWithFormRequest , options?: Configuration): Promise { return this.api.updatePetWithForm(param.petId, param.name, param.status, options).toPromise(); } @@ -184,7 +184,7 @@ export class ObjectPetApi { * uploads an image * @param param the request object */ - public uploadFile(param: PetApiUploadFileRequest, options?: Configuration): Promise { + public uploadFile(param: PetApiUploadFileRequest , options?: Configuration): Promise { return this.api.uploadFile(param.petId, param.additionalMetadata, param.file, options).toPromise(); } @@ -235,7 +235,7 @@ export class ObjectStoreApi { * Delete purchase order by ID * @param param the request object */ - public deleteOrder(param: StoreApiDeleteOrderRequest, options?: Configuration): Promise { + public deleteOrder(param: StoreApiDeleteOrderRequest , options?: Configuration): Promise { return this.api.deleteOrder(param.orderId, options).toPromise(); } @@ -244,7 +244,7 @@ export class ObjectStoreApi { * Returns pet inventories by status * @param param the request object */ - public getInventory(param: StoreApiGetInventoryRequest, options?: Configuration): Promise<{ [key: string]: number; }> { + public getInventory(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }> { return this.api.getInventory( options).toPromise(); } @@ -253,7 +253,7 @@ export class ObjectStoreApi { * Find purchase order by ID * @param param the request object */ - public getOrderById(param: StoreApiGetOrderByIdRequest, options?: Configuration): Promise { + public getOrderById(param: StoreApiGetOrderByIdRequest , options?: Configuration): Promise { return this.api.getOrderById(param.orderId, options).toPromise(); } @@ -261,7 +261,7 @@ export class ObjectStoreApi { * Place an order for a pet * @param param the request object */ - public placeOrder(param: StoreApiPlaceOrderRequest, options?: Configuration): Promise { + public placeOrder(param: StoreApiPlaceOrderRequest , options?: Configuration): Promise { return this.api.placeOrder(param.order, options).toPromise(); } @@ -360,7 +360,7 @@ export class ObjectUserApi { * Create user * @param param the request object */ - public createUser(param: UserApiCreateUserRequest, options?: Configuration): Promise { + public createUser(param: UserApiCreateUserRequest , options?: Configuration): Promise { return this.api.createUser(param.user, options).toPromise(); } @@ -368,7 +368,7 @@ export class ObjectUserApi { * Creates list of users with given input array * @param param the request object */ - public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest, options?: Configuration): Promise { + public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest , options?: Configuration): Promise { return this.api.createUsersWithArrayInput(param.user, options).toPromise(); } @@ -376,7 +376,7 @@ export class ObjectUserApi { * Creates list of users with given input array * @param param the request object */ - public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest, options?: Configuration): Promise { + public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest , options?: Configuration): Promise { return this.api.createUsersWithListInput(param.user, options).toPromise(); } @@ -385,7 +385,7 @@ export class ObjectUserApi { * Delete user * @param param the request object */ - public deleteUser(param: UserApiDeleteUserRequest, options?: Configuration): Promise { + public deleteUser(param: UserApiDeleteUserRequest , options?: Configuration): Promise { return this.api.deleteUser(param.username, options).toPromise(); } @@ -393,7 +393,7 @@ export class ObjectUserApi { * Get user by user name * @param param the request object */ - public getUserByName(param: UserApiGetUserByNameRequest, options?: Configuration): Promise { + public getUserByName(param: UserApiGetUserByNameRequest , options?: Configuration): Promise { return this.api.getUserByName(param.username, options).toPromise(); } @@ -401,7 +401,7 @@ export class ObjectUserApi { * Logs user into the system * @param param the request object */ - public loginUser(param: UserApiLoginUserRequest, options?: Configuration): Promise { + public loginUser(param: UserApiLoginUserRequest , options?: Configuration): Promise { return this.api.loginUser(param.username, param.password, options).toPromise(); } @@ -409,7 +409,7 @@ export class ObjectUserApi { * Logs out current logged in user session * @param param the request object */ - public logoutUser(param: UserApiLogoutUserRequest, options?: Configuration): Promise { + public logoutUser(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise { return this.api.logoutUser( options).toPromise(); } @@ -418,7 +418,7 @@ export class ObjectUserApi { * Updated user * @param param the request object */ - public updateUser(param: UserApiUpdateUserRequest, options?: Configuration): Promise { + public updateUser(param: UserApiUpdateUserRequest , options?: Configuration): Promise { return this.api.updateUser(param.username, param.user, options).toPromise(); } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts index 4207fd5102dc..f040e33cd57c 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' +import { SecurityAuthentication } from '../auth/auth'; import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { ApiResponse } from '../models/ApiResponse'; @@ -26,6 +27,10 @@ export class ObservablePetApi { this.responseProcessor = responseProcessor || new PetApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -236,6 +241,10 @@ export class ObservableStoreApi { this.responseProcessor = responseProcessor || new StoreApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -348,6 +357,10 @@ export class ObservableUserApi { this.responseProcessor = responseProcessor || new UserApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/types/PromiseAPI.ts index ac44ba7a13b2..cb64631a1453 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/types/PromiseAPI.ts @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' +import { SecurityAuthentication } from '../auth/auth'; import { ApiResponse } from '../models/ApiResponse'; import { Category } from '../models/Category'; @@ -22,6 +23,10 @@ export class PromisePetApi { this.api = new ObservablePetApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -121,6 +126,10 @@ export class PromiseStoreApi { this.api = new ObservableStoreApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -178,6 +187,10 @@ export class PromiseUserApi { this.api = new ObservableUserApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * This can only be done by the logged in user. * Create user From d38609e0ceedfd8a33d41fdd0085df7734391544 Mon Sep 17 00:00:00 2001 From: David Gamero Date: Tue, 18 Jan 2022 14:56:34 -0500 Subject: [PATCH 05/21] remove extra space --- .../services/ObjectParamAPI.mustache | 2 +- .../typescript/types/ObjectParamAPI.mustache | 2 +- .../composed-schemas/types/ObjectParamAPI.ts | 6 +-- .../builds/default/types/ObjectParamAPI.ts | 40 +++++++++---------- .../builds/deno/types/ObjectParamAPI.ts | 40 +++++++++---------- .../inversify/services/ObjectParamAPI.ts | 40 +++++++++---------- .../builds/inversify/types/ObjectParamAPI.ts | 40 +++++++++---------- .../builds/jquery/types/ObjectParamAPI.ts | 40 +++++++++---------- .../object_params/types/ObjectParamAPI.ts | 40 +++++++++---------- 9 files changed, 125 insertions(+), 125 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript/services/ObjectParamAPI.mustache b/modules/openapi-generator/src/main/resources/typescript/services/ObjectParamAPI.mustache index 3da87babf6ba..e1e5e6976b0e 100644 --- a/modules/openapi-generator/src/main/resources/typescript/services/ObjectParamAPI.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/services/ObjectParamAPI.mustache @@ -26,7 +26,7 @@ export abstract class AbstractObject{{classname}} { {{/summary}} * @param param the request object */ - public abstract {{nickname}}(param: req.{{classname}}{{operationIdCamelCase}}Request {{^hasRequiredParams}} = {}{{/hasRequiredParams}}, options?: Configuration): {{#useRxJS}}Observable{{/useRxJS}}{{^useRxJS}}Promise{{/useRxJS}}<{{{returnType}}}{{^returnType}}void{{/returnType}}>; + public abstract {{nickname}}(param: req.{{classname}}{{operationIdCamelCase}}Request{{^hasRequiredParams}} = {}{{/hasRequiredParams}}, options?: Configuration): {{#useRxJS}}Observable{{/useRxJS}}{{^useRxJS}}Promise{{/useRxJS}}<{{{returnType}}}{{^returnType}}void{{/returnType}}>; {{/operation}} } diff --git a/modules/openapi-generator/src/main/resources/typescript/types/ObjectParamAPI.mustache b/modules/openapi-generator/src/main/resources/typescript/types/ObjectParamAPI.mustache index b0d24f188c3e..4707e1f44f3a 100644 --- a/modules/openapi-generator/src/main/resources/typescript/types/ObjectParamAPI.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/types/ObjectParamAPI.mustache @@ -47,7 +47,7 @@ export class Object{{classname}} { {{/summary}} * @param param the request object */ - public {{nickname}}(param: {{classname}}{{operationIdCamelCase}}Request {{^hasRequiredParams}}= {}{{/hasRequiredParams}}, options?: Configuration): {{#useRxJS}}Observable{{/useRxJS}}{{^useRxJS}}Promise{{/useRxJS}}<{{{returnType}}}{{^returnType}}void{{/returnType}}> { + public {{nickname}}(param: {{classname}}{{operationIdCamelCase}}Request{{^hasRequiredParams}}= {}{{/hasRequiredParams}}, options?: Configuration): {{#useRxJS}}Observable{{/useRxJS}}{{^useRxJS}}Promise{{/useRxJS}}<{{{returnType}}}{{^returnType}}void{{/returnType}}> { return this.api.{{nickname}}({{#allParams}}param.{{paramName}}, {{/allParams}} options){{^useRxJS}}.toPromise(){{/useRxJS}}; } diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObjectParamAPI.ts index 84ebc7d8c699..368f37fc3ae7 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObjectParamAPI.ts @@ -50,21 +50,21 @@ export class ObjectDefaultApi { /** * @param param the request object */ - public filePost(param: DefaultApiFilePostRequest = {}, options?: Configuration): Promise { + public filePost(param: DefaultApiFilePostRequest= {}, options?: Configuration): Promise { return this.api.filePost(param.inlineObject, options).toPromise(); } /** * @param param the request object */ - public petsFilteredPatch(param: DefaultApiPetsFilteredPatchRequest = {}, options?: Configuration): Promise { + public petsFilteredPatch(param: DefaultApiPetsFilteredPatchRequest= {}, options?: Configuration): Promise { return this.api.petsFilteredPatch(param.petByAgePetByType, options).toPromise(); } /** * @param param the request object */ - public petsPatch(param: DefaultApiPetsPatchRequest = {}, options?: Configuration): Promise { + public petsPatch(param: DefaultApiPetsPatchRequest= {}, options?: Configuration): Promise { return this.api.petsPatch(param.catDog, options).toPromise(); } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/default/types/ObjectParamAPI.ts index 7915c0f83ed4..900ea2735978 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/types/ObjectParamAPI.ts @@ -125,7 +125,7 @@ export class ObjectPetApi { * Add a new pet to the store * @param param the request object */ - public addPet(param: PetApiAddPetRequest , options?: Configuration): Promise { + public addPet(param: PetApiAddPetRequest, options?: Configuration): Promise { return this.api.addPet(param.pet, options).toPromise(); } @@ -133,7 +133,7 @@ export class ObjectPetApi { * Deletes a pet * @param param the request object */ - public deletePet(param: PetApiDeletePetRequest , options?: Configuration): Promise { + public deletePet(param: PetApiDeletePetRequest, options?: Configuration): Promise { return this.api.deletePet(param.petId, param.apiKey, options).toPromise(); } @@ -142,7 +142,7 @@ export class ObjectPetApi { * Finds Pets by status * @param param the request object */ - public findPetsByStatus(param: PetApiFindPetsByStatusRequest , options?: Configuration): Promise> { + public findPetsByStatus(param: PetApiFindPetsByStatusRequest, options?: Configuration): Promise> { return this.api.findPetsByStatus(param.status, options).toPromise(); } @@ -151,7 +151,7 @@ export class ObjectPetApi { * Finds Pets by tags * @param param the request object */ - public findPetsByTags(param: PetApiFindPetsByTagsRequest , options?: Configuration): Promise> { + public findPetsByTags(param: PetApiFindPetsByTagsRequest, options?: Configuration): Promise> { return this.api.findPetsByTags(param.tags, options).toPromise(); } @@ -160,7 +160,7 @@ export class ObjectPetApi { * Find pet by ID * @param param the request object */ - public getPetById(param: PetApiGetPetByIdRequest , options?: Configuration): Promise { + public getPetById(param: PetApiGetPetByIdRequest, options?: Configuration): Promise { return this.api.getPetById(param.petId, options).toPromise(); } @@ -168,7 +168,7 @@ export class ObjectPetApi { * Update an existing pet * @param param the request object */ - public updatePet(param: PetApiUpdatePetRequest , options?: Configuration): Promise { + public updatePet(param: PetApiUpdatePetRequest, options?: Configuration): Promise { return this.api.updatePet(param.pet, options).toPromise(); } @@ -176,7 +176,7 @@ export class ObjectPetApi { * Updates a pet in the store with form data * @param param the request object */ - public updatePetWithForm(param: PetApiUpdatePetWithFormRequest , options?: Configuration): Promise { + public updatePetWithForm(param: PetApiUpdatePetWithFormRequest, options?: Configuration): Promise { return this.api.updatePetWithForm(param.petId, param.name, param.status, options).toPromise(); } @@ -184,7 +184,7 @@ export class ObjectPetApi { * uploads an image * @param param the request object */ - public uploadFile(param: PetApiUploadFileRequest , options?: Configuration): Promise { + public uploadFile(param: PetApiUploadFileRequest, options?: Configuration): Promise { return this.api.uploadFile(param.petId, param.additionalMetadata, param.file, options).toPromise(); } @@ -235,7 +235,7 @@ export class ObjectStoreApi { * Delete purchase order by ID * @param param the request object */ - public deleteOrder(param: StoreApiDeleteOrderRequest , options?: Configuration): Promise { + public deleteOrder(param: StoreApiDeleteOrderRequest, options?: Configuration): Promise { return this.api.deleteOrder(param.orderId, options).toPromise(); } @@ -244,7 +244,7 @@ export class ObjectStoreApi { * Returns pet inventories by status * @param param the request object */ - public getInventory(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }> { + public getInventory(param: StoreApiGetInventoryRequest= {}, options?: Configuration): Promise<{ [key: string]: number; }> { return this.api.getInventory( options).toPromise(); } @@ -253,7 +253,7 @@ export class ObjectStoreApi { * Find purchase order by ID * @param param the request object */ - public getOrderById(param: StoreApiGetOrderByIdRequest , options?: Configuration): Promise { + public getOrderById(param: StoreApiGetOrderByIdRequest, options?: Configuration): Promise { return this.api.getOrderById(param.orderId, options).toPromise(); } @@ -261,7 +261,7 @@ export class ObjectStoreApi { * Place an order for a pet * @param param the request object */ - public placeOrder(param: StoreApiPlaceOrderRequest , options?: Configuration): Promise { + public placeOrder(param: StoreApiPlaceOrderRequest, options?: Configuration): Promise { return this.api.placeOrder(param.order, options).toPromise(); } @@ -360,7 +360,7 @@ export class ObjectUserApi { * Create user * @param param the request object */ - public createUser(param: UserApiCreateUserRequest , options?: Configuration): Promise { + public createUser(param: UserApiCreateUserRequest, options?: Configuration): Promise { return this.api.createUser(param.user, options).toPromise(); } @@ -368,7 +368,7 @@ export class ObjectUserApi { * Creates list of users with given input array * @param param the request object */ - public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest , options?: Configuration): Promise { + public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest, options?: Configuration): Promise { return this.api.createUsersWithArrayInput(param.user, options).toPromise(); } @@ -376,7 +376,7 @@ export class ObjectUserApi { * Creates list of users with given input array * @param param the request object */ - public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest , options?: Configuration): Promise { + public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest, options?: Configuration): Promise { return this.api.createUsersWithListInput(param.user, options).toPromise(); } @@ -385,7 +385,7 @@ export class ObjectUserApi { * Delete user * @param param the request object */ - public deleteUser(param: UserApiDeleteUserRequest , options?: Configuration): Promise { + public deleteUser(param: UserApiDeleteUserRequest, options?: Configuration): Promise { return this.api.deleteUser(param.username, options).toPromise(); } @@ -393,7 +393,7 @@ export class ObjectUserApi { * Get user by user name * @param param the request object */ - public getUserByName(param: UserApiGetUserByNameRequest , options?: Configuration): Promise { + public getUserByName(param: UserApiGetUserByNameRequest, options?: Configuration): Promise { return this.api.getUserByName(param.username, options).toPromise(); } @@ -401,7 +401,7 @@ export class ObjectUserApi { * Logs user into the system * @param param the request object */ - public loginUser(param: UserApiLoginUserRequest , options?: Configuration): Promise { + public loginUser(param: UserApiLoginUserRequest, options?: Configuration): Promise { return this.api.loginUser(param.username, param.password, options).toPromise(); } @@ -409,7 +409,7 @@ export class ObjectUserApi { * Logs out current logged in user session * @param param the request object */ - public logoutUser(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise { + public logoutUser(param: UserApiLogoutUserRequest= {}, options?: Configuration): Promise { return this.api.logoutUser( options).toPromise(); } @@ -418,7 +418,7 @@ export class ObjectUserApi { * Updated user * @param param the request object */ - public updateUser(param: UserApiUpdateUserRequest , options?: Configuration): Promise { + public updateUser(param: UserApiUpdateUserRequest, options?: Configuration): Promise { return this.api.updateUser(param.username, param.user, options).toPromise(); } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/deno/types/ObjectParamAPI.ts index 8b3bf3f0fd4e..1deb138f7101 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/types/ObjectParamAPI.ts @@ -125,7 +125,7 @@ export class ObjectPetApi { * Add a new pet to the store * @param param the request object */ - public addPet(param: PetApiAddPetRequest , options?: Configuration): Promise { + public addPet(param: PetApiAddPetRequest, options?: Configuration): Promise { return this.api.addPet(param.pet, options).toPromise(); } @@ -133,7 +133,7 @@ export class ObjectPetApi { * Deletes a pet * @param param the request object */ - public deletePet(param: PetApiDeletePetRequest , options?: Configuration): Promise { + public deletePet(param: PetApiDeletePetRequest, options?: Configuration): Promise { return this.api.deletePet(param.petId, param.apiKey, options).toPromise(); } @@ -142,7 +142,7 @@ export class ObjectPetApi { * Finds Pets by status * @param param the request object */ - public findPetsByStatus(param: PetApiFindPetsByStatusRequest , options?: Configuration): Promise> { + public findPetsByStatus(param: PetApiFindPetsByStatusRequest, options?: Configuration): Promise> { return this.api.findPetsByStatus(param.status, options).toPromise(); } @@ -151,7 +151,7 @@ export class ObjectPetApi { * Finds Pets by tags * @param param the request object */ - public findPetsByTags(param: PetApiFindPetsByTagsRequest , options?: Configuration): Promise> { + public findPetsByTags(param: PetApiFindPetsByTagsRequest, options?: Configuration): Promise> { return this.api.findPetsByTags(param.tags, options).toPromise(); } @@ -160,7 +160,7 @@ export class ObjectPetApi { * Find pet by ID * @param param the request object */ - public getPetById(param: PetApiGetPetByIdRequest , options?: Configuration): Promise { + public getPetById(param: PetApiGetPetByIdRequest, options?: Configuration): Promise { return this.api.getPetById(param.petId, options).toPromise(); } @@ -168,7 +168,7 @@ export class ObjectPetApi { * Update an existing pet * @param param the request object */ - public updatePet(param: PetApiUpdatePetRequest , options?: Configuration): Promise { + public updatePet(param: PetApiUpdatePetRequest, options?: Configuration): Promise { return this.api.updatePet(param.pet, options).toPromise(); } @@ -176,7 +176,7 @@ export class ObjectPetApi { * Updates a pet in the store with form data * @param param the request object */ - public updatePetWithForm(param: PetApiUpdatePetWithFormRequest , options?: Configuration): Promise { + public updatePetWithForm(param: PetApiUpdatePetWithFormRequest, options?: Configuration): Promise { return this.api.updatePetWithForm(param.petId, param.name, param.status, options).toPromise(); } @@ -184,7 +184,7 @@ export class ObjectPetApi { * uploads an image * @param param the request object */ - public uploadFile(param: PetApiUploadFileRequest , options?: Configuration): Promise { + public uploadFile(param: PetApiUploadFileRequest, options?: Configuration): Promise { return this.api.uploadFile(param.petId, param.additionalMetadata, param.file, options).toPromise(); } @@ -235,7 +235,7 @@ export class ObjectStoreApi { * Delete purchase order by ID * @param param the request object */ - public deleteOrder(param: StoreApiDeleteOrderRequest , options?: Configuration): Promise { + public deleteOrder(param: StoreApiDeleteOrderRequest, options?: Configuration): Promise { return this.api.deleteOrder(param.orderId, options).toPromise(); } @@ -244,7 +244,7 @@ export class ObjectStoreApi { * Returns pet inventories by status * @param param the request object */ - public getInventory(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }> { + public getInventory(param: StoreApiGetInventoryRequest= {}, options?: Configuration): Promise<{ [key: string]: number; }> { return this.api.getInventory( options).toPromise(); } @@ -253,7 +253,7 @@ export class ObjectStoreApi { * Find purchase order by ID * @param param the request object */ - public getOrderById(param: StoreApiGetOrderByIdRequest , options?: Configuration): Promise { + public getOrderById(param: StoreApiGetOrderByIdRequest, options?: Configuration): Promise { return this.api.getOrderById(param.orderId, options).toPromise(); } @@ -261,7 +261,7 @@ export class ObjectStoreApi { * Place an order for a pet * @param param the request object */ - public placeOrder(param: StoreApiPlaceOrderRequest , options?: Configuration): Promise { + public placeOrder(param: StoreApiPlaceOrderRequest, options?: Configuration): Promise { return this.api.placeOrder(param.order, options).toPromise(); } @@ -360,7 +360,7 @@ export class ObjectUserApi { * Create user * @param param the request object */ - public createUser(param: UserApiCreateUserRequest , options?: Configuration): Promise { + public createUser(param: UserApiCreateUserRequest, options?: Configuration): Promise { return this.api.createUser(param.user, options).toPromise(); } @@ -368,7 +368,7 @@ export class ObjectUserApi { * Creates list of users with given input array * @param param the request object */ - public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest , options?: Configuration): Promise { + public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest, options?: Configuration): Promise { return this.api.createUsersWithArrayInput(param.user, options).toPromise(); } @@ -376,7 +376,7 @@ export class ObjectUserApi { * Creates list of users with given input array * @param param the request object */ - public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest , options?: Configuration): Promise { + public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest, options?: Configuration): Promise { return this.api.createUsersWithListInput(param.user, options).toPromise(); } @@ -385,7 +385,7 @@ export class ObjectUserApi { * Delete user * @param param the request object */ - public deleteUser(param: UserApiDeleteUserRequest , options?: Configuration): Promise { + public deleteUser(param: UserApiDeleteUserRequest, options?: Configuration): Promise { return this.api.deleteUser(param.username, options).toPromise(); } @@ -393,7 +393,7 @@ export class ObjectUserApi { * Get user by user name * @param param the request object */ - public getUserByName(param: UserApiGetUserByNameRequest , options?: Configuration): Promise { + public getUserByName(param: UserApiGetUserByNameRequest, options?: Configuration): Promise { return this.api.getUserByName(param.username, options).toPromise(); } @@ -401,7 +401,7 @@ export class ObjectUserApi { * Logs user into the system * @param param the request object */ - public loginUser(param: UserApiLoginUserRequest , options?: Configuration): Promise { + public loginUser(param: UserApiLoginUserRequest, options?: Configuration): Promise { return this.api.loginUser(param.username, param.password, options).toPromise(); } @@ -409,7 +409,7 @@ export class ObjectUserApi { * Logs out current logged in user session * @param param the request object */ - public logoutUser(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise { + public logoutUser(param: UserApiLogoutUserRequest= {}, options?: Configuration): Promise { return this.api.logoutUser( options).toPromise(); } @@ -418,7 +418,7 @@ export class ObjectUserApi { * Updated user * @param param the request object */ - public updateUser(param: UserApiUpdateUserRequest , options?: Configuration): Promise { + public updateUser(param: UserApiUpdateUserRequest, options?: Configuration): Promise { return this.api.updateUser(param.username, param.user, options).toPromise(); } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/services/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/services/ObjectParamAPI.ts index fd229bfc9a50..fa99b4bc9025 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/services/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/services/ObjectParamAPI.ts @@ -15,52 +15,52 @@ export abstract class AbstractObjectPetApi { * Add a new pet to the store * @param param the request object */ - public abstract addPet(param: req.PetApiAddPetRequest , options?: Configuration): Promise; + public abstract addPet(param: req.PetApiAddPetRequest, options?: Configuration): Promise; /** * Deletes a pet * @param param the request object */ - public abstract deletePet(param: req.PetApiDeletePetRequest , options?: Configuration): Promise; + public abstract deletePet(param: req.PetApiDeletePetRequest, options?: Configuration): Promise; /** * Multiple status values can be provided with comma separated strings * Finds Pets by status * @param param the request object */ - public abstract findPetsByStatus(param: req.PetApiFindPetsByStatusRequest , options?: Configuration): Promise>; + public abstract findPetsByStatus(param: req.PetApiFindPetsByStatusRequest, options?: Configuration): Promise>; /** * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * Finds Pets by tags * @param param the request object */ - public abstract findPetsByTags(param: req.PetApiFindPetsByTagsRequest , options?: Configuration): Promise>; + public abstract findPetsByTags(param: req.PetApiFindPetsByTagsRequest, options?: Configuration): Promise>; /** * Returns a single pet * Find pet by ID * @param param the request object */ - public abstract getPetById(param: req.PetApiGetPetByIdRequest , options?: Configuration): Promise; + public abstract getPetById(param: req.PetApiGetPetByIdRequest, options?: Configuration): Promise; /** * Update an existing pet * @param param the request object */ - public abstract updatePet(param: req.PetApiUpdatePetRequest , options?: Configuration): Promise; + public abstract updatePet(param: req.PetApiUpdatePetRequest, options?: Configuration): Promise; /** * Updates a pet in the store with form data * @param param the request object */ - public abstract updatePetWithForm(param: req.PetApiUpdatePetWithFormRequest , options?: Configuration): Promise; + public abstract updatePetWithForm(param: req.PetApiUpdatePetWithFormRequest, options?: Configuration): Promise; /** * uploads an image * @param param the request object */ - public abstract uploadFile(param: req.PetApiUploadFileRequest , options?: Configuration): Promise; + public abstract uploadFile(param: req.PetApiUploadFileRequest, options?: Configuration): Promise; } @@ -71,27 +71,27 @@ export abstract class AbstractObjectStoreApi { * Delete purchase order by ID * @param param the request object */ - public abstract deleteOrder(param: req.StoreApiDeleteOrderRequest , options?: Configuration): Promise; + public abstract deleteOrder(param: req.StoreApiDeleteOrderRequest, options?: Configuration): Promise; /** * Returns a map of status codes to quantities * Returns pet inventories by status * @param param the request object */ - public abstract getInventory(param: req.StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }>; + public abstract getInventory(param: req.StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }>; /** * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * Find purchase order by ID * @param param the request object */ - public abstract getOrderById(param: req.StoreApiGetOrderByIdRequest , options?: Configuration): Promise; + public abstract getOrderById(param: req.StoreApiGetOrderByIdRequest, options?: Configuration): Promise; /** * Place an order for a pet * @param param the request object */ - public abstract placeOrder(param: req.StoreApiPlaceOrderRequest , options?: Configuration): Promise; + public abstract placeOrder(param: req.StoreApiPlaceOrderRequest, options?: Configuration): Promise; } @@ -102,50 +102,50 @@ export abstract class AbstractObjectUserApi { * Create user * @param param the request object */ - public abstract createUser(param: req.UserApiCreateUserRequest , options?: Configuration): Promise; + public abstract createUser(param: req.UserApiCreateUserRequest, options?: Configuration): Promise; /** * Creates list of users with given input array * @param param the request object */ - public abstract createUsersWithArrayInput(param: req.UserApiCreateUsersWithArrayInputRequest , options?: Configuration): Promise; + public abstract createUsersWithArrayInput(param: req.UserApiCreateUsersWithArrayInputRequest, options?: Configuration): Promise; /** * Creates list of users with given input array * @param param the request object */ - public abstract createUsersWithListInput(param: req.UserApiCreateUsersWithListInputRequest , options?: Configuration): Promise; + public abstract createUsersWithListInput(param: req.UserApiCreateUsersWithListInputRequest, options?: Configuration): Promise; /** * This can only be done by the logged in user. * Delete user * @param param the request object */ - public abstract deleteUser(param: req.UserApiDeleteUserRequest , options?: Configuration): Promise; + public abstract deleteUser(param: req.UserApiDeleteUserRequest, options?: Configuration): Promise; /** * Get user by user name * @param param the request object */ - public abstract getUserByName(param: req.UserApiGetUserByNameRequest , options?: Configuration): Promise; + public abstract getUserByName(param: req.UserApiGetUserByNameRequest, options?: Configuration): Promise; /** * Logs user into the system * @param param the request object */ - public abstract loginUser(param: req.UserApiLoginUserRequest , options?: Configuration): Promise; + public abstract loginUser(param: req.UserApiLoginUserRequest, options?: Configuration): Promise; /** * Logs out current logged in user session * @param param the request object */ - public abstract logoutUser(param: req.UserApiLogoutUserRequest = {}, options?: Configuration): Promise; + public abstract logoutUser(param: req.UserApiLogoutUserRequest = {}, options?: Configuration): Promise; /** * This can only be done by the logged in user. * Updated user * @param param the request object */ - public abstract updateUser(param: req.UserApiUpdateUserRequest , options?: Configuration): Promise; + public abstract updateUser(param: req.UserApiUpdateUserRequest, options?: Configuration): Promise; } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObjectParamAPI.ts index 7915c0f83ed4..900ea2735978 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObjectParamAPI.ts @@ -125,7 +125,7 @@ export class ObjectPetApi { * Add a new pet to the store * @param param the request object */ - public addPet(param: PetApiAddPetRequest , options?: Configuration): Promise { + public addPet(param: PetApiAddPetRequest, options?: Configuration): Promise { return this.api.addPet(param.pet, options).toPromise(); } @@ -133,7 +133,7 @@ export class ObjectPetApi { * Deletes a pet * @param param the request object */ - public deletePet(param: PetApiDeletePetRequest , options?: Configuration): Promise { + public deletePet(param: PetApiDeletePetRequest, options?: Configuration): Promise { return this.api.deletePet(param.petId, param.apiKey, options).toPromise(); } @@ -142,7 +142,7 @@ export class ObjectPetApi { * Finds Pets by status * @param param the request object */ - public findPetsByStatus(param: PetApiFindPetsByStatusRequest , options?: Configuration): Promise> { + public findPetsByStatus(param: PetApiFindPetsByStatusRequest, options?: Configuration): Promise> { return this.api.findPetsByStatus(param.status, options).toPromise(); } @@ -151,7 +151,7 @@ export class ObjectPetApi { * Finds Pets by tags * @param param the request object */ - public findPetsByTags(param: PetApiFindPetsByTagsRequest , options?: Configuration): Promise> { + public findPetsByTags(param: PetApiFindPetsByTagsRequest, options?: Configuration): Promise> { return this.api.findPetsByTags(param.tags, options).toPromise(); } @@ -160,7 +160,7 @@ export class ObjectPetApi { * Find pet by ID * @param param the request object */ - public getPetById(param: PetApiGetPetByIdRequest , options?: Configuration): Promise { + public getPetById(param: PetApiGetPetByIdRequest, options?: Configuration): Promise { return this.api.getPetById(param.petId, options).toPromise(); } @@ -168,7 +168,7 @@ export class ObjectPetApi { * Update an existing pet * @param param the request object */ - public updatePet(param: PetApiUpdatePetRequest , options?: Configuration): Promise { + public updatePet(param: PetApiUpdatePetRequest, options?: Configuration): Promise { return this.api.updatePet(param.pet, options).toPromise(); } @@ -176,7 +176,7 @@ export class ObjectPetApi { * Updates a pet in the store with form data * @param param the request object */ - public updatePetWithForm(param: PetApiUpdatePetWithFormRequest , options?: Configuration): Promise { + public updatePetWithForm(param: PetApiUpdatePetWithFormRequest, options?: Configuration): Promise { return this.api.updatePetWithForm(param.petId, param.name, param.status, options).toPromise(); } @@ -184,7 +184,7 @@ export class ObjectPetApi { * uploads an image * @param param the request object */ - public uploadFile(param: PetApiUploadFileRequest , options?: Configuration): Promise { + public uploadFile(param: PetApiUploadFileRequest, options?: Configuration): Promise { return this.api.uploadFile(param.petId, param.additionalMetadata, param.file, options).toPromise(); } @@ -235,7 +235,7 @@ export class ObjectStoreApi { * Delete purchase order by ID * @param param the request object */ - public deleteOrder(param: StoreApiDeleteOrderRequest , options?: Configuration): Promise { + public deleteOrder(param: StoreApiDeleteOrderRequest, options?: Configuration): Promise { return this.api.deleteOrder(param.orderId, options).toPromise(); } @@ -244,7 +244,7 @@ export class ObjectStoreApi { * Returns pet inventories by status * @param param the request object */ - public getInventory(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }> { + public getInventory(param: StoreApiGetInventoryRequest= {}, options?: Configuration): Promise<{ [key: string]: number; }> { return this.api.getInventory( options).toPromise(); } @@ -253,7 +253,7 @@ export class ObjectStoreApi { * Find purchase order by ID * @param param the request object */ - public getOrderById(param: StoreApiGetOrderByIdRequest , options?: Configuration): Promise { + public getOrderById(param: StoreApiGetOrderByIdRequest, options?: Configuration): Promise { return this.api.getOrderById(param.orderId, options).toPromise(); } @@ -261,7 +261,7 @@ export class ObjectStoreApi { * Place an order for a pet * @param param the request object */ - public placeOrder(param: StoreApiPlaceOrderRequest , options?: Configuration): Promise { + public placeOrder(param: StoreApiPlaceOrderRequest, options?: Configuration): Promise { return this.api.placeOrder(param.order, options).toPromise(); } @@ -360,7 +360,7 @@ export class ObjectUserApi { * Create user * @param param the request object */ - public createUser(param: UserApiCreateUserRequest , options?: Configuration): Promise { + public createUser(param: UserApiCreateUserRequest, options?: Configuration): Promise { return this.api.createUser(param.user, options).toPromise(); } @@ -368,7 +368,7 @@ export class ObjectUserApi { * Creates list of users with given input array * @param param the request object */ - public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest , options?: Configuration): Promise { + public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest, options?: Configuration): Promise { return this.api.createUsersWithArrayInput(param.user, options).toPromise(); } @@ -376,7 +376,7 @@ export class ObjectUserApi { * Creates list of users with given input array * @param param the request object */ - public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest , options?: Configuration): Promise { + public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest, options?: Configuration): Promise { return this.api.createUsersWithListInput(param.user, options).toPromise(); } @@ -385,7 +385,7 @@ export class ObjectUserApi { * Delete user * @param param the request object */ - public deleteUser(param: UserApiDeleteUserRequest , options?: Configuration): Promise { + public deleteUser(param: UserApiDeleteUserRequest, options?: Configuration): Promise { return this.api.deleteUser(param.username, options).toPromise(); } @@ -393,7 +393,7 @@ export class ObjectUserApi { * Get user by user name * @param param the request object */ - public getUserByName(param: UserApiGetUserByNameRequest , options?: Configuration): Promise { + public getUserByName(param: UserApiGetUserByNameRequest, options?: Configuration): Promise { return this.api.getUserByName(param.username, options).toPromise(); } @@ -401,7 +401,7 @@ export class ObjectUserApi { * Logs user into the system * @param param the request object */ - public loginUser(param: UserApiLoginUserRequest , options?: Configuration): Promise { + public loginUser(param: UserApiLoginUserRequest, options?: Configuration): Promise { return this.api.loginUser(param.username, param.password, options).toPromise(); } @@ -409,7 +409,7 @@ export class ObjectUserApi { * Logs out current logged in user session * @param param the request object */ - public logoutUser(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise { + public logoutUser(param: UserApiLogoutUserRequest= {}, options?: Configuration): Promise { return this.api.logoutUser( options).toPromise(); } @@ -418,7 +418,7 @@ export class ObjectUserApi { * Updated user * @param param the request object */ - public updateUser(param: UserApiUpdateUserRequest , options?: Configuration): Promise { + public updateUser(param: UserApiUpdateUserRequest, options?: Configuration): Promise { return this.api.updateUser(param.username, param.user, options).toPromise(); } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObjectParamAPI.ts index 7915c0f83ed4..900ea2735978 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObjectParamAPI.ts @@ -125,7 +125,7 @@ export class ObjectPetApi { * Add a new pet to the store * @param param the request object */ - public addPet(param: PetApiAddPetRequest , options?: Configuration): Promise { + public addPet(param: PetApiAddPetRequest, options?: Configuration): Promise { return this.api.addPet(param.pet, options).toPromise(); } @@ -133,7 +133,7 @@ export class ObjectPetApi { * Deletes a pet * @param param the request object */ - public deletePet(param: PetApiDeletePetRequest , options?: Configuration): Promise { + public deletePet(param: PetApiDeletePetRequest, options?: Configuration): Promise { return this.api.deletePet(param.petId, param.apiKey, options).toPromise(); } @@ -142,7 +142,7 @@ export class ObjectPetApi { * Finds Pets by status * @param param the request object */ - public findPetsByStatus(param: PetApiFindPetsByStatusRequest , options?: Configuration): Promise> { + public findPetsByStatus(param: PetApiFindPetsByStatusRequest, options?: Configuration): Promise> { return this.api.findPetsByStatus(param.status, options).toPromise(); } @@ -151,7 +151,7 @@ export class ObjectPetApi { * Finds Pets by tags * @param param the request object */ - public findPetsByTags(param: PetApiFindPetsByTagsRequest , options?: Configuration): Promise> { + public findPetsByTags(param: PetApiFindPetsByTagsRequest, options?: Configuration): Promise> { return this.api.findPetsByTags(param.tags, options).toPromise(); } @@ -160,7 +160,7 @@ export class ObjectPetApi { * Find pet by ID * @param param the request object */ - public getPetById(param: PetApiGetPetByIdRequest , options?: Configuration): Promise { + public getPetById(param: PetApiGetPetByIdRequest, options?: Configuration): Promise { return this.api.getPetById(param.petId, options).toPromise(); } @@ -168,7 +168,7 @@ export class ObjectPetApi { * Update an existing pet * @param param the request object */ - public updatePet(param: PetApiUpdatePetRequest , options?: Configuration): Promise { + public updatePet(param: PetApiUpdatePetRequest, options?: Configuration): Promise { return this.api.updatePet(param.pet, options).toPromise(); } @@ -176,7 +176,7 @@ export class ObjectPetApi { * Updates a pet in the store with form data * @param param the request object */ - public updatePetWithForm(param: PetApiUpdatePetWithFormRequest , options?: Configuration): Promise { + public updatePetWithForm(param: PetApiUpdatePetWithFormRequest, options?: Configuration): Promise { return this.api.updatePetWithForm(param.petId, param.name, param.status, options).toPromise(); } @@ -184,7 +184,7 @@ export class ObjectPetApi { * uploads an image * @param param the request object */ - public uploadFile(param: PetApiUploadFileRequest , options?: Configuration): Promise { + public uploadFile(param: PetApiUploadFileRequest, options?: Configuration): Promise { return this.api.uploadFile(param.petId, param.additionalMetadata, param.file, options).toPromise(); } @@ -235,7 +235,7 @@ export class ObjectStoreApi { * Delete purchase order by ID * @param param the request object */ - public deleteOrder(param: StoreApiDeleteOrderRequest , options?: Configuration): Promise { + public deleteOrder(param: StoreApiDeleteOrderRequest, options?: Configuration): Promise { return this.api.deleteOrder(param.orderId, options).toPromise(); } @@ -244,7 +244,7 @@ export class ObjectStoreApi { * Returns pet inventories by status * @param param the request object */ - public getInventory(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }> { + public getInventory(param: StoreApiGetInventoryRequest= {}, options?: Configuration): Promise<{ [key: string]: number; }> { return this.api.getInventory( options).toPromise(); } @@ -253,7 +253,7 @@ export class ObjectStoreApi { * Find purchase order by ID * @param param the request object */ - public getOrderById(param: StoreApiGetOrderByIdRequest , options?: Configuration): Promise { + public getOrderById(param: StoreApiGetOrderByIdRequest, options?: Configuration): Promise { return this.api.getOrderById(param.orderId, options).toPromise(); } @@ -261,7 +261,7 @@ export class ObjectStoreApi { * Place an order for a pet * @param param the request object */ - public placeOrder(param: StoreApiPlaceOrderRequest , options?: Configuration): Promise { + public placeOrder(param: StoreApiPlaceOrderRequest, options?: Configuration): Promise { return this.api.placeOrder(param.order, options).toPromise(); } @@ -360,7 +360,7 @@ export class ObjectUserApi { * Create user * @param param the request object */ - public createUser(param: UserApiCreateUserRequest , options?: Configuration): Promise { + public createUser(param: UserApiCreateUserRequest, options?: Configuration): Promise { return this.api.createUser(param.user, options).toPromise(); } @@ -368,7 +368,7 @@ export class ObjectUserApi { * Creates list of users with given input array * @param param the request object */ - public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest , options?: Configuration): Promise { + public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest, options?: Configuration): Promise { return this.api.createUsersWithArrayInput(param.user, options).toPromise(); } @@ -376,7 +376,7 @@ export class ObjectUserApi { * Creates list of users with given input array * @param param the request object */ - public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest , options?: Configuration): Promise { + public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest, options?: Configuration): Promise { return this.api.createUsersWithListInput(param.user, options).toPromise(); } @@ -385,7 +385,7 @@ export class ObjectUserApi { * Delete user * @param param the request object */ - public deleteUser(param: UserApiDeleteUserRequest , options?: Configuration): Promise { + public deleteUser(param: UserApiDeleteUserRequest, options?: Configuration): Promise { return this.api.deleteUser(param.username, options).toPromise(); } @@ -393,7 +393,7 @@ export class ObjectUserApi { * Get user by user name * @param param the request object */ - public getUserByName(param: UserApiGetUserByNameRequest , options?: Configuration): Promise { + public getUserByName(param: UserApiGetUserByNameRequest, options?: Configuration): Promise { return this.api.getUserByName(param.username, options).toPromise(); } @@ -401,7 +401,7 @@ export class ObjectUserApi { * Logs user into the system * @param param the request object */ - public loginUser(param: UserApiLoginUserRequest , options?: Configuration): Promise { + public loginUser(param: UserApiLoginUserRequest, options?: Configuration): Promise { return this.api.loginUser(param.username, param.password, options).toPromise(); } @@ -409,7 +409,7 @@ export class ObjectUserApi { * Logs out current logged in user session * @param param the request object */ - public logoutUser(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise { + public logoutUser(param: UserApiLogoutUserRequest= {}, options?: Configuration): Promise { return this.api.logoutUser( options).toPromise(); } @@ -418,7 +418,7 @@ export class ObjectUserApi { * Updated user * @param param the request object */ - public updateUser(param: UserApiUpdateUserRequest , options?: Configuration): Promise { + public updateUser(param: UserApiUpdateUserRequest, options?: Configuration): Promise { return this.api.updateUser(param.username, param.user, options).toPromise(); } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObjectParamAPI.ts index 7915c0f83ed4..900ea2735978 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObjectParamAPI.ts @@ -125,7 +125,7 @@ export class ObjectPetApi { * Add a new pet to the store * @param param the request object */ - public addPet(param: PetApiAddPetRequest , options?: Configuration): Promise { + public addPet(param: PetApiAddPetRequest, options?: Configuration): Promise { return this.api.addPet(param.pet, options).toPromise(); } @@ -133,7 +133,7 @@ export class ObjectPetApi { * Deletes a pet * @param param the request object */ - public deletePet(param: PetApiDeletePetRequest , options?: Configuration): Promise { + public deletePet(param: PetApiDeletePetRequest, options?: Configuration): Promise { return this.api.deletePet(param.petId, param.apiKey, options).toPromise(); } @@ -142,7 +142,7 @@ export class ObjectPetApi { * Finds Pets by status * @param param the request object */ - public findPetsByStatus(param: PetApiFindPetsByStatusRequest , options?: Configuration): Promise> { + public findPetsByStatus(param: PetApiFindPetsByStatusRequest, options?: Configuration): Promise> { return this.api.findPetsByStatus(param.status, options).toPromise(); } @@ -151,7 +151,7 @@ export class ObjectPetApi { * Finds Pets by tags * @param param the request object */ - public findPetsByTags(param: PetApiFindPetsByTagsRequest , options?: Configuration): Promise> { + public findPetsByTags(param: PetApiFindPetsByTagsRequest, options?: Configuration): Promise> { return this.api.findPetsByTags(param.tags, options).toPromise(); } @@ -160,7 +160,7 @@ export class ObjectPetApi { * Find pet by ID * @param param the request object */ - public getPetById(param: PetApiGetPetByIdRequest , options?: Configuration): Promise { + public getPetById(param: PetApiGetPetByIdRequest, options?: Configuration): Promise { return this.api.getPetById(param.petId, options).toPromise(); } @@ -168,7 +168,7 @@ export class ObjectPetApi { * Update an existing pet * @param param the request object */ - public updatePet(param: PetApiUpdatePetRequest , options?: Configuration): Promise { + public updatePet(param: PetApiUpdatePetRequest, options?: Configuration): Promise { return this.api.updatePet(param.pet, options).toPromise(); } @@ -176,7 +176,7 @@ export class ObjectPetApi { * Updates a pet in the store with form data * @param param the request object */ - public updatePetWithForm(param: PetApiUpdatePetWithFormRequest , options?: Configuration): Promise { + public updatePetWithForm(param: PetApiUpdatePetWithFormRequest, options?: Configuration): Promise { return this.api.updatePetWithForm(param.petId, param.name, param.status, options).toPromise(); } @@ -184,7 +184,7 @@ export class ObjectPetApi { * uploads an image * @param param the request object */ - public uploadFile(param: PetApiUploadFileRequest , options?: Configuration): Promise { + public uploadFile(param: PetApiUploadFileRequest, options?: Configuration): Promise { return this.api.uploadFile(param.petId, param.additionalMetadata, param.file, options).toPromise(); } @@ -235,7 +235,7 @@ export class ObjectStoreApi { * Delete purchase order by ID * @param param the request object */ - public deleteOrder(param: StoreApiDeleteOrderRequest , options?: Configuration): Promise { + public deleteOrder(param: StoreApiDeleteOrderRequest, options?: Configuration): Promise { return this.api.deleteOrder(param.orderId, options).toPromise(); } @@ -244,7 +244,7 @@ export class ObjectStoreApi { * Returns pet inventories by status * @param param the request object */ - public getInventory(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }> { + public getInventory(param: StoreApiGetInventoryRequest= {}, options?: Configuration): Promise<{ [key: string]: number; }> { return this.api.getInventory( options).toPromise(); } @@ -253,7 +253,7 @@ export class ObjectStoreApi { * Find purchase order by ID * @param param the request object */ - public getOrderById(param: StoreApiGetOrderByIdRequest , options?: Configuration): Promise { + public getOrderById(param: StoreApiGetOrderByIdRequest, options?: Configuration): Promise { return this.api.getOrderById(param.orderId, options).toPromise(); } @@ -261,7 +261,7 @@ export class ObjectStoreApi { * Place an order for a pet * @param param the request object */ - public placeOrder(param: StoreApiPlaceOrderRequest , options?: Configuration): Promise { + public placeOrder(param: StoreApiPlaceOrderRequest, options?: Configuration): Promise { return this.api.placeOrder(param.order, options).toPromise(); } @@ -360,7 +360,7 @@ export class ObjectUserApi { * Create user * @param param the request object */ - public createUser(param: UserApiCreateUserRequest , options?: Configuration): Promise { + public createUser(param: UserApiCreateUserRequest, options?: Configuration): Promise { return this.api.createUser(param.user, options).toPromise(); } @@ -368,7 +368,7 @@ export class ObjectUserApi { * Creates list of users with given input array * @param param the request object */ - public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest , options?: Configuration): Promise { + public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest, options?: Configuration): Promise { return this.api.createUsersWithArrayInput(param.user, options).toPromise(); } @@ -376,7 +376,7 @@ export class ObjectUserApi { * Creates list of users with given input array * @param param the request object */ - public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest , options?: Configuration): Promise { + public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest, options?: Configuration): Promise { return this.api.createUsersWithListInput(param.user, options).toPromise(); } @@ -385,7 +385,7 @@ export class ObjectUserApi { * Delete user * @param param the request object */ - public deleteUser(param: UserApiDeleteUserRequest , options?: Configuration): Promise { + public deleteUser(param: UserApiDeleteUserRequest, options?: Configuration): Promise { return this.api.deleteUser(param.username, options).toPromise(); } @@ -393,7 +393,7 @@ export class ObjectUserApi { * Get user by user name * @param param the request object */ - public getUserByName(param: UserApiGetUserByNameRequest , options?: Configuration): Promise { + public getUserByName(param: UserApiGetUserByNameRequest, options?: Configuration): Promise { return this.api.getUserByName(param.username, options).toPromise(); } @@ -401,7 +401,7 @@ export class ObjectUserApi { * Logs user into the system * @param param the request object */ - public loginUser(param: UserApiLoginUserRequest , options?: Configuration): Promise { + public loginUser(param: UserApiLoginUserRequest, options?: Configuration): Promise { return this.api.loginUser(param.username, param.password, options).toPromise(); } @@ -409,7 +409,7 @@ export class ObjectUserApi { * Logs out current logged in user session * @param param the request object */ - public logoutUser(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise { + public logoutUser(param: UserApiLogoutUserRequest= {}, options?: Configuration): Promise { return this.api.logoutUser( options).toPromise(); } @@ -418,7 +418,7 @@ export class ObjectUserApi { * Updated user * @param param the request object */ - public updateUser(param: UserApiUpdateUserRequest , options?: Configuration): Promise { + public updateUser(param: UserApiUpdateUserRequest, options?: Configuration): Promise { return this.api.updateUser(param.username, param.user, options).toPromise(); } From 7ceb1d5450b584671904bac42dfe3e5440ad0efc Mon Sep 17 00:00:00 2001 From: David Gamero Date: Tue, 18 Jan 2022 15:39:29 -0500 Subject: [PATCH 06/21] re-add space before default empty --- .../main/resources/typescript/types/ObjectParamAPI.mustache | 2 +- .../builds/composed-schemas/types/ObjectParamAPI.ts | 6 +++--- .../typescript/builds/default/types/ObjectParamAPI.ts | 4 ++-- .../petstore/typescript/builds/deno/types/ObjectParamAPI.ts | 4 ++-- .../typescript/builds/inversify/types/ObjectParamAPI.ts | 4 ++-- .../typescript/builds/jquery/types/ObjectParamAPI.ts | 4 ++-- .../typescript/builds/object_params/types/ObjectParamAPI.ts | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript/types/ObjectParamAPI.mustache b/modules/openapi-generator/src/main/resources/typescript/types/ObjectParamAPI.mustache index 4707e1f44f3a..9a6390337188 100644 --- a/modules/openapi-generator/src/main/resources/typescript/types/ObjectParamAPI.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/types/ObjectParamAPI.mustache @@ -47,7 +47,7 @@ export class Object{{classname}} { {{/summary}} * @param param the request object */ - public {{nickname}}(param: {{classname}}{{operationIdCamelCase}}Request{{^hasRequiredParams}}= {}{{/hasRequiredParams}}, options?: Configuration): {{#useRxJS}}Observable{{/useRxJS}}{{^useRxJS}}Promise{{/useRxJS}}<{{{returnType}}}{{^returnType}}void{{/returnType}}> { + public {{nickname}}(param: {{classname}}{{operationIdCamelCase}}Request{{^hasRequiredParams}} = {}{{/hasRequiredParams}}, options?: Configuration): {{#useRxJS}}Observable{{/useRxJS}}{{^useRxJS}}Promise{{/useRxJS}}<{{{returnType}}}{{^returnType}}void{{/returnType}}> { return this.api.{{nickname}}({{#allParams}}param.{{paramName}}, {{/allParams}} options){{^useRxJS}}.toPromise(){{/useRxJS}}; } diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObjectParamAPI.ts index 368f37fc3ae7..84ebc7d8c699 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObjectParamAPI.ts @@ -50,21 +50,21 @@ export class ObjectDefaultApi { /** * @param param the request object */ - public filePost(param: DefaultApiFilePostRequest= {}, options?: Configuration): Promise { + public filePost(param: DefaultApiFilePostRequest = {}, options?: Configuration): Promise { return this.api.filePost(param.inlineObject, options).toPromise(); } /** * @param param the request object */ - public petsFilteredPatch(param: DefaultApiPetsFilteredPatchRequest= {}, options?: Configuration): Promise { + public petsFilteredPatch(param: DefaultApiPetsFilteredPatchRequest = {}, options?: Configuration): Promise { return this.api.petsFilteredPatch(param.petByAgePetByType, options).toPromise(); } /** * @param param the request object */ - public petsPatch(param: DefaultApiPetsPatchRequest= {}, options?: Configuration): Promise { + public petsPatch(param: DefaultApiPetsPatchRequest = {}, options?: Configuration): Promise { return this.api.petsPatch(param.catDog, options).toPromise(); } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/default/types/ObjectParamAPI.ts index 900ea2735978..a590e3ca4923 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/types/ObjectParamAPI.ts @@ -244,7 +244,7 @@ export class ObjectStoreApi { * Returns pet inventories by status * @param param the request object */ - public getInventory(param: StoreApiGetInventoryRequest= {}, options?: Configuration): Promise<{ [key: string]: number; }> { + public getInventory(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }> { return this.api.getInventory( options).toPromise(); } @@ -409,7 +409,7 @@ export class ObjectUserApi { * Logs out current logged in user session * @param param the request object */ - public logoutUser(param: UserApiLogoutUserRequest= {}, options?: Configuration): Promise { + public logoutUser(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise { return this.api.logoutUser( options).toPromise(); } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/deno/types/ObjectParamAPI.ts index 1deb138f7101..a6988e3ef191 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/types/ObjectParamAPI.ts @@ -244,7 +244,7 @@ export class ObjectStoreApi { * Returns pet inventories by status * @param param the request object */ - public getInventory(param: StoreApiGetInventoryRequest= {}, options?: Configuration): Promise<{ [key: string]: number; }> { + public getInventory(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }> { return this.api.getInventory( options).toPromise(); } @@ -409,7 +409,7 @@ export class ObjectUserApi { * Logs out current logged in user session * @param param the request object */ - public logoutUser(param: UserApiLogoutUserRequest= {}, options?: Configuration): Promise { + public logoutUser(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise { return this.api.logoutUser( options).toPromise(); } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObjectParamAPI.ts index 900ea2735978..a590e3ca4923 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObjectParamAPI.ts @@ -244,7 +244,7 @@ export class ObjectStoreApi { * Returns pet inventories by status * @param param the request object */ - public getInventory(param: StoreApiGetInventoryRequest= {}, options?: Configuration): Promise<{ [key: string]: number; }> { + public getInventory(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }> { return this.api.getInventory( options).toPromise(); } @@ -409,7 +409,7 @@ export class ObjectUserApi { * Logs out current logged in user session * @param param the request object */ - public logoutUser(param: UserApiLogoutUserRequest= {}, options?: Configuration): Promise { + public logoutUser(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise { return this.api.logoutUser( options).toPromise(); } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObjectParamAPI.ts index 900ea2735978..a590e3ca4923 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObjectParamAPI.ts @@ -244,7 +244,7 @@ export class ObjectStoreApi { * Returns pet inventories by status * @param param the request object */ - public getInventory(param: StoreApiGetInventoryRequest= {}, options?: Configuration): Promise<{ [key: string]: number; }> { + public getInventory(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }> { return this.api.getInventory( options).toPromise(); } @@ -409,7 +409,7 @@ export class ObjectUserApi { * Logs out current logged in user session * @param param the request object */ - public logoutUser(param: UserApiLogoutUserRequest= {}, options?: Configuration): Promise { + public logoutUser(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise { return this.api.logoutUser( options).toPromise(); } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObjectParamAPI.ts index 900ea2735978..a590e3ca4923 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObjectParamAPI.ts @@ -244,7 +244,7 @@ export class ObjectStoreApi { * Returns pet inventories by status * @param param the request object */ - public getInventory(param: StoreApiGetInventoryRequest= {}, options?: Configuration): Promise<{ [key: string]: number; }> { + public getInventory(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }> { return this.api.getInventory( options).toPromise(); } @@ -409,7 +409,7 @@ export class ObjectUserApi { * Logs out current logged in user session * @param param the request object */ - public logoutUser(param: UserApiLogoutUserRequest= {}, options?: Configuration): Promise { + public logoutUser(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise { return this.api.logoutUser( options).toPromise(); } From 0c2b0ff25617f2554a5a07f85ff3a3dd9d19bcc1 Mon Sep 17 00:00:00 2001 From: David Gamero Date: Wed, 19 Jan 2022 17:02:39 -0500 Subject: [PATCH 07/21] switch to default authentication method support in config --- .../src/main/resources/typescript/api/api.mustache | 13 ++++++------- .../main/resources/typescript/auth/auth.mustache | 3 +++ .../typescript/types/ObservableAPI.mustache | 3 --- .../resources/typescript/types/PromiseAPI.mustache | 4 ---- 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache index 13bff19cdc60..8e9b42378f6f 100644 --- a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache @@ -29,12 +29,7 @@ import { {{classname}} } from '..{{filename}}{{extensionForDeno}}'; @injectable() {{/useInversify}} export class {{classname}}RequestFactory extends BaseAPIRequestFactory { - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - + {{#operation}} /** {{#notes}} @@ -161,11 +156,15 @@ export class {{classname}}RequestFactory extends BaseAPIRequestFactory { {{/hasAuthMethods}} {{#authMethods}} // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["{{name}}"] + authMethod = _config.authMethods["{{name}}"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } {{/authMethods}} + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } 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 bfb303e741ed..557ff46e22a5 100644 --- a/modules/openapi-generator/src/main/resources/typescript/auth/auth.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/auth/auth.mustache @@ -107,6 +107,7 @@ export class {{#lambda.pascalcase}}{{name}}{{/lambda.pascalcase}}Authentication {{/authMethods}} export type AuthMethods = { + "default"?: SecurityAuthentication, {{#authMethods}} "{{name}}"?: SecurityAuthentication{{^-last}},{{/-last}} {{/authMethods}} @@ -126,6 +127,7 @@ export type HttpBearerConfiguration = { tokenProvider: TokenProvider }; export type OAuth2Configuration = { accessToken: string }; export type AuthMethodsConfiguration = { + "default"?: SecurityAuthentication, {{#authMethods}} "{{name}}"?: {{#isApiKey}}ApiKeyConfiguration{{/isApiKey}}{{#isBasicBasic}}HttpBasicConfiguration{{/isBasicBasic}}{{#isBasicBearer}}HttpBearerConfiguration{{/isBasicBearer}}{{#isOAuth}}OAuth2Configuration{{/isOAuth}}{{^-last}},{{/-last}} {{/authMethods}} @@ -141,6 +143,7 @@ export function configureAuthMethods(config: AuthMethodsConfiguration | undefine if (!config) { return authMethods; } + authMethods["default"] = config["default"] {{#authMethods}} if (config["{{name}}"]) { diff --git a/modules/openapi-generator/src/main/resources/typescript/types/ObservableAPI.mustache b/modules/openapi-generator/src/main/resources/typescript/types/ObservableAPI.mustache index 7a1734fcd65b..d00a70455e52 100644 --- a/modules/openapi-generator/src/main/resources/typescript/types/ObservableAPI.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/types/ObservableAPI.mustache @@ -51,9 +51,6 @@ export class Observable{{classname}} { this.responseProcessor = responseProcessor || new {{classname}}ResponseProcessor(); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } {{#operation}} /** diff --git a/modules/openapi-generator/src/main/resources/typescript/types/PromiseAPI.mustache b/modules/openapi-generator/src/main/resources/typescript/types/PromiseAPI.mustache index ca508318392a..2522b2e99c90 100644 --- a/modules/openapi-generator/src/main/resources/typescript/types/PromiseAPI.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/types/PromiseAPI.mustache @@ -41,10 +41,6 @@ export class Promise{{classname}} { this.api = new Observable{{classname}}(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - {{#operation}} /** {{#notes}} From e8f89df5c3b2e47ce7d0bc45109fd1ad7ba5e008 Mon Sep 17 00:00:00 2001 From: David Gamero Date: Wed, 19 Jan 2022 17:05:00 -0500 Subject: [PATCH 08/21] generated samples --- .../composed-schemas/apis/DefaultApi.ts | 19 +++++-- .../builds/composed-schemas/auth/auth.ts | 3 + .../composed-schemas/types/ObservableAPI.ts | 3 - .../composed-schemas/types/PromiseAPI.ts | 4 -- .../typescript/builds/default/apis/PetApi.ts | 55 ++++++++++++++----- .../builds/default/apis/StoreApi.ts | 25 ++++++--- .../typescript/builds/default/apis/UserApi.ts | 51 +++++++++++++---- .../typescript/builds/default/auth/auth.ts | 3 + .../builds/default/types/ObservableAPI.ts | 9 --- .../builds/default/types/PromiseAPI.ts | 12 ---- .../typescript/builds/deno/apis/PetApi.ts | 55 ++++++++++++++----- .../typescript/builds/deno/apis/StoreApi.ts | 25 ++++++--- .../typescript/builds/deno/apis/UserApi.ts | 51 +++++++++++++---- .../typescript/builds/deno/auth/auth.ts | 3 + .../builds/deno/types/ObservableAPI.ts | 9 --- .../builds/deno/types/PromiseAPI.ts | 12 ---- .../builds/inversify/apis/PetApi.ts | 55 ++++++++++++++----- .../builds/inversify/apis/StoreApi.ts | 25 ++++++--- .../builds/inversify/apis/UserApi.ts | 51 +++++++++++++---- .../typescript/builds/inversify/auth/auth.ts | 3 + .../builds/inversify/types/ObservableAPI.ts | 9 --- .../builds/inversify/types/PromiseAPI.ts | 12 ---- .../typescript/builds/jquery/apis/PetApi.ts | 55 ++++++++++++++----- .../typescript/builds/jquery/apis/StoreApi.ts | 25 ++++++--- .../typescript/builds/jquery/apis/UserApi.ts | 51 +++++++++++++---- .../typescript/builds/jquery/auth/auth.ts | 3 + .../builds/jquery/types/ObservableAPI.ts | 9 --- .../builds/jquery/types/PromiseAPI.ts | 12 ---- .../builds/object_params/apis/PetApi.ts | 55 ++++++++++++++----- .../builds/object_params/apis/StoreApi.ts | 25 ++++++--- .../builds/object_params/apis/UserApi.ts | 51 +++++++++++++---- .../builds/object_params/auth/auth.ts | 3 + .../object_params/types/ObservableAPI.ts | 9 --- .../builds/object_params/types/PromiseAPI.ts | 12 ---- 34 files changed, 521 insertions(+), 283 deletions(-) diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts index 3c28b9d89f55..e9171329f1d1 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts @@ -18,12 +18,7 @@ import { PetByType } from '../models/PetByType'; * no description */ export class DefaultApiRequestFactory extends BaseAPIRequestFactory { - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - + /** * @param inlineObject */ @@ -50,6 +45,10 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -80,6 +79,10 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -110,6 +113,10 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/auth/auth.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/auth/auth.ts index fa859aaa0981..49340932e11b 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/auth/auth.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/auth/auth.ts @@ -24,6 +24,7 @@ export interface TokenProvider { export type AuthMethods = { + "default"?: SecurityAuthentication, } export type ApiKeyConfiguration = string; @@ -32,6 +33,7 @@ export type HttpBearerConfiguration = { tokenProvider: TokenProvider }; export type OAuth2Configuration = { accessToken: string }; export type AuthMethodsConfiguration = { + "default"?: SecurityAuthentication, } /** @@ -44,6 +46,7 @@ export function configureAuthMethods(config: AuthMethodsConfiguration | undefine if (!config) { return authMethods; } + authMethods["default"] = config["default"] return authMethods; } \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts index 2c3eac8e91d7..bc38269e6ae5 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts @@ -28,9 +28,6 @@ export class ObservableDefaultApi { this.responseProcessor = responseProcessor || new DefaultApiResponseProcessor(); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } /** * @param inlineObject diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/PromiseAPI.ts index efb81ea6639d..935497cd2818 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/PromiseAPI.ts @@ -24,10 +24,6 @@ export class PromiseDefaultApi { this.api = new ObservableDefaultApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * @param inlineObject */ diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts index 512d4b0abf70..dc3925ae5d17 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts @@ -17,12 +17,7 @@ import { Pet } from '../models/Pet'; * no description */ export class PetApiRequestFactory extends BaseAPIRequestFactory { - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - + /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -59,10 +54,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -96,10 +95,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -133,10 +136,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -170,10 +177,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -203,10 +214,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -247,10 +262,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -312,10 +331,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -379,10 +402,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts index 17ab0194847b..9a8dfd805172 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts @@ -16,12 +16,7 @@ import { Order } from '../models/Order'; * no description */ export class StoreApiRequestFactory extends BaseAPIRequestFactory { - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - + /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -45,6 +40,10 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -66,10 +65,14 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -97,6 +100,10 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -133,6 +140,10 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts index 2fb5b8966977..74a564f36140 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts @@ -16,12 +16,7 @@ import { User } from '../models/User'; * no description */ export class UserApiRequestFactory extends BaseAPIRequestFactory { - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - + /** * This can only be done by the logged in user. * Create user @@ -57,10 +52,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -99,10 +98,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -141,10 +144,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -174,10 +181,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -204,6 +215,10 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -246,6 +261,10 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -266,10 +285,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -317,10 +340,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } 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 1f1d1ecac678..a67ed0e90ccb 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/auth/auth.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/auth/auth.ts @@ -66,6 +66,7 @@ export class PetstoreAuthAuthentication implements SecurityAuthentication { export type AuthMethods = { + "default"?: SecurityAuthentication, "api_key"?: SecurityAuthentication, "petstore_auth"?: SecurityAuthentication } @@ -76,6 +77,7 @@ export type HttpBearerConfiguration = { tokenProvider: TokenProvider }; export type OAuth2Configuration = { accessToken: string }; export type AuthMethodsConfiguration = { + "default"?: SecurityAuthentication, "api_key"?: ApiKeyConfiguration, "petstore_auth"?: OAuth2Configuration } @@ -90,6 +92,7 @@ export function configureAuthMethods(config: AuthMethodsConfiguration | undefine if (!config) { return authMethods; } + authMethods["default"] = config["default"] if (config["api_key"]) { authMethods["api_key"] = new ApiKeyAuthentication( diff --git a/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts index f040e33cd57c..42a05d7adc5d 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts @@ -27,9 +27,6 @@ export class ObservablePetApi { this.responseProcessor = responseProcessor || new PetApiResponseProcessor(); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } /** * Add a new pet to the store @@ -241,9 +238,6 @@ export class ObservableStoreApi { this.responseProcessor = responseProcessor || new StoreApiResponseProcessor(); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -357,9 +351,6 @@ export class ObservableUserApi { this.responseProcessor = responseProcessor || new UserApiResponseProcessor(); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } /** * This can only be done by the logged in user. diff --git a/samples/openapi3/client/petstore/typescript/builds/default/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/default/types/PromiseAPI.ts index cb64631a1453..834ec07bc518 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/types/PromiseAPI.ts @@ -23,10 +23,6 @@ export class PromisePetApi { this.api = new ObservablePetApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -126,10 +122,6 @@ export class PromiseStoreApi { this.api = new ObservableStoreApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -187,10 +179,6 @@ export class PromiseUserApi { this.api = new ObservableUserApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts index f03905576e51..8676e0d1ee22 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts @@ -15,12 +15,7 @@ import { Pet } from '../models/Pet.ts'; * no description */ export class PetApiRequestFactory extends BaseAPIRequestFactory { - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - + /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -57,10 +52,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -94,10 +93,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -131,10 +134,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -168,10 +175,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -201,10 +212,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -245,10 +260,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -310,10 +329,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -377,10 +400,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts index d8bbd379b038..2376db0b7396 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts @@ -14,12 +14,7 @@ import { Order } from '../models/Order.ts'; * no description */ export class StoreApiRequestFactory extends BaseAPIRequestFactory { - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - + /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -43,6 +38,10 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -64,10 +63,14 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -95,6 +98,10 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -131,6 +138,10 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts index d9c13ccad1b6..b7214dd2a65c 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts @@ -14,12 +14,7 @@ import { User } from '../models/User.ts'; * no description */ export class UserApiRequestFactory extends BaseAPIRequestFactory { - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - + /** * This can only be done by the logged in user. * Create user @@ -55,10 +50,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -97,10 +96,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -139,10 +142,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -172,10 +179,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -202,6 +213,10 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -244,6 +259,10 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -264,10 +283,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -315,10 +338,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/auth/auth.ts b/samples/openapi3/client/petstore/typescript/builds/deno/auth/auth.ts index e7609dabbece..85086dde5fae 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/auth/auth.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/auth/auth.ts @@ -64,6 +64,7 @@ export class PetstoreAuthAuthentication implements SecurityAuthentication { export type AuthMethods = { + "default"?: SecurityAuthentication, "api_key"?: SecurityAuthentication, "petstore_auth"?: SecurityAuthentication } @@ -74,6 +75,7 @@ export type HttpBearerConfiguration = { tokenProvider: TokenProvider }; export type OAuth2Configuration = { accessToken: string }; export type AuthMethodsConfiguration = { + "default"?: SecurityAuthentication, "api_key"?: ApiKeyConfiguration, "petstore_auth"?: OAuth2Configuration } @@ -88,6 +90,7 @@ export function configureAuthMethods(config: AuthMethodsConfiguration | undefine if (!config) { return authMethods; } + authMethods["default"] = config["default"] if (config["api_key"]) { authMethods["api_key"] = new ApiKeyAuthentication( diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts index 41b30a01b3be..8d9433a93257 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts @@ -27,9 +27,6 @@ export class ObservablePetApi { this.responseProcessor = responseProcessor || new PetApiResponseProcessor(); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } /** * Add a new pet to the store @@ -241,9 +238,6 @@ export class ObservableStoreApi { this.responseProcessor = responseProcessor || new StoreApiResponseProcessor(); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -357,9 +351,6 @@ export class ObservableUserApi { this.responseProcessor = responseProcessor || new UserApiResponseProcessor(); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } /** * This can only be done by the logged in user. diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/deno/types/PromiseAPI.ts index b5c8a2533030..1d89f5c86ba2 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/types/PromiseAPI.ts @@ -23,10 +23,6 @@ export class PromisePetApi { this.api = new ObservablePetApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -126,10 +122,6 @@ export class PromiseStoreApi { this.api = new ObservableStoreApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -187,10 +179,6 @@ export class PromiseUserApi { this.api = new ObservableUserApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts index 2a4f90ba9759..7c0d3c4b618b 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts @@ -19,12 +19,7 @@ import { Pet } from '../models/Pet'; */ @injectable() export class PetApiRequestFactory extends BaseAPIRequestFactory { - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - + /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -61,10 +56,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -98,10 +97,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -135,10 +138,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -172,10 +179,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -205,10 +216,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -249,10 +264,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -314,10 +333,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -381,10 +404,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts index 7a33942e455a..b51cb69e5350 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts @@ -18,12 +18,7 @@ import { Order } from '../models/Order'; */ @injectable() export class StoreApiRequestFactory extends BaseAPIRequestFactory { - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - + /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -47,6 +42,10 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -68,10 +67,14 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -99,6 +102,10 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -135,6 +142,10 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts index 2d41919cb265..bf874919f8cc 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts @@ -18,12 +18,7 @@ import { User } from '../models/User'; */ @injectable() export class UserApiRequestFactory extends BaseAPIRequestFactory { - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - + /** * This can only be done by the logged in user. * Create user @@ -59,10 +54,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -101,10 +100,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -143,10 +146,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -176,10 +183,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -206,6 +217,10 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -248,6 +263,10 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -268,10 +287,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -319,10 +342,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/auth/auth.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/auth/auth.ts index f6ffebc4d7ee..6356b584bfc1 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/auth/auth.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/auth/auth.ts @@ -74,6 +74,7 @@ export class PetstoreAuthAuthentication implements SecurityAuthentication { export type AuthMethods = { + "default"?: SecurityAuthentication, "api_key"?: SecurityAuthentication, "petstore_auth"?: SecurityAuthentication } @@ -89,6 +90,7 @@ export type HttpBearerConfiguration = { tokenProvider: TokenProvider }; export type OAuth2Configuration = { accessToken: string }; export type AuthMethodsConfiguration = { + "default"?: SecurityAuthentication, "api_key"?: ApiKeyConfiguration, "petstore_auth"?: OAuth2Configuration } @@ -103,6 +105,7 @@ export function configureAuthMethods(config: AuthMethodsConfiguration | undefine if (!config) { return authMethods; } + authMethods["default"] = config["default"] if (config["api_key"]) { authMethods["api_key"] = new ApiKeyAuthentication( diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts index c224e837eb0f..c0c663b80daf 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts @@ -32,9 +32,6 @@ export class ObservablePetApi { this.responseProcessor = responseProcessor || new PetApiResponseProcessor(); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } /** * Add a new pet to the store @@ -249,9 +246,6 @@ export class ObservableStoreApi { this.responseProcessor = responseProcessor || new StoreApiResponseProcessor(); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -368,9 +362,6 @@ export class ObservableUserApi { this.responseProcessor = responseProcessor || new UserApiResponseProcessor(); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } /** * This can only be done by the logged in user. diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/types/PromiseAPI.ts index 69f549c27d0f..9d79240e7b89 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/types/PromiseAPI.ts @@ -28,10 +28,6 @@ export class PromisePetApi { this.api = new ObservablePetApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -134,10 +130,6 @@ export class PromiseStoreApi { this.api = new ObservableStoreApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -198,10 +190,6 @@ export class PromiseUserApi { this.api = new ObservableUserApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts index 5b73c428dd43..f1d8063f9597 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts @@ -15,12 +15,7 @@ import { Pet } from '../models/Pet'; * no description */ export class PetApiRequestFactory extends BaseAPIRequestFactory { - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - + /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -57,10 +52,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -94,10 +93,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -131,10 +134,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -168,10 +175,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -201,10 +212,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -245,10 +260,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -310,10 +329,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -377,10 +400,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts index 5c6f34fd0cf1..71fc6d470504 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts @@ -14,12 +14,7 @@ import { Order } from '../models/Order'; * no description */ export class StoreApiRequestFactory extends BaseAPIRequestFactory { - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - + /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -43,6 +38,10 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -64,10 +63,14 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -95,6 +98,10 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -131,6 +138,10 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts index 6063fe740a17..5ab9ba9864f1 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts @@ -14,12 +14,7 @@ import { User } from '../models/User'; * no description */ export class UserApiRequestFactory extends BaseAPIRequestFactory { - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - + /** * This can only be done by the logged in user. * Create user @@ -55,10 +50,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -97,10 +96,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -139,10 +142,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -172,10 +179,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -202,6 +213,10 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -244,6 +259,10 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -264,10 +283,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -315,10 +338,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } 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 d8924a4216c2..ed2aa2bfe6db 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/auth/auth.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/auth/auth.ts @@ -64,6 +64,7 @@ export class PetstoreAuthAuthentication implements SecurityAuthentication { export type AuthMethods = { + "default"?: SecurityAuthentication, "api_key"?: SecurityAuthentication, "petstore_auth"?: SecurityAuthentication } @@ -74,6 +75,7 @@ export type HttpBearerConfiguration = { tokenProvider: TokenProvider }; export type OAuth2Configuration = { accessToken: string }; export type AuthMethodsConfiguration = { + "default"?: SecurityAuthentication, "api_key"?: ApiKeyConfiguration, "petstore_auth"?: OAuth2Configuration } @@ -88,6 +90,7 @@ export function configureAuthMethods(config: AuthMethodsConfiguration | undefine if (!config) { return authMethods; } + authMethods["default"] = config["default"] if (config["api_key"]) { authMethods["api_key"] = new ApiKeyAuthentication( diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts index f040e33cd57c..42a05d7adc5d 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts @@ -27,9 +27,6 @@ export class ObservablePetApi { this.responseProcessor = responseProcessor || new PetApiResponseProcessor(); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } /** * Add a new pet to the store @@ -241,9 +238,6 @@ export class ObservableStoreApi { this.responseProcessor = responseProcessor || new StoreApiResponseProcessor(); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -357,9 +351,6 @@ export class ObservableUserApi { this.responseProcessor = responseProcessor || new UserApiResponseProcessor(); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } /** * This can only be done by the logged in user. diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/types/PromiseAPI.ts index cb64631a1453..834ec07bc518 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/types/PromiseAPI.ts @@ -23,10 +23,6 @@ export class PromisePetApi { this.api = new ObservablePetApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -126,10 +122,6 @@ export class PromiseStoreApi { this.api = new ObservableStoreApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -187,10 +179,6 @@ export class PromiseUserApi { this.api = new ObservableUserApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts index 512d4b0abf70..dc3925ae5d17 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts @@ -17,12 +17,7 @@ import { Pet } from '../models/Pet'; * no description */ export class PetApiRequestFactory extends BaseAPIRequestFactory { - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - + /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -59,10 +54,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -96,10 +95,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -133,10 +136,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -170,10 +177,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -203,10 +214,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -247,10 +262,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -312,10 +331,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -379,10 +402,14 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts index 17ab0194847b..9a8dfd805172 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts @@ -16,12 +16,7 @@ import { Order } from '../models/Order'; * no description */ export class StoreApiRequestFactory extends BaseAPIRequestFactory { - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - + /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -45,6 +40,10 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -66,10 +65,14 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -97,6 +100,10 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -133,6 +140,10 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts index 2fb5b8966977..74a564f36140 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts @@ -16,12 +16,7 @@ import { User } from '../models/User'; * no description */ export class UserApiRequestFactory extends BaseAPIRequestFactory { - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - + /** * This can only be done by the logged in user. * Create user @@ -57,10 +52,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -99,10 +98,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -141,10 +144,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -174,10 +181,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -204,6 +215,10 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -246,6 +261,10 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -266,10 +285,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } @@ -317,10 +340,14 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = this.defaultSecurityAuthentication || _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth) { + await authMethod.applySecurityAuthentication(requestContext); + } return requestContext; } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/auth/auth.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/auth/auth.ts index 1f1d1ecac678..a67ed0e90ccb 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/auth/auth.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/auth/auth.ts @@ -66,6 +66,7 @@ export class PetstoreAuthAuthentication implements SecurityAuthentication { export type AuthMethods = { + "default"?: SecurityAuthentication, "api_key"?: SecurityAuthentication, "petstore_auth"?: SecurityAuthentication } @@ -76,6 +77,7 @@ export type HttpBearerConfiguration = { tokenProvider: TokenProvider }; export type OAuth2Configuration = { accessToken: string }; export type AuthMethodsConfiguration = { + "default"?: SecurityAuthentication, "api_key"?: ApiKeyConfiguration, "petstore_auth"?: OAuth2Configuration } @@ -90,6 +92,7 @@ export function configureAuthMethods(config: AuthMethodsConfiguration | undefine if (!config) { return authMethods; } + authMethods["default"] = config["default"] if (config["api_key"]) { authMethods["api_key"] = new ApiKeyAuthentication( diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts index f040e33cd57c..42a05d7adc5d 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts @@ -27,9 +27,6 @@ export class ObservablePetApi { this.responseProcessor = responseProcessor || new PetApiResponseProcessor(); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } /** * Add a new pet to the store @@ -241,9 +238,6 @@ export class ObservableStoreApi { this.responseProcessor = responseProcessor || new StoreApiResponseProcessor(); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -357,9 +351,6 @@ export class ObservableUserApi { this.responseProcessor = responseProcessor || new UserApiResponseProcessor(); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } /** * This can only be done by the logged in user. diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/types/PromiseAPI.ts index cb64631a1453..834ec07bc518 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/types/PromiseAPI.ts @@ -23,10 +23,6 @@ export class PromisePetApi { this.api = new ObservablePetApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -126,10 +122,6 @@ export class PromiseStoreApi { this.api = new ObservableStoreApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -187,10 +179,6 @@ export class PromiseUserApi { this.api = new ObservableUserApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * This can only be done by the logged in user. * Create user From 36eb3046d177f220ab68baafb9a64ef1df308571 Mon Sep 17 00:00:00 2001 From: David Gamero Date: Thu, 20 Jan 2022 11:03:57 -0500 Subject: [PATCH 09/21] null check chaining --- .../src/main/resources/typescript/api/api.mustache | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache index 8e9b42378f6f..2d392d359efc 100644 --- a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache @@ -157,13 +157,13 @@ export class {{classname}}RequestFactory extends BaseAPIRequestFactory { {{#authMethods}} // Apply auth methods authMethod = _config.authMethods["{{name}}"] - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } {{/authMethods}} const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; From c23d1080b6b256db171f4e7cd65862702a836778 Mon Sep 17 00:00:00 2001 From: David Gamero Date: Thu, 20 Jan 2022 11:43:19 -0500 Subject: [PATCH 10/21] generate samples --- .../builds/default/.openapi-generator/VERSION | 2 +- .../with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../with-npm/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../with-npm/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../with-npm/.openapi-generator/VERSION | 2 +- .../default/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../es6-target/.openapi-generator/VERSION | 2 +- .../test-petstore/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../default-v3.0/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/enum/.openapi-generator/VERSION | 2 +- .../es6-target/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../default/.openapi-generator/VERSION | 2 +- .../npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../default/.openapi-generator/VERSION | 2 +- .../npm/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../es6-target/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../composed-schemas/apis/DefaultApi.ts | 6 +++++ .../composed-schemas/types/ObservableAPI.ts | 5 +++++ .../composed-schemas/types/PromiseAPI.ts | 5 +++++ .../builds/default/.openapi-generator/VERSION | 2 +- .../typescript/builds/default/apis/PetApi.ts | 22 ++++++++++++------- .../builds/default/apis/StoreApi.ts | 8 ++++++- .../typescript/builds/default/apis/UserApi.ts | 18 ++++++++++----- .../builds/default/types/ObservableAPI.ts | 13 +++++++++++ .../builds/default/types/PromiseAPI.ts | 13 +++++++++++ .../builds/deno/.openapi-generator/VERSION | 2 +- .../typescript/builds/deno/apis/PetApi.ts | 22 ++++++++++++------- .../typescript/builds/deno/apis/StoreApi.ts | 8 ++++++- .../typescript/builds/deno/apis/UserApi.ts | 18 ++++++++++----- .../builds/deno/types/ObservableAPI.ts | 13 +++++++++++ .../builds/deno/types/PromiseAPI.ts | 13 +++++++++++ .../inversify/.openapi-generator/VERSION | 2 +- .../builds/inversify/apis/PetApi.ts | 22 ++++++++++++------- .../builds/inversify/apis/StoreApi.ts | 8 ++++++- .../builds/inversify/apis/UserApi.ts | 18 ++++++++++----- .../builds/inversify/types/ObservableAPI.ts | 13 +++++++++++ .../builds/inversify/types/PromiseAPI.ts | 13 +++++++++++ .../builds/jquery/.openapi-generator/VERSION | 2 +- .../typescript/builds/jquery/apis/PetApi.ts | 22 ++++++++++++------- .../typescript/builds/jquery/apis/StoreApi.ts | 8 ++++++- .../typescript/builds/jquery/apis/UserApi.ts | 18 ++++++++++----- .../builds/jquery/types/ObservableAPI.ts | 13 +++++++++++ .../builds/jquery/types/PromiseAPI.ts | 13 +++++++++++ .../object_params/.openapi-generator/VERSION | 2 +- .../builds/object_params/apis/PetApi.ts | 22 ++++++++++++------- .../builds/object_params/apis/StoreApi.ts | 8 ++++++- .../builds/object_params/apis/UserApi.ts | 18 ++++++++++----- .../object_params/types/ObservableAPI.ts | 13 +++++++++++ .../builds/object_params/types/PromiseAPI.ts | 13 +++++++++++ 91 files changed, 374 insertions(+), 138 deletions(-) diff --git a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-node-imports/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-node-imports/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-axios/builds/with-node-imports/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-node-imports/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts index 59a3ac169736..3c28b9d89f55 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts @@ -3,6 +3,7 @@ import { BaseAPIRequestFactory, RequiredError } from './baseapi'; import {Configuration} from '../configuration'; import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import {ObjectSerializer} from '../models/ObjectSerializer'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; @@ -17,6 +18,11 @@ import { PetByType } from '../models/PetByType'; * no description */ export class DefaultApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * @param inlineObject diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts index ef56e3758b8a..2c3eac8e91d7 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' +import { SecurityAuthentication } from '../auth/auth'; import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { Cat } from '../models/Cat'; @@ -27,6 +28,10 @@ export class ObservableDefaultApi { this.responseProcessor = responseProcessor || new DefaultApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * @param inlineObject */ diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/PromiseAPI.ts index 4939db8127b3..efb81ea6639d 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/PromiseAPI.ts @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' +import { SecurityAuthentication } from '../auth/auth'; import { Cat } from '../models/Cat'; import { CatAllOf } from '../models/CatAllOf'; @@ -23,6 +24,10 @@ export class PromiseDefaultApi { this.api = new ObservableDefaultApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * @param inlineObject */ diff --git a/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts index ff3b13bc8455..b6b8964a0a8a 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts @@ -5,6 +5,7 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; @@ -16,6 +17,11 @@ import { Pet } from '../models/Pet'; * no description */ export class PetApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * Add a new pet to the store @@ -53,7 +59,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -90,7 +96,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -127,7 +133,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -164,7 +170,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -197,7 +203,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -241,7 +247,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -306,7 +312,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -373,7 +379,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts index 46cf6d33efc7..e69e32a0768c 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts @@ -5,6 +5,7 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; @@ -15,6 +16,11 @@ import { Order } from '../models/Order'; * no description */ export class StoreApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -60,7 +66,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts index 99a7c43b2e5c..44cdbd9d19b1 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts @@ -5,6 +5,7 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; @@ -15,6 +16,11 @@ import { User } from '../models/User'; * no description */ export class UserApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * This can only be done by the logged in user. @@ -51,7 +57,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -93,7 +99,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -135,7 +141,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -168,7 +174,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -260,7 +266,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -311,7 +317,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts index 4207fd5102dc..f040e33cd57c 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' +import { SecurityAuthentication } from '../auth/auth'; import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { ApiResponse } from '../models/ApiResponse'; @@ -26,6 +27,10 @@ export class ObservablePetApi { this.responseProcessor = responseProcessor || new PetApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -236,6 +241,10 @@ export class ObservableStoreApi { this.responseProcessor = responseProcessor || new StoreApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -348,6 +357,10 @@ export class ObservableUserApi { this.responseProcessor = responseProcessor || new UserApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/default/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/default/types/PromiseAPI.ts index ac44ba7a13b2..cb64631a1453 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/types/PromiseAPI.ts @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' +import { SecurityAuthentication } from '../auth/auth'; import { ApiResponse } from '../models/ApiResponse'; import { Category } from '../models/Category'; @@ -22,6 +23,10 @@ export class PromisePetApi { this.api = new ObservablePetApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -121,6 +126,10 @@ export class PromiseStoreApi { this.api = new ObservableStoreApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -178,6 +187,10 @@ export class PromiseUserApi { this.api = new ObservableUserApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts index 9ae92b9b2120..6bc2b126ffe4 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts @@ -3,6 +3,7 @@ import { BaseAPIRequestFactory, RequiredError } from './baseapi.ts'; import {Configuration} from '../configuration.ts'; import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http.ts'; import {ObjectSerializer} from '../models/ObjectSerializer.ts'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception.ts'; import {canConsumeForm, isCodeInRange} from '../util.ts'; @@ -14,6 +15,11 @@ import { Pet } from '../models/Pet.ts'; * no description */ export class PetApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * Add a new pet to the store @@ -51,7 +57,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -88,7 +94,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -125,7 +131,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -162,7 +168,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -195,7 +201,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -239,7 +245,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -304,7 +310,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -371,7 +377,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts index 767734aed21e..eca24c4a7d9f 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts @@ -3,6 +3,7 @@ import { BaseAPIRequestFactory, RequiredError } from './baseapi.ts'; import {Configuration} from '../configuration.ts'; import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http.ts'; import {ObjectSerializer} from '../models/ObjectSerializer.ts'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception.ts'; import {canConsumeForm, isCodeInRange} from '../util.ts'; @@ -13,6 +14,11 @@ import { Order } from '../models/Order.ts'; * no description */ export class StoreApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -58,7 +64,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts index 7caf789d015d..d43abed21415 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts @@ -3,6 +3,7 @@ import { BaseAPIRequestFactory, RequiredError } from './baseapi.ts'; import {Configuration} from '../configuration.ts'; import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http.ts'; import {ObjectSerializer} from '../models/ObjectSerializer.ts'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception.ts'; import {canConsumeForm, isCodeInRange} from '../util.ts'; @@ -13,6 +14,11 @@ import { User } from '../models/User.ts'; * no description */ export class UserApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * This can only be done by the logged in user. @@ -49,7 +55,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -91,7 +97,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -133,7 +139,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -166,7 +172,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -258,7 +264,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -309,7 +315,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts index ff6f2d0869bb..41b30a01b3be 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http.ts'; import * as models from '../models/all.ts'; import { Configuration} from '../configuration.ts' +import { SecurityAuthentication } from '../auth/auth'; import { Observable, of, from } from '../rxjsStub.ts'; import {mergeMap, map} from '../rxjsStub.ts'; import { ApiResponse } from '../models/ApiResponse.ts'; @@ -26,6 +27,10 @@ export class ObservablePetApi { this.responseProcessor = responseProcessor || new PetApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -236,6 +241,10 @@ export class ObservableStoreApi { this.responseProcessor = responseProcessor || new StoreApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -348,6 +357,10 @@ export class ObservableUserApi { this.responseProcessor = responseProcessor || new UserApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/deno/types/PromiseAPI.ts index 76db56cbc8bd..b5c8a2533030 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/types/PromiseAPI.ts @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http.ts'; import * as models from '../models/all.ts'; import { Configuration} from '../configuration.ts' +import { SecurityAuthentication } from '../auth/auth'; import { ApiResponse } from '../models/ApiResponse.ts'; import { Category } from '../models/Category.ts'; @@ -22,6 +23,10 @@ export class PromisePetApi { this.api = new ObservablePetApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -121,6 +126,10 @@ export class PromiseStoreApi { this.api = new ObservableStoreApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -178,6 +187,10 @@ export class PromiseUserApi { this.api = new ObservableUserApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts index 9b8cd23af11e..205c80fa41d0 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts @@ -5,6 +5,7 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; @@ -18,6 +19,11 @@ import { Pet } from '../models/Pet'; */ @injectable() export class PetApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * Add a new pet to the store @@ -55,7 +61,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -92,7 +98,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -129,7 +135,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -166,7 +172,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -199,7 +205,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -243,7 +249,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -308,7 +314,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -375,7 +381,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts index 356d2cfbc4d0..88cb9aa1ba80 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts @@ -5,6 +5,7 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; @@ -17,6 +18,11 @@ import { Order } from '../models/Order'; */ @injectable() export class StoreApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -62,7 +68,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts index 3991a33b383b..e9390b7b015b 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts @@ -5,6 +5,7 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; @@ -17,6 +18,11 @@ import { User } from '../models/User'; */ @injectable() export class UserApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * This can only be done by the logged in user. @@ -53,7 +59,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -95,7 +101,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -137,7 +143,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -170,7 +176,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -262,7 +268,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -313,7 +319,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts index 98cbc9f37402..c224e837eb0f 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' +import { SecurityAuthentication } from '../auth/auth'; import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { injectable, inject, optional } from "inversify"; @@ -31,6 +32,10 @@ export class ObservablePetApi { this.responseProcessor = responseProcessor || new PetApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -244,6 +249,10 @@ export class ObservableStoreApi { this.responseProcessor = responseProcessor || new StoreApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -359,6 +368,10 @@ export class ObservableUserApi { this.responseProcessor = responseProcessor || new UserApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/types/PromiseAPI.ts index a6135ddbd244..69f549c27d0f 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/types/PromiseAPI.ts @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' +import { SecurityAuthentication } from '../auth/auth'; import { injectable, inject, optional } from "inversify"; import { AbstractConfiguration } from "../services/configuration"; @@ -27,6 +28,10 @@ export class PromisePetApi { this.api = new ObservablePetApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -129,6 +134,10 @@ export class PromiseStoreApi { this.api = new ObservableStoreApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -189,6 +198,10 @@ export class PromiseUserApi { this.api = new ObservableUserApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts index a2b9813749e5..b2203ac25059 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts @@ -3,6 +3,7 @@ import { BaseAPIRequestFactory, RequiredError } from './baseapi'; import {Configuration} from '../configuration'; import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import {ObjectSerializer} from '../models/ObjectSerializer'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; @@ -14,6 +15,11 @@ import { Pet } from '../models/Pet'; * no description */ export class PetApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * Add a new pet to the store @@ -51,7 +57,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -88,7 +94,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -125,7 +131,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -162,7 +168,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -195,7 +201,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -239,7 +245,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -304,7 +310,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -371,7 +377,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts index a8bc438d420d..827a20342df5 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts @@ -3,6 +3,7 @@ import { BaseAPIRequestFactory, RequiredError } from './baseapi'; import {Configuration} from '../configuration'; import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import {ObjectSerializer} from '../models/ObjectSerializer'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; @@ -13,6 +14,11 @@ import { Order } from '../models/Order'; * no description */ export class StoreApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -58,7 +64,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts index 3f493441c39d..b17b69beb50e 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts @@ -3,6 +3,7 @@ import { BaseAPIRequestFactory, RequiredError } from './baseapi'; import {Configuration} from '../configuration'; import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import {ObjectSerializer} from '../models/ObjectSerializer'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; @@ -13,6 +14,11 @@ import { User } from '../models/User'; * no description */ export class UserApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * This can only be done by the logged in user. @@ -49,7 +55,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -91,7 +97,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -133,7 +139,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -166,7 +172,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -258,7 +264,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -309,7 +315,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts index 4207fd5102dc..f040e33cd57c 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' +import { SecurityAuthentication } from '../auth/auth'; import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { ApiResponse } from '../models/ApiResponse'; @@ -26,6 +27,10 @@ export class ObservablePetApi { this.responseProcessor = responseProcessor || new PetApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -236,6 +241,10 @@ export class ObservableStoreApi { this.responseProcessor = responseProcessor || new StoreApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -348,6 +357,10 @@ export class ObservableUserApi { this.responseProcessor = responseProcessor || new UserApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/types/PromiseAPI.ts index ac44ba7a13b2..cb64631a1453 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/types/PromiseAPI.ts @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' +import { SecurityAuthentication } from '../auth/auth'; import { ApiResponse } from '../models/ApiResponse'; import { Category } from '../models/Category'; @@ -22,6 +23,10 @@ export class PromisePetApi { this.api = new ObservablePetApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -121,6 +126,10 @@ export class PromiseStoreApi { this.api = new ObservableStoreApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -178,6 +187,10 @@ export class PromiseUserApi { this.api = new ObservableUserApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION index 0984c4c1ad21..4077803655c0 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0-SNAPSHOT \ No newline at end of file +5.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts index ff3b13bc8455..b6b8964a0a8a 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts @@ -5,6 +5,7 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; @@ -16,6 +17,11 @@ import { Pet } from '../models/Pet'; * no description */ export class PetApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * Add a new pet to the store @@ -53,7 +59,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -90,7 +96,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -127,7 +133,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -164,7 +170,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -197,7 +203,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -241,7 +247,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -306,7 +312,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -373,7 +379,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts index 46cf6d33efc7..e69e32a0768c 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts @@ -5,6 +5,7 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; @@ -15,6 +16,11 @@ import { Order } from '../models/Order'; * no description */ export class StoreApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -60,7 +66,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts index 99a7c43b2e5c..44cdbd9d19b1 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts @@ -5,6 +5,7 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; +import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; @@ -15,6 +16,11 @@ import { User } from '../models/User'; * no description */ export class UserApiRequestFactory extends BaseAPIRequestFactory { + private defaultSecurityAuthentication: SecurityAuthentication | undefined; + + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.defaultSecurityAuthentication = auth; + } /** * This can only be done by the logged in user. @@ -51,7 +57,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -93,7 +99,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -135,7 +141,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -168,7 +174,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -260,7 +266,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } @@ -311,7 +317,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod = null; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] if (authMethod) { await authMethod.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts index 4207fd5102dc..f040e33cd57c 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' +import { SecurityAuthentication } from '../auth/auth'; import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { ApiResponse } from '../models/ApiResponse'; @@ -26,6 +27,10 @@ export class ObservablePetApi { this.responseProcessor = responseProcessor || new PetApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -236,6 +241,10 @@ export class ObservableStoreApi { this.responseProcessor = responseProcessor || new StoreApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -348,6 +357,10 @@ export class ObservableUserApi { this.responseProcessor = responseProcessor || new UserApiResponseProcessor(); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.requestFactory.setDefaultSecurityAuthentication(auth); + } + /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/types/PromiseAPI.ts index ac44ba7a13b2..cb64631a1453 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/types/PromiseAPI.ts @@ -1,6 +1,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' +import { SecurityAuthentication } from '../auth/auth'; import { ApiResponse } from '../models/ApiResponse'; import { Category } from '../models/Category'; @@ -22,6 +23,10 @@ export class PromisePetApi { this.api = new ObservablePetApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -121,6 +126,10 @@ export class PromiseStoreApi { this.api = new ObservableStoreApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -178,6 +187,10 @@ export class PromiseUserApi { this.api = new ObservableUserApi(configuration, requestFactory, responseProcessor); } + public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ + this.api.setDefaultSecurityAuthentication(auth); + } + /** * This can only be done by the logged in user. * Create user From bf8eae588d26697d5b89e9edf28e172bddd1bf0d Mon Sep 17 00:00:00 2001 From: David Gamero Date: Thu, 20 Jan 2022 12:08:12 -0500 Subject: [PATCH 11/21] remove extra spaces --- .../src/main/resources/typescript/api/api.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache index 2d392d359efc..e3d97c8f0705 100644 --- a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache @@ -29,7 +29,7 @@ import { {{classname}} } from '..{{filename}}{{extensionForDeno}}'; @injectable() {{/useInversify}} export class {{classname}}RequestFactory extends BaseAPIRequestFactory { - + {{#operation}} /** {{#notes}} From 9c184d2ec5857396bbc4123383949f122f9f93d7 Mon Sep 17 00:00:00 2001 From: David Gamero Date: Thu, 20 Jan 2022 12:14:15 -0500 Subject: [PATCH 12/21] regen samples --- .../builds/default/.openapi-generator/VERSION | 2 +- .../with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../with-npm/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../with-npm/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../with-npm/.openapi-generator/VERSION | 2 +- .../default/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../es6-target/.openapi-generator/VERSION | 2 +- .../test-petstore/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../default-v3.0/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/enum/.openapi-generator/VERSION | 2 +- .../es6-target/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../default/.openapi-generator/VERSION | 2 +- .../npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../default/.openapi-generator/VERSION | 2 +- .../npm/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../es6-target/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../composed-schemas/apis/DefaultApi.ts | 21 +--- .../composed-schemas/types/ObservableAPI.ts | 6 - .../composed-schemas/types/PromiseAPI.ts | 4 - .../builds/default/.openapi-generator/VERSION | 2 +- .../typescript/builds/default/apis/PetApi.ts | 105 ++++++------------ .../builds/default/apis/StoreApi.ts | 33 ++---- .../typescript/builds/default/apis/UserApi.ts | 89 +++++---------- .../builds/default/types/ObservableAPI.ts | 18 --- .../builds/default/types/PromiseAPI.ts | 12 -- .../builds/deno/.openapi-generator/VERSION | 2 +- .../typescript/builds/deno/apis/PetApi.ts | 105 ++++++------------ .../typescript/builds/deno/apis/StoreApi.ts | 33 ++---- .../typescript/builds/deno/apis/UserApi.ts | 89 +++++---------- .../builds/deno/types/ObservableAPI.ts | 18 --- .../builds/deno/types/PromiseAPI.ts | 12 -- .../inversify/.openapi-generator/VERSION | 2 +- .../builds/inversify/apis/PetApi.ts | 105 ++++++------------ .../builds/inversify/apis/StoreApi.ts | 33 ++---- .../builds/inversify/apis/UserApi.ts | 89 +++++---------- .../builds/inversify/types/ObservableAPI.ts | 18 --- .../builds/inversify/types/PromiseAPI.ts | 12 -- .../builds/jquery/.openapi-generator/VERSION | 2 +- .../typescript/builds/jquery/apis/PetApi.ts | 105 ++++++------------ .../typescript/builds/jquery/apis/StoreApi.ts | 33 ++---- .../typescript/builds/jquery/apis/UserApi.ts | 89 +++++---------- .../builds/jquery/types/ObservableAPI.ts | 18 --- .../builds/jquery/types/PromiseAPI.ts | 12 -- .../object_params/.openapi-generator/VERSION | 2 +- .../builds/object_params/apis/PetApi.ts | 105 ++++++------------ .../builds/object_params/apis/StoreApi.ts | 33 ++---- .../builds/object_params/apis/UserApi.ts | 89 +++++---------- .../object_params/types/ObservableAPI.ts | 18 --- .../builds/object_params/types/PromiseAPI.ts | 12 -- 91 files changed, 419 insertions(+), 1023 deletions(-) diff --git a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-node-imports/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-node-imports/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-axios/builds/with-node-imports/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-node-imports/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts index 73fe145a7215..1ed5dfe3d627 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts @@ -18,16 +18,7 @@ import { PetByType } from '../models/PetByType'; * no description */ export class DefaultApiRequestFactory extends BaseAPIRequestFactory { -<<<<<<< HEAD - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - -======= - ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * @param inlineObject */ @@ -55,8 +46,8 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory { requestContext.setBody(serializedBody); const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -89,8 +80,8 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory { requestContext.setBody(serializedBody); const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -123,8 +114,8 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory { requestContext.setBody(serializedBody); const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts index 43f696fefc3f..bc38269e6ae5 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts @@ -28,12 +28,6 @@ export class ObservableDefaultApi { this.responseProcessor = responseProcessor || new DefaultApiResponseProcessor(); } -<<<<<<< HEAD - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } -======= ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * @param inlineObject diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/PromiseAPI.ts index efb81ea6639d..935497cd2818 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/PromiseAPI.ts @@ -24,10 +24,6 @@ export class PromiseDefaultApi { this.api = new ObservableDefaultApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * @param inlineObject */ diff --git a/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts index 90dd608c629d..7b4f4f101520 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts @@ -17,16 +17,7 @@ import { Pet } from '../models/Pet'; * no description */ export class PetApiRequestFactory extends BaseAPIRequestFactory { -<<<<<<< HEAD - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - -======= - ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -63,17 +54,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -108,17 +95,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -153,17 +136,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -198,17 +177,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -239,17 +214,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -291,17 +262,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -364,17 +331,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -439,17 +402,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts index 30a718b1f212..f097e070fc37 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts @@ -16,16 +16,7 @@ import { Order } from '../models/Order'; * no description */ export class StoreApiRequestFactory extends BaseAPIRequestFactory { -<<<<<<< HEAD - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - -======= - ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -50,8 +41,8 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -74,17 +65,13 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -114,8 +101,8 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -154,8 +141,8 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setBody(serializedBody); const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts index eedebf79728e..a7d87aee2c6d 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts @@ -16,16 +16,7 @@ import { User } from '../models/User'; * no description */ export class UserApiRequestFactory extends BaseAPIRequestFactory { -<<<<<<< HEAD - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - -======= - ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * This can only be done by the logged in user. * Create user @@ -61,17 +52,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -111,17 +98,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -161,17 +144,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -202,17 +181,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -241,8 +216,8 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -287,8 +262,8 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -310,17 +285,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -369,17 +340,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; diff --git a/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts index 8a2688ba9b65..42a05d7adc5d 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts @@ -27,12 +27,6 @@ export class ObservablePetApi { this.responseProcessor = responseProcessor || new PetApiResponseProcessor(); } -<<<<<<< HEAD - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } -======= ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * Add a new pet to the store @@ -244,12 +238,6 @@ export class ObservableStoreApi { this.responseProcessor = responseProcessor || new StoreApiResponseProcessor(); } -<<<<<<< HEAD - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } -======= ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -363,12 +351,6 @@ export class ObservableUserApi { this.responseProcessor = responseProcessor || new UserApiResponseProcessor(); } -<<<<<<< HEAD - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } -======= ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * This can only be done by the logged in user. diff --git a/samples/openapi3/client/petstore/typescript/builds/default/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/default/types/PromiseAPI.ts index cb64631a1453..834ec07bc518 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/types/PromiseAPI.ts @@ -23,10 +23,6 @@ export class PromisePetApi { this.api = new ObservablePetApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -126,10 +122,6 @@ export class PromiseStoreApi { this.api = new ObservableStoreApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -187,10 +179,6 @@ export class PromiseUserApi { this.api = new ObservableUserApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts index f91a0c2d2c57..63278bf931b6 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts @@ -15,16 +15,7 @@ import { Pet } from '../models/Pet.ts'; * no description */ export class PetApiRequestFactory extends BaseAPIRequestFactory { -<<<<<<< HEAD - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - -======= - ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -61,17 +52,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -106,17 +93,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -151,17 +134,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -196,17 +175,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -237,17 +212,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -289,17 +260,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -362,17 +329,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -437,17 +400,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts index aa948337c788..5227171155da 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts @@ -14,16 +14,7 @@ import { Order } from '../models/Order.ts'; * no description */ export class StoreApiRequestFactory extends BaseAPIRequestFactory { -<<<<<<< HEAD - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - -======= - ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -48,8 +39,8 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -72,17 +63,13 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -112,8 +99,8 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -152,8 +139,8 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setBody(serializedBody); const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts index 7cf4ded13919..ee1d062a8e36 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts @@ -14,16 +14,7 @@ import { User } from '../models/User.ts'; * no description */ export class UserApiRequestFactory extends BaseAPIRequestFactory { -<<<<<<< HEAD - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - -======= - ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * This can only be done by the logged in user. * Create user @@ -59,17 +50,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -109,17 +96,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -159,17 +142,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -200,17 +179,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -239,8 +214,8 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -285,8 +260,8 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -308,17 +283,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -367,17 +338,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts index b6d30bd39039..8d9433a93257 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts @@ -27,12 +27,6 @@ export class ObservablePetApi { this.responseProcessor = responseProcessor || new PetApiResponseProcessor(); } -<<<<<<< HEAD - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } -======= ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * Add a new pet to the store @@ -244,12 +238,6 @@ export class ObservableStoreApi { this.responseProcessor = responseProcessor || new StoreApiResponseProcessor(); } -<<<<<<< HEAD - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } -======= ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -363,12 +351,6 @@ export class ObservableUserApi { this.responseProcessor = responseProcessor || new UserApiResponseProcessor(); } -<<<<<<< HEAD - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } -======= ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * This can only be done by the logged in user. diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/deno/types/PromiseAPI.ts index b5c8a2533030..1d89f5c86ba2 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/types/PromiseAPI.ts @@ -23,10 +23,6 @@ export class PromisePetApi { this.api = new ObservablePetApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -126,10 +122,6 @@ export class PromiseStoreApi { this.api = new ObservableStoreApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -187,10 +179,6 @@ export class PromiseUserApi { this.api = new ObservableUserApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts index fa23c2145a6e..76740a2eca6a 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts @@ -19,16 +19,7 @@ import { Pet } from '../models/Pet'; */ @injectable() export class PetApiRequestFactory extends BaseAPIRequestFactory { -<<<<<<< HEAD - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - -======= - ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -65,17 +56,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -110,17 +97,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -155,17 +138,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -200,17 +179,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -241,17 +216,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -293,17 +264,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -366,17 +333,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -441,17 +404,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts index 6c14614503af..3575a7d3f46b 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts @@ -18,16 +18,7 @@ import { Order } from '../models/Order'; */ @injectable() export class StoreApiRequestFactory extends BaseAPIRequestFactory { -<<<<<<< HEAD - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - -======= - ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -52,8 +43,8 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -76,17 +67,13 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -116,8 +103,8 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -156,8 +143,8 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setBody(serializedBody); const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts index 0eec747834ab..a93bc35681e2 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts @@ -18,16 +18,7 @@ import { User } from '../models/User'; */ @injectable() export class UserApiRequestFactory extends BaseAPIRequestFactory { -<<<<<<< HEAD - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - -======= - ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * This can only be done by the logged in user. * Create user @@ -63,17 +54,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -113,17 +100,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -163,17 +146,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -204,17 +183,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -243,8 +218,8 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -289,8 +264,8 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -312,17 +287,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -371,17 +342,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts index f6318bc4330a..c0c663b80daf 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts @@ -32,12 +32,6 @@ export class ObservablePetApi { this.responseProcessor = responseProcessor || new PetApiResponseProcessor(); } -<<<<<<< HEAD - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } -======= ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * Add a new pet to the store @@ -252,12 +246,6 @@ export class ObservableStoreApi { this.responseProcessor = responseProcessor || new StoreApiResponseProcessor(); } -<<<<<<< HEAD - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } -======= ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -374,12 +362,6 @@ export class ObservableUserApi { this.responseProcessor = responseProcessor || new UserApiResponseProcessor(); } -<<<<<<< HEAD - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } -======= ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * This can only be done by the logged in user. diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/types/PromiseAPI.ts index 69f549c27d0f..9d79240e7b89 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/types/PromiseAPI.ts @@ -28,10 +28,6 @@ export class PromisePetApi { this.api = new ObservablePetApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -134,10 +130,6 @@ export class PromiseStoreApi { this.api = new ObservableStoreApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -198,10 +190,6 @@ export class PromiseUserApi { this.api = new ObservableUserApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts index bc9514e0ae2f..0909b2f7baf4 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts @@ -15,16 +15,7 @@ import { Pet } from '../models/Pet'; * no description */ export class PetApiRequestFactory extends BaseAPIRequestFactory { -<<<<<<< HEAD - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - -======= - ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -61,17 +52,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -106,17 +93,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -151,17 +134,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -196,17 +175,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -237,17 +212,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -289,17 +260,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -362,17 +329,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -437,17 +400,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts index 662ed87ceb35..ebde19387157 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts @@ -14,16 +14,7 @@ import { Order } from '../models/Order'; * no description */ export class StoreApiRequestFactory extends BaseAPIRequestFactory { -<<<<<<< HEAD - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - -======= - ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -48,8 +39,8 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -72,17 +63,13 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -112,8 +99,8 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -152,8 +139,8 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setBody(serializedBody); const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts index 1965e4ac3c42..57e9629a1d88 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts @@ -14,16 +14,7 @@ import { User } from '../models/User'; * no description */ export class UserApiRequestFactory extends BaseAPIRequestFactory { -<<<<<<< HEAD - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - -======= - ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * This can only be done by the logged in user. * Create user @@ -59,17 +50,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -109,17 +96,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -159,17 +142,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -200,17 +179,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -239,8 +214,8 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -285,8 +260,8 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -308,17 +283,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -367,17 +338,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts index 8a2688ba9b65..42a05d7adc5d 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts @@ -27,12 +27,6 @@ export class ObservablePetApi { this.responseProcessor = responseProcessor || new PetApiResponseProcessor(); } -<<<<<<< HEAD - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } -======= ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * Add a new pet to the store @@ -244,12 +238,6 @@ export class ObservableStoreApi { this.responseProcessor = responseProcessor || new StoreApiResponseProcessor(); } -<<<<<<< HEAD - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } -======= ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -363,12 +351,6 @@ export class ObservableUserApi { this.responseProcessor = responseProcessor || new UserApiResponseProcessor(); } -<<<<<<< HEAD - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } -======= ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * This can only be done by the logged in user. diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/types/PromiseAPI.ts index cb64631a1453..834ec07bc518 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/types/PromiseAPI.ts @@ -23,10 +23,6 @@ export class PromisePetApi { this.api = new ObservablePetApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -126,10 +122,6 @@ export class PromiseStoreApi { this.api = new ObservableStoreApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -187,10 +179,6 @@ export class PromiseUserApi { this.api = new ObservableUserApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION index 4077803655c0..0984c4c1ad21 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1-SNAPSHOT \ No newline at end of file +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts index 90dd608c629d..7b4f4f101520 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts @@ -17,16 +17,7 @@ import { Pet } from '../models/Pet'; * no description */ export class PetApiRequestFactory extends BaseAPIRequestFactory { -<<<<<<< HEAD - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - -======= - ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -63,17 +54,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -108,17 +95,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -153,17 +136,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -198,17 +177,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -239,17 +214,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -291,17 +262,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -364,17 +331,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -439,17 +402,13 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["petstore_auth"] -======= authMethod = _config.authMethods["petstore_auth"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts index 30a718b1f212..f097e070fc37 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts @@ -16,16 +16,7 @@ import { Order } from '../models/Order'; * no description */ export class StoreApiRequestFactory extends BaseAPIRequestFactory { -<<<<<<< HEAD - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - -======= - ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -50,8 +41,8 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -74,17 +65,13 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -114,8 +101,8 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -154,8 +141,8 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setBody(serializedBody); const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts index eedebf79728e..a7d87aee2c6d 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts @@ -16,16 +16,7 @@ import { User } from '../models/User'; * no description */ export class UserApiRequestFactory extends BaseAPIRequestFactory { -<<<<<<< HEAD - private defaultSecurityAuthentication: SecurityAuthentication | undefined; - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.defaultSecurityAuthentication = auth; - } - -======= - ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * This can only be done by the logged in user. * Create user @@ -61,17 +52,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -111,17 +98,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -161,17 +144,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -202,17 +181,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -241,8 +216,8 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -287,8 +262,8 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -310,17 +285,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; @@ -369,17 +340,13 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods -<<<<<<< HEAD - authMethod = defaultSecurityAuthentication || _config.authMethods["api_key"] -======= authMethod = _config.authMethods["api_key"] ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 - if (authMethod) { - await authMethod.applySecurityAuthentication(requestContext); + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth) { - await authMethod.applySecurityAuthentication(requestContext); + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts index 8a2688ba9b65..42a05d7adc5d 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts @@ -27,12 +27,6 @@ export class ObservablePetApi { this.responseProcessor = responseProcessor || new PetApiResponseProcessor(); } -<<<<<<< HEAD - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } -======= ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * Add a new pet to the store @@ -244,12 +238,6 @@ export class ObservableStoreApi { this.responseProcessor = responseProcessor || new StoreApiResponseProcessor(); } -<<<<<<< HEAD - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } -======= ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -363,12 +351,6 @@ export class ObservableUserApi { this.responseProcessor = responseProcessor || new UserApiResponseProcessor(); } -<<<<<<< HEAD - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.requestFactory.setDefaultSecurityAuthentication(auth); - } -======= ->>>>>>> 36eb3046d177f220ab68baafb9a64ef1df308571 /** * This can only be done by the logged in user. diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/types/PromiseAPI.ts index cb64631a1453..834ec07bc518 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/types/PromiseAPI.ts @@ -23,10 +23,6 @@ export class PromisePetApi { this.api = new ObservablePetApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -126,10 +122,6 @@ export class PromiseStoreApi { this.api = new ObservableStoreApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -187,10 +179,6 @@ export class PromiseUserApi { this.api = new ObservableUserApi(configuration, requestFactory, responseProcessor); } - public setDefaultSecurityAuthentication(auth: SecurityAuthentication){ - this.api.setDefaultSecurityAuthentication(auth); - } - /** * This can only be done by the logged in user. * Create user From 9513c350db25aa0ca988bd2430bfeb46a51975df Mon Sep 17 00:00:00 2001 From: David Gamero Date: Thu, 20 Jan 2022 12:17:00 -0500 Subject: [PATCH 13/21] formatting fixes --- .../src/main/resources/typescript/api/api.mustache | 2 +- .../src/main/resources/typescript/types/ObservableAPI.mustache | 2 -- .../src/main/resources/typescript/types/PromiseAPI.mustache | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache index e3d97c8f0705..b2074902e567 100644 --- a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache @@ -156,7 +156,7 @@ export class {{classname}}RequestFactory extends BaseAPIRequestFactory { {{/hasAuthMethods}} {{#authMethods}} // Apply auth methods - authMethod = _config.authMethods["{{name}}"] + authMethod = _config.authMethods["{{name}}"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } diff --git a/modules/openapi-generator/src/main/resources/typescript/types/ObservableAPI.mustache b/modules/openapi-generator/src/main/resources/typescript/types/ObservableAPI.mustache index d00a70455e52..80b41d323641 100644 --- a/modules/openapi-generator/src/main/resources/typescript/types/ObservableAPI.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/types/ObservableAPI.mustache @@ -1,7 +1,6 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http{{extensionForDeno}}'; import * as models from '../models/all{{extensionForDeno}}'; import { Configuration} from '../configuration{{extensionForDeno}}' -import { SecurityAuthentication } from '../auth/auth'; import { Observable, of, from } from {{#useRxJS}}'rxjs'{{/useRxJS}}{{^useRxJS}}'../rxjsStub{{extensionForDeno}}'{{/useRxJS}}; import {mergeMap, map} from {{#useRxJS}}'rxjs/operators'{{/useRxJS}}{{^useRxJS}}'../rxjsStub{{extensionForDeno}}'{{/useRxJS}}; {{#useInversify}} @@ -51,7 +50,6 @@ export class Observable{{classname}} { this.responseProcessor = responseProcessor || new {{classname}}ResponseProcessor(); } - {{#operation}} /** {{#notes}} diff --git a/modules/openapi-generator/src/main/resources/typescript/types/PromiseAPI.mustache b/modules/openapi-generator/src/main/resources/typescript/types/PromiseAPI.mustache index 2522b2e99c90..2c424db21fb4 100644 --- a/modules/openapi-generator/src/main/resources/typescript/types/PromiseAPI.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/types/PromiseAPI.mustache @@ -1,7 +1,6 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http{{extensionForDeno}}'; import * as models from '../models/all{{extensionForDeno}}'; import { Configuration} from '../configuration{{extensionForDeno}}' -import { SecurityAuthentication } from '../auth/auth'; {{#useInversify}} import { injectable, inject, optional } from "inversify"; import { AbstractConfiguration } from "../services/configuration"; From f9a683db5531df20ab7325b4d495081925619db6 Mon Sep 17 00:00:00 2001 From: David Gamero Date: Thu, 20 Jan 2022 12:50:24 -0500 Subject: [PATCH 14/21] more samples --- .../composed-schemas/types/ObservableAPI.ts | 2 -- .../builds/composed-schemas/types/PromiseAPI.ts | 1 - .../typescript/builds/default/apis/PetApi.ts | 16 ++++++++-------- .../typescript/builds/default/apis/StoreApi.ts | 2 +- .../typescript/builds/default/apis/UserApi.ts | 12 ++++++------ .../builds/default/types/ObservableAPI.ts | 4 ---- .../builds/default/types/PromiseAPI.ts | 1 - .../typescript/builds/deno/apis/PetApi.ts | 16 ++++++++-------- .../typescript/builds/deno/apis/StoreApi.ts | 2 +- .../typescript/builds/deno/apis/UserApi.ts | 12 ++++++------ .../builds/deno/types/ObservableAPI.ts | 4 ---- .../typescript/builds/deno/types/PromiseAPI.ts | 1 - .../typescript/builds/inversify/apis/PetApi.ts | 16 ++++++++-------- .../typescript/builds/inversify/apis/StoreApi.ts | 2 +- .../typescript/builds/inversify/apis/UserApi.ts | 12 ++++++------ .../builds/inversify/types/ObservableAPI.ts | 4 ---- .../builds/inversify/types/PromiseAPI.ts | 1 - .../typescript/builds/jquery/apis/PetApi.ts | 16 ++++++++-------- .../typescript/builds/jquery/apis/StoreApi.ts | 2 +- .../typescript/builds/jquery/apis/UserApi.ts | 12 ++++++------ .../builds/jquery/types/ObservableAPI.ts | 4 ---- .../typescript/builds/jquery/types/PromiseAPI.ts | 1 - .../builds/object_params/apis/PetApi.ts | 16 ++++++++-------- .../builds/object_params/apis/StoreApi.ts | 2 +- .../builds/object_params/apis/UserApi.ts | 12 ++++++------ .../builds/object_params/types/ObservableAPI.ts | 4 ---- .../builds/object_params/types/PromiseAPI.ts | 1 - 27 files changed, 75 insertions(+), 103 deletions(-) diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts index bc38269e6ae5..ef56e3758b8a 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts @@ -1,7 +1,6 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' -import { SecurityAuthentication } from '../auth/auth'; import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { Cat } from '../models/Cat'; @@ -28,7 +27,6 @@ export class ObservableDefaultApi { this.responseProcessor = responseProcessor || new DefaultApiResponseProcessor(); } - /** * @param inlineObject */ diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/PromiseAPI.ts index 935497cd2818..4939db8127b3 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/PromiseAPI.ts @@ -1,7 +1,6 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' -import { SecurityAuthentication } from '../auth/auth'; import { Cat } from '../models/Cat'; import { CatAllOf } from '../models/CatAllOf'; diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts index 7b4f4f101520..12a146f21d35 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts @@ -54,7 +54,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -95,7 +95,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -136,7 +136,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -177,7 +177,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -214,7 +214,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -262,7 +262,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -331,7 +331,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -402,7 +402,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts index f097e070fc37..7b84919f2d5a 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts @@ -65,7 +65,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts index a7d87aee2c6d..7d1bebeecba3 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts @@ -52,7 +52,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -98,7 +98,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -144,7 +144,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -181,7 +181,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -285,7 +285,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -340,7 +340,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts index 42a05d7adc5d..4207fd5102dc 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts @@ -1,7 +1,6 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' -import { SecurityAuthentication } from '../auth/auth'; import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { ApiResponse } from '../models/ApiResponse'; @@ -27,7 +26,6 @@ export class ObservablePetApi { this.responseProcessor = responseProcessor || new PetApiResponseProcessor(); } - /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -238,7 +236,6 @@ export class ObservableStoreApi { this.responseProcessor = responseProcessor || new StoreApiResponseProcessor(); } - /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -351,7 +348,6 @@ export class ObservableUserApi { this.responseProcessor = responseProcessor || new UserApiResponseProcessor(); } - /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/default/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/default/types/PromiseAPI.ts index 834ec07bc518..ac44ba7a13b2 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/types/PromiseAPI.ts @@ -1,7 +1,6 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' -import { SecurityAuthentication } from '../auth/auth'; import { ApiResponse } from '../models/ApiResponse'; import { Category } from '../models/Category'; diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts index 63278bf931b6..d97f0f55876d 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts @@ -52,7 +52,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -93,7 +93,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -134,7 +134,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -175,7 +175,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -212,7 +212,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -260,7 +260,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -329,7 +329,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -400,7 +400,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts index 5227171155da..7936a1d908d5 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts @@ -63,7 +63,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts index ee1d062a8e36..fbc70a7cdf85 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts @@ -50,7 +50,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -96,7 +96,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -142,7 +142,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -179,7 +179,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -283,7 +283,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -338,7 +338,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts index 8d9433a93257..ff6f2d0869bb 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts @@ -1,7 +1,6 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http.ts'; import * as models from '../models/all.ts'; import { Configuration} from '../configuration.ts' -import { SecurityAuthentication } from '../auth/auth'; import { Observable, of, from } from '../rxjsStub.ts'; import {mergeMap, map} from '../rxjsStub.ts'; import { ApiResponse } from '../models/ApiResponse.ts'; @@ -27,7 +26,6 @@ export class ObservablePetApi { this.responseProcessor = responseProcessor || new PetApiResponseProcessor(); } - /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -238,7 +236,6 @@ export class ObservableStoreApi { this.responseProcessor = responseProcessor || new StoreApiResponseProcessor(); } - /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -351,7 +348,6 @@ export class ObservableUserApi { this.responseProcessor = responseProcessor || new UserApiResponseProcessor(); } - /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/deno/types/PromiseAPI.ts index 1d89f5c86ba2..76db56cbc8bd 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/types/PromiseAPI.ts @@ -1,7 +1,6 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http.ts'; import * as models from '../models/all.ts'; import { Configuration} from '../configuration.ts' -import { SecurityAuthentication } from '../auth/auth'; import { ApiResponse } from '../models/ApiResponse.ts'; import { Category } from '../models/Category.ts'; diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts index 76740a2eca6a..bb07fdf6f6f7 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts @@ -56,7 +56,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -97,7 +97,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -138,7 +138,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -179,7 +179,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -216,7 +216,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -264,7 +264,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -333,7 +333,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -404,7 +404,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts index 3575a7d3f46b..45381f662d39 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts @@ -67,7 +67,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts index a93bc35681e2..6d50c9be1132 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts @@ -54,7 +54,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -100,7 +100,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -146,7 +146,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -183,7 +183,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -287,7 +287,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -342,7 +342,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts index c0c663b80daf..98cbc9f37402 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts @@ -1,7 +1,6 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' -import { SecurityAuthentication } from '../auth/auth'; import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { injectable, inject, optional } from "inversify"; @@ -32,7 +31,6 @@ export class ObservablePetApi { this.responseProcessor = responseProcessor || new PetApiResponseProcessor(); } - /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -246,7 +244,6 @@ export class ObservableStoreApi { this.responseProcessor = responseProcessor || new StoreApiResponseProcessor(); } - /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -362,7 +359,6 @@ export class ObservableUserApi { this.responseProcessor = responseProcessor || new UserApiResponseProcessor(); } - /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/types/PromiseAPI.ts index 9d79240e7b89..a6135ddbd244 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/types/PromiseAPI.ts @@ -1,7 +1,6 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' -import { SecurityAuthentication } from '../auth/auth'; import { injectable, inject, optional } from "inversify"; import { AbstractConfiguration } from "../services/configuration"; diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts index 0909b2f7baf4..5aa57d9c7104 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts @@ -52,7 +52,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -93,7 +93,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -134,7 +134,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -175,7 +175,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -212,7 +212,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -260,7 +260,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -329,7 +329,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -400,7 +400,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts index ebde19387157..537f72ec1256 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts @@ -63,7 +63,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts index 57e9629a1d88..def7bcfd62cc 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts @@ -50,7 +50,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -96,7 +96,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -142,7 +142,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -179,7 +179,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -283,7 +283,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -338,7 +338,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts index 42a05d7adc5d..4207fd5102dc 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts @@ -1,7 +1,6 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' -import { SecurityAuthentication } from '../auth/auth'; import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { ApiResponse } from '../models/ApiResponse'; @@ -27,7 +26,6 @@ export class ObservablePetApi { this.responseProcessor = responseProcessor || new PetApiResponseProcessor(); } - /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -238,7 +236,6 @@ export class ObservableStoreApi { this.responseProcessor = responseProcessor || new StoreApiResponseProcessor(); } - /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -351,7 +348,6 @@ export class ObservableUserApi { this.responseProcessor = responseProcessor || new UserApiResponseProcessor(); } - /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/types/PromiseAPI.ts index 834ec07bc518..ac44ba7a13b2 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/types/PromiseAPI.ts @@ -1,7 +1,6 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' -import { SecurityAuthentication } from '../auth/auth'; import { ApiResponse } from '../models/ApiResponse'; import { Category } from '../models/Category'; diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts index 7b4f4f101520..12a146f21d35 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts @@ -54,7 +54,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -95,7 +95,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -136,7 +136,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -177,7 +177,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -214,7 +214,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -262,7 +262,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -331,7 +331,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -402,7 +402,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["petstore_auth"] + authMethod = _config.authMethods["petstore_auth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts index f097e070fc37..7b84919f2d5a 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts @@ -65,7 +65,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts index a7d87aee2c6d..7d1bebeecba3 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts @@ -52,7 +52,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -98,7 +98,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -144,7 +144,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -181,7 +181,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -285,7 +285,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } @@ -340,7 +340,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { let authMethod: SecurityAuthentication | undefined; // Apply auth methods - authMethod = _config.authMethods["api_key"] + authMethod = _config.authMethods["api_key"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts index 42a05d7adc5d..4207fd5102dc 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts @@ -1,7 +1,6 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' -import { SecurityAuthentication } from '../auth/auth'; import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { ApiResponse } from '../models/ApiResponse'; @@ -27,7 +26,6 @@ export class ObservablePetApi { this.responseProcessor = responseProcessor || new PetApiResponseProcessor(); } - /** * Add a new pet to the store * @param pet Pet object that needs to be added to the store @@ -238,7 +236,6 @@ export class ObservableStoreApi { this.responseProcessor = responseProcessor || new StoreApiResponseProcessor(); } - /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Delete purchase order by ID @@ -351,7 +348,6 @@ export class ObservableUserApi { this.responseProcessor = responseProcessor || new UserApiResponseProcessor(); } - /** * This can only be done by the logged in user. * Create user diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/types/PromiseAPI.ts index 834ec07bc518..ac44ba7a13b2 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/types/PromiseAPI.ts @@ -1,7 +1,6 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import * as models from '../models/all'; import { Configuration} from '../configuration' -import { SecurityAuthentication } from '../auth/auth'; import { ApiResponse } from '../models/ApiResponse'; import { Category } from '../models/Category'; From 103bb276e1b24d8b1ac684dbf44a2ae34d944ce1 Mon Sep 17 00:00:00 2001 From: David Gamero Date: Thu, 20 Jan 2022 14:17:09 -0500 Subject: [PATCH 15/21] remove from abstract methods --- .../main/resources/typescript/services/ObjectParamAPI.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/typescript/services/ObjectParamAPI.mustache b/modules/openapi-generator/src/main/resources/typescript/services/ObjectParamAPI.mustache index e1e5e6976b0e..e6aabfc12244 100644 --- a/modules/openapi-generator/src/main/resources/typescript/services/ObjectParamAPI.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/services/ObjectParamAPI.mustache @@ -26,7 +26,7 @@ export abstract class AbstractObject{{classname}} { {{/summary}} * @param param the request object */ - public abstract {{nickname}}(param: req.{{classname}}{{operationIdCamelCase}}Request{{^hasRequiredParams}} = {}{{/hasRequiredParams}}, options?: Configuration): {{#useRxJS}}Observable{{/useRxJS}}{{^useRxJS}}Promise{{/useRxJS}}<{{{returnType}}}{{^returnType}}void{{/returnType}}>; + public abstract {{nickname}}(param: req.{{classname}}{{operationIdCamelCase}}Request, options?: Configuration): {{#useRxJS}}Observable{{/useRxJS}}{{^useRxJS}}Promise{{/useRxJS}}<{{{returnType}}}{{^returnType}}void{{/returnType}}>; {{/operation}} } From 36762824bccc78ea3d215446bec2ca0d22f5684b Mon Sep 17 00:00:00 2001 From: David Gamero Date: Thu, 20 Jan 2022 14:26:38 -0500 Subject: [PATCH 16/21] samples --- .../typescript/builds/inversify/services/ObjectParamAPI.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/services/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/services/ObjectParamAPI.ts index fa99b4bc9025..d0cdd02e78de 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/services/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/services/ObjectParamAPI.ts @@ -78,7 +78,7 @@ export abstract class AbstractObjectStoreApi { * Returns pet inventories by status * @param param the request object */ - public abstract getInventory(param: req.StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }>; + public abstract getInventory(param: req.StoreApiGetInventoryRequest, options?: Configuration): Promise<{ [key: string]: number; }>; /** * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -139,7 +139,7 @@ export abstract class AbstractObjectUserApi { * Logs out current logged in user session * @param param the request object */ - public abstract logoutUser(param: req.UserApiLogoutUserRequest = {}, options?: Configuration): Promise; + public abstract logoutUser(param: req.UserApiLogoutUserRequest, options?: Configuration): Promise; /** * This can only be done by the logged in user. From a114047436ce6335e7a21f404dcc7522dc3da940 Mon Sep 17 00:00:00 2001 From: David Gamero Date: Thu, 20 Jan 2022 15:42:39 -0500 Subject: [PATCH 17/21] add default to inversify as well --- .../src/main/resources/typescript/auth/auth.mustache | 1 + 1 file changed, 1 insertion(+) 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 557ff46e22a5..1a5e1fc46a8c 100644 --- a/modules/openapi-generator/src/main/resources/typescript/auth/auth.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/auth/auth.mustache @@ -115,6 +115,7 @@ export type AuthMethods = { {{#useInversify}} export const authMethodServices = { + "default"?: SecurityAuthentication, {{#authMethods}} "{{name}}": {{#lambda.pascalcase}}{{name}}{{/lambda.pascalcase}}Authentication{{^-last}},{{/-last}} {{/authMethods}} From 03f573b712e3391ac83d3cfb784ae22d011c44b4 Mon Sep 17 00:00:00 2001 From: David Gamero Date: Thu, 20 Jan 2022 16:22:07 -0500 Subject: [PATCH 18/21] samples again --- .../client/petstore/typescript/builds/inversify/auth/auth.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/auth/auth.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/auth/auth.ts index 6356b584bfc1..bebddacf8b6e 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/auth/auth.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/auth/auth.ts @@ -80,6 +80,7 @@ export type AuthMethods = { } export const authMethodServices = { + "default"?: SecurityAuthentication, "api_key": ApiKeyAuthentication, "petstore_auth": PetstoreAuthAuthentication } From 37f75b7e6b7b637c3f01044a8e80d7f24b0ee2f9 Mon Sep 17 00:00:00 2001 From: David Gamero Date: Thu, 20 Jan 2022 17:59:11 -0500 Subject: [PATCH 19/21] exclude inversify --- .../src/main/resources/typescript/api/api.mustache | 8 +++++++- .../src/main/resources/typescript/auth/auth.mustache | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache index b2074902e567..45ffcb801075 100644 --- a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache @@ -9,10 +9,13 @@ import { URLSearchParams } from 'url'; {{/node}} {{/platforms}} import {ObjectSerializer} from '../models/ObjectSerializer{{extensionForDeno}}'; -import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception{{extensionForDeno}}'; import {canConsumeForm, isCodeInRange} from '../util{{extensionForDeno}}'; +{{^useInversify}} +import { SecurityAuthentication } from '../auth/auth'; +{{/useInversify}} + {{#useInversify}} import { injectable } from "inversify"; {{/useInversify}} @@ -161,10 +164,13 @@ export class {{classname}}RequestFactory extends BaseAPIRequestFactory { await authMethod?.applySecurityAuthentication(requestContext); } {{/authMethods}} + + {{^useInversify}} const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } + {{/useInversify}} return requestContext; } 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 1a5e1fc46a8c..09ff0ca2bb9a 100644 --- a/modules/openapi-generator/src/main/resources/typescript/auth/auth.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/auth/auth.mustache @@ -107,7 +107,9 @@ export class {{#lambda.pascalcase}}{{name}}{{/lambda.pascalcase}}Authentication {{/authMethods}} export type AuthMethods = { + {{^useInversify}} "default"?: SecurityAuthentication, + {{/useInversify}} {{#authMethods}} "{{name}}"?: SecurityAuthentication{{^-last}},{{/-last}} {{/authMethods}} @@ -115,7 +117,9 @@ export type AuthMethods = { {{#useInversify}} export const authMethodServices = { + {{^useInversify}} "default"?: SecurityAuthentication, + {{/useInversify}} {{#authMethods}} "{{name}}": {{#lambda.pascalcase}}{{name}}{{/lambda.pascalcase}}Authentication{{^-last}},{{/-last}} {{/authMethods}} @@ -128,7 +132,9 @@ export type HttpBearerConfiguration = { tokenProvider: TokenProvider }; export type OAuth2Configuration = { accessToken: string }; export type AuthMethodsConfiguration = { + {{^useInversify}} "default"?: SecurityAuthentication, + {{/useInversify}} {{#authMethods}} "{{name}}"?: {{#isApiKey}}ApiKeyConfiguration{{/isApiKey}}{{#isBasicBasic}}HttpBasicConfiguration{{/isBasicBasic}}{{#isBasicBearer}}HttpBearerConfiguration{{/isBasicBearer}}{{#isOAuth}}OAuth2Configuration{{/isOAuth}}{{^-last}},{{/-last}} {{/authMethods}} @@ -144,7 +150,9 @@ export function configureAuthMethods(config: AuthMethodsConfiguration | undefine if (!config) { return authMethods; } + {{^useInversify}} authMethods["default"] = config["default"] + {{/useInversify}} {{#authMethods}} if (config["{{name}}"]) { From c0d9b0d54ba3e6855dd813f9dc8462db2cfda50e Mon Sep 17 00:00:00 2001 From: David Gamero Date: Thu, 20 Jan 2022 18:07:02 -0500 Subject: [PATCH 20/21] samples once more --- .../composed-schemas/apis/DefaultApi.ts | 6 ++- .../typescript/builds/default/apis/PetApi.ts | 11 ++++- .../builds/default/apis/StoreApi.ts | 7 +++- .../typescript/builds/default/apis/UserApi.ts | 11 ++++- .../typescript/builds/deno/apis/PetApi.ts | 11 ++++- .../typescript/builds/deno/apis/StoreApi.ts | 7 +++- .../typescript/builds/deno/apis/UserApi.ts | 11 ++++- .../builds/inversify/apis/PetApi.ts | 42 ++++--------------- .../builds/inversify/apis/StoreApi.ts | 22 +++------- .../builds/inversify/apis/UserApi.ts | 42 ++++--------------- .../typescript/builds/inversify/auth/auth.ts | 4 -- .../typescript/builds/jquery/apis/PetApi.ts | 11 ++++- .../typescript/builds/jquery/apis/StoreApi.ts | 7 +++- .../typescript/builds/jquery/apis/UserApi.ts | 11 ++++- .../builds/object_params/apis/PetApi.ts | 11 ++++- .../builds/object_params/apis/StoreApi.ts | 7 +++- .../builds/object_params/apis/UserApi.ts | 11 ++++- 17 files changed, 132 insertions(+), 100 deletions(-) diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts index 1ed5dfe3d627..0bdc9bde44e8 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts @@ -3,10 +3,11 @@ import { BaseAPIRequestFactory, RequiredError } from './baseapi'; import {Configuration} from '../configuration'; import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import {ObjectSerializer} from '../models/ObjectSerializer'; -import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; +import { SecurityAuthentication } from '../auth/auth'; + import { Cat } from '../models/Cat'; import { Dog } from '../models/Dog'; @@ -45,6 +46,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -79,6 +81,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -113,6 +116,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts index 12a146f21d35..7e532a4d4d4e 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts @@ -5,10 +5,11 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; -import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; +import { SecurityAuthentication } from '../auth/auth'; + import { ApiResponse } from '../models/ApiResponse'; import { Pet } from '../models/Pet'; @@ -58,6 +59,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -99,6 +101,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -140,6 +143,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -181,6 +185,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -218,6 +223,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -266,6 +272,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -335,6 +342,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -406,6 +414,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts index 7b84919f2d5a..d07f1fe79e7c 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts @@ -5,10 +5,11 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; -import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; +import { SecurityAuthentication } from '../auth/auth'; + import { Order } from '../models/Order'; @@ -40,6 +41,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -69,6 +71,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -100,6 +103,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -140,6 +144,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts index 7d1bebeecba3..35c669e3e619 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts @@ -5,10 +5,11 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; -import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; +import { SecurityAuthentication } from '../auth/auth'; + import { User } from '../models/User'; @@ -56,6 +57,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -102,6 +104,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -148,6 +151,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -185,6 +189,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -215,6 +220,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -261,6 +267,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -289,6 +296,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -344,6 +352,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts index d97f0f55876d..bee515770e2d 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts @@ -3,10 +3,11 @@ import { BaseAPIRequestFactory, RequiredError } from './baseapi.ts'; import {Configuration} from '../configuration.ts'; import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http.ts'; import {ObjectSerializer} from '../models/ObjectSerializer.ts'; -import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception.ts'; import {canConsumeForm, isCodeInRange} from '../util.ts'; +import { SecurityAuthentication } from '../auth/auth'; + import { ApiResponse } from '../models/ApiResponse.ts'; import { Pet } from '../models/Pet.ts'; @@ -56,6 +57,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -97,6 +99,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -138,6 +141,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -179,6 +183,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -216,6 +221,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -264,6 +270,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -333,6 +340,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -404,6 +412,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts index 7936a1d908d5..c8226338cb5f 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts @@ -3,10 +3,11 @@ import { BaseAPIRequestFactory, RequiredError } from './baseapi.ts'; import {Configuration} from '../configuration.ts'; import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http.ts'; import {ObjectSerializer} from '../models/ObjectSerializer.ts'; -import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception.ts'; import {canConsumeForm, isCodeInRange} from '../util.ts'; +import { SecurityAuthentication } from '../auth/auth'; + import { Order } from '../models/Order.ts'; @@ -38,6 +39,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -67,6 +69,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -98,6 +101,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -138,6 +142,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts index fbc70a7cdf85..434ec0d30a99 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts @@ -3,10 +3,11 @@ import { BaseAPIRequestFactory, RequiredError } from './baseapi.ts'; import {Configuration} from '../configuration.ts'; import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http.ts'; import {ObjectSerializer} from '../models/ObjectSerializer.ts'; -import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception.ts'; import {canConsumeForm, isCodeInRange} from '../util.ts'; +import { SecurityAuthentication } from '../auth/auth'; + import { User } from '../models/User.ts'; @@ -54,6 +55,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -100,6 +102,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -146,6 +149,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -183,6 +187,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -213,6 +218,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -259,6 +265,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -287,6 +294,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -342,6 +350,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts index bb07fdf6f6f7..35fdb81e009d 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts @@ -5,10 +5,10 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; -import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; + import { injectable } from "inversify"; import { ApiResponse } from '../models/ApiResponse'; @@ -60,10 +60,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } + return requestContext; } @@ -101,10 +98,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } + return requestContext; } @@ -142,10 +136,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } + return requestContext; } @@ -183,10 +174,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } + return requestContext; } @@ -220,10 +208,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } + return requestContext; } @@ -268,10 +253,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } + return requestContext; } @@ -337,10 +319,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } + return requestContext; } @@ -408,10 +387,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } + return requestContext; } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts index 45381f662d39..da062da91a1a 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts @@ -5,10 +5,10 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; -import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; + import { injectable } from "inversify"; import { Order } from '../models/Order'; @@ -42,10 +42,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } + return requestContext; } @@ -71,10 +68,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } + return requestContext; } @@ -102,10 +96,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } + return requestContext; } @@ -142,10 +133,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } + return requestContext; } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts index 6d50c9be1132..0860bddd6b26 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts @@ -5,10 +5,10 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; -import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; + import { injectable } from "inversify"; import { User } from '../models/User'; @@ -58,10 +58,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } + return requestContext; } @@ -104,10 +101,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } + return requestContext; } @@ -150,10 +144,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } + return requestContext; } @@ -187,10 +178,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } + return requestContext; } @@ -217,10 +205,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } + return requestContext; } @@ -263,10 +248,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { } - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } + return requestContext; } @@ -291,10 +273,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } + return requestContext; } @@ -346,10 +325,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } + return requestContext; } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/auth/auth.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/auth/auth.ts index bebddacf8b6e..f6ffebc4d7ee 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/auth/auth.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/auth/auth.ts @@ -74,13 +74,11 @@ export class PetstoreAuthAuthentication implements SecurityAuthentication { export type AuthMethods = { - "default"?: SecurityAuthentication, "api_key"?: SecurityAuthentication, "petstore_auth"?: SecurityAuthentication } export const authMethodServices = { - "default"?: SecurityAuthentication, "api_key": ApiKeyAuthentication, "petstore_auth": PetstoreAuthAuthentication } @@ -91,7 +89,6 @@ export type HttpBearerConfiguration = { tokenProvider: TokenProvider }; export type OAuth2Configuration = { accessToken: string }; export type AuthMethodsConfiguration = { - "default"?: SecurityAuthentication, "api_key"?: ApiKeyConfiguration, "petstore_auth"?: OAuth2Configuration } @@ -106,7 +103,6 @@ export function configureAuthMethods(config: AuthMethodsConfiguration | undefine if (!config) { return authMethods; } - authMethods["default"] = config["default"] if (config["api_key"]) { authMethods["api_key"] = new ApiKeyAuthentication( diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts index 5aa57d9c7104..f05977e59da3 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts @@ -3,10 +3,11 @@ import { BaseAPIRequestFactory, RequiredError } from './baseapi'; import {Configuration} from '../configuration'; import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import {ObjectSerializer} from '../models/ObjectSerializer'; -import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; +import { SecurityAuthentication } from '../auth/auth'; + import { ApiResponse } from '../models/ApiResponse'; import { Pet } from '../models/Pet'; @@ -56,6 +57,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -97,6 +99,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -138,6 +141,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -179,6 +183,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -216,6 +221,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -264,6 +270,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -333,6 +340,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -404,6 +412,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts index 537f72ec1256..feeaad6be27b 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts @@ -3,10 +3,11 @@ import { BaseAPIRequestFactory, RequiredError } from './baseapi'; import {Configuration} from '../configuration'; import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import {ObjectSerializer} from '../models/ObjectSerializer'; -import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; +import { SecurityAuthentication } from '../auth/auth'; + import { Order } from '../models/Order'; @@ -38,6 +39,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -67,6 +69,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -98,6 +101,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -138,6 +142,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts index def7bcfd62cc..735fcfe445de 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts @@ -3,10 +3,11 @@ import { BaseAPIRequestFactory, RequiredError } from './baseapi'; import {Configuration} from '../configuration'; import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import {ObjectSerializer} from '../models/ObjectSerializer'; -import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; +import { SecurityAuthentication } from '../auth/auth'; + import { User } from '../models/User'; @@ -54,6 +55,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -100,6 +102,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -146,6 +149,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -183,6 +187,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -213,6 +218,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -259,6 +265,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -287,6 +294,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -342,6 +350,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts index 12a146f21d35..7e532a4d4d4e 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts @@ -5,10 +5,11 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; -import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; +import { SecurityAuthentication } from '../auth/auth'; + import { ApiResponse } from '../models/ApiResponse'; import { Pet } from '../models/Pet'; @@ -58,6 +59,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -99,6 +101,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -140,6 +143,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -181,6 +185,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -218,6 +223,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -266,6 +272,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -335,6 +342,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -406,6 +414,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts index 7b84919f2d5a..d07f1fe79e7c 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts @@ -5,10 +5,11 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; -import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; +import { SecurityAuthentication } from '../auth/auth'; + import { Order } from '../models/Order'; @@ -40,6 +41,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -69,6 +71,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -100,6 +103,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -140,6 +144,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { ); requestContext.setBody(serializedBody); + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts index 7d1bebeecba3..35c669e3e619 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts @@ -5,10 +5,11 @@ import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/ht import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; -import { SecurityAuthentication } from '../auth/auth'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; +import { SecurityAuthentication } from '../auth/auth'; + import { User } from '../models/User'; @@ -56,6 +57,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -102,6 +104,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -148,6 +151,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -185,6 +189,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -215,6 +220,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -261,6 +267,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -289,6 +296,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); @@ -344,6 +352,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory { if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); From b22e5b0cbe5a5866e499cbd1e4bfae8eea05f169 Mon Sep 17 00:00:00 2001 From: David Gamero Date: Thu, 20 Jan 2022 20:49:46 -0500 Subject: [PATCH 21/21] samples --- .../src/main/resources/typescript/api/api.mustache | 9 +++------ .../builds/composed-schemas/apis/DefaultApi.ts | 7 +++---- .../petstore/typescript/builds/default/apis/PetApi.ts | 7 +++---- .../petstore/typescript/builds/default/apis/StoreApi.ts | 7 +++---- .../petstore/typescript/builds/default/apis/UserApi.ts | 7 +++---- .../petstore/typescript/builds/deno/apis/PetApi.ts | 7 +++---- .../petstore/typescript/builds/deno/apis/StoreApi.ts | 7 +++---- .../petstore/typescript/builds/deno/apis/UserApi.ts | 7 +++---- .../petstore/typescript/builds/inversify/apis/PetApi.ts | 6 +++--- .../typescript/builds/inversify/apis/StoreApi.ts | 6 +++--- .../petstore/typescript/builds/inversify/apis/UserApi.ts | 6 +++--- .../petstore/typescript/builds/jquery/apis/PetApi.ts | 7 +++---- .../petstore/typescript/builds/jquery/apis/StoreApi.ts | 7 +++---- .../petstore/typescript/builds/jquery/apis/UserApi.ts | 7 +++---- .../typescript/builds/object_params/apis/PetApi.ts | 7 +++---- .../typescript/builds/object_params/apis/StoreApi.ts | 7 +++---- .../typescript/builds/object_params/apis/UserApi.ts | 7 +++---- 17 files changed, 51 insertions(+), 67 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache index 45ffcb801075..0ca805593105 100644 --- a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache @@ -1,7 +1,7 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi{{extensionForDeno}}'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi{{extensionForDeno}}'; import {Configuration} from '../configuration{{extensionForDeno}}'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http{{extensionForDeno}}'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http{{extensionForDeno}}'; {{#platforms}} {{#node}} import * as FormData from "form-data"; @@ -11,10 +11,7 @@ import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer{{extensionForDeno}}'; import {ApiException} from './exception{{extensionForDeno}}'; import {canConsumeForm, isCodeInRange} from '../util{{extensionForDeno}}'; - -{{^useInversify}} -import { SecurityAuthentication } from '../auth/auth'; -{{/useInversify}} +import {SecurityAuthentication} from '../auth/auth'; {{#useInversify}} import { injectable } from "inversify"; diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts index 0bdc9bde44e8..a2c52ae901ea 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/DefaultApi.ts @@ -1,12 +1,11 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; import {Configuration} from '../configuration'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; - -import { SecurityAuthentication } from '../auth/auth'; +import {SecurityAuthentication} from '../auth/auth'; import { Cat } from '../models/Cat'; diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts index 7e532a4d4d4e..e85797baebc1 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/PetApi.ts @@ -1,14 +1,13 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; import {Configuration} from '../configuration'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; - -import { SecurityAuthentication } from '../auth/auth'; +import {SecurityAuthentication} from '../auth/auth'; import { ApiResponse } from '../models/ApiResponse'; diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts index d07f1fe79e7c..821e181892ba 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts @@ -1,14 +1,13 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; import {Configuration} from '../configuration'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; - -import { SecurityAuthentication } from '../auth/auth'; +import {SecurityAuthentication} from '../auth/auth'; import { Order } from '../models/Order'; diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts index 35c669e3e619..9a87f64e9c58 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/UserApi.ts @@ -1,14 +1,13 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; import {Configuration} from '../configuration'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; - -import { SecurityAuthentication } from '../auth/auth'; +import {SecurityAuthentication} from '../auth/auth'; import { User } from '../models/User'; diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts index bee515770e2d..f11b208baf24 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/PetApi.ts @@ -1,12 +1,11 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi.ts'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi.ts'; import {Configuration} from '../configuration.ts'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http.ts'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http.ts'; import {ObjectSerializer} from '../models/ObjectSerializer.ts'; import {ApiException} from './exception.ts'; import {canConsumeForm, isCodeInRange} from '../util.ts'; - -import { SecurityAuthentication } from '../auth/auth'; +import {SecurityAuthentication} from '../auth/auth'; import { ApiResponse } from '../models/ApiResponse.ts'; diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts index c8226338cb5f..f83700b35cfb 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts @@ -1,12 +1,11 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi.ts'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi.ts'; import {Configuration} from '../configuration.ts'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http.ts'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http.ts'; import {ObjectSerializer} from '../models/ObjectSerializer.ts'; import {ApiException} from './exception.ts'; import {canConsumeForm, isCodeInRange} from '../util.ts'; - -import { SecurityAuthentication } from '../auth/auth'; +import {SecurityAuthentication} from '../auth/auth'; import { Order } from '../models/Order.ts'; diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts index 434ec0d30a99..f2de9aeb598a 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/UserApi.ts @@ -1,12 +1,11 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi.ts'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi.ts'; import {Configuration} from '../configuration.ts'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http.ts'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http.ts'; import {ObjectSerializer} from '../models/ObjectSerializer.ts'; import {ApiException} from './exception.ts'; import {canConsumeForm, isCodeInRange} from '../util.ts'; - -import { SecurityAuthentication } from '../auth/auth'; +import {SecurityAuthentication} from '../auth/auth'; import { User } from '../models/User.ts'; diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts index 35fdb81e009d..81a75d96bcec 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/PetApi.ts @@ -1,13 +1,13 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; import {Configuration} from '../configuration'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; - +import {SecurityAuthentication} from '../auth/auth'; import { injectable } from "inversify"; diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts index da062da91a1a..4115b9dc6d9e 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts @@ -1,13 +1,13 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; import {Configuration} from '../configuration'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; - +import {SecurityAuthentication} from '../auth/auth'; import { injectable } from "inversify"; diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts index 0860bddd6b26..124034df9888 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/UserApi.ts @@ -1,13 +1,13 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; import {Configuration} from '../configuration'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; - +import {SecurityAuthentication} from '../auth/auth'; import { injectable } from "inversify"; diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts index f05977e59da3..fe20e750a839 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/PetApi.ts @@ -1,12 +1,11 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; import {Configuration} from '../configuration'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; - -import { SecurityAuthentication } from '../auth/auth'; +import {SecurityAuthentication} from '../auth/auth'; import { ApiResponse } from '../models/ApiResponse'; diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts index feeaad6be27b..020bb0407068 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts @@ -1,12 +1,11 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; import {Configuration} from '../configuration'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; - -import { SecurityAuthentication } from '../auth/auth'; +import {SecurityAuthentication} from '../auth/auth'; import { Order } from '../models/Order'; diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts index 735fcfe445de..75cb0453992e 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/UserApi.ts @@ -1,12 +1,11 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; import {Configuration} from '../configuration'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; - -import { SecurityAuthentication } from '../auth/auth'; +import {SecurityAuthentication} from '../auth/auth'; import { User } from '../models/User'; diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts index 7e532a4d4d4e..e85797baebc1 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/PetApi.ts @@ -1,14 +1,13 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; import {Configuration} from '../configuration'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; - -import { SecurityAuthentication } from '../auth/auth'; +import {SecurityAuthentication} from '../auth/auth'; import { ApiResponse } from '../models/ApiResponse'; diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts index d07f1fe79e7c..821e181892ba 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts @@ -1,14 +1,13 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; import {Configuration} from '../configuration'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; - -import { SecurityAuthentication } from '../auth/auth'; +import {SecurityAuthentication} from '../auth/auth'; import { Order } from '../models/Order'; diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts index 35c669e3e619..9a87f64e9c58 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/UserApi.ts @@ -1,14 +1,13 @@ // TODO: better import syntax? -import { BaseAPIRequestFactory, RequiredError } from './baseapi'; +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; import {Configuration} from '../configuration'; -import { RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; import * as FormData from "form-data"; import { URLSearchParams } from 'url'; import {ObjectSerializer} from '../models/ObjectSerializer'; import {ApiException} from './exception'; import {canConsumeForm, isCodeInRange} from '../util'; - -import { SecurityAuthentication } from '../auth/auth'; +import {SecurityAuthentication} from '../auth/auth'; import { User } from '../models/User';