diff --git a/docs/generators.md b/docs/generators.md index 8a8ff23086b8..c532ce21b806 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -3,6 +3,7 @@ id: generators title: Generators List --- +[main] INFO o.o.c.l.PythonFastAPIServerCodegen - Skipping sorting of path operations, order matters, let the developer decide via their specification file. The following generators are available: ## CLIENT generators diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md index 66df7b84a90d..269c2b09587e 100644 --- a/docs/generators/typescript-axios.md +++ b/docs/generators/typescript-axios.md @@ -44,6 +44,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |supportsES6|Generate code that conforms to ES6.| |false| |useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |false| |useSquareBracketsInArrayNames|Setting this property to true will add brackets to array attribute names, e.g. my_values[].| |false| +|withAWSV4Signature|whether to include AWS v4 signature support| |false| |withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| |withNodeImports|Setting this property to true adds imports for NodeJS| |false| |withSeparateModelsAndApi|Put the model and api in separate folders and in separate classes. This requires in addition a value for 'apiPackage' and 'modelPackage'| |false| @@ -291,7 +292,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |OAuth2_ClientCredentials|✗|OAS2,OAS3 |OAuth2_AuthorizationCode|✗|OAS2,OAS3 |SignatureAuth|✗|OAS3 -|AWSV4Signature|✗|ToolingExtension +|AWSV4Signature|✓|ToolingExtension ### Wire Format Feature | Name | Supported | Defined By | diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java index 53580ea51627..4551698f9fce 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java @@ -52,6 +52,7 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege public static final String USE_SQUARE_BRACKETS_IN_ARRAY_NAMES = "useSquareBracketsInArrayNames"; public static final String AXIOS_VERSION = "axiosVersion"; public static final String DEFAULT_AXIOS_VERSION = "^1.6.1"; + public static final String WITH_AWSV4_SIGNATURE = "withAWSV4Signature"; @Getter @Setter protected String npmRepository = null; @@ -60,6 +61,7 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege @Getter @Setter protected String axiosVersion = DEFAULT_AXIOS_VERSION; + protected boolean withAWSV4Signature = false; private String tsModelPackage = ""; @@ -71,7 +73,7 @@ public TypeScriptAxiosClientCodegen() { modifyFeatureSet(features -> features .includeDocumentationFeatures(DocumentationFeature.Readme) - .includeSecurityFeatures(SecurityFeature.BearerToken)); + .includeSecurityFeatures(SecurityFeature.BearerToken, SecurityFeature.AWSV4Signature)); // clear import mapping (from default generator) as TS does not use it // at the moment @@ -94,6 +96,7 @@ public TypeScriptAxiosClientCodegen() { this.cliOptions.add(new CliOption(IMPORT_FILE_EXTENSION_SWITCH, IMPORT_FILE_EXTENSION_SWITCH_DESC, SchemaTypeUtil.STRING_TYPE).defaultValue(this.importFileExtension)); this.cliOptions.add(new CliOption(USE_SQUARE_BRACKETS_IN_ARRAY_NAMES, "Setting this property to true will add brackets to array attribute names, e.g. my_values[].", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); this.cliOptions.add(new CliOption(AXIOS_VERSION, "Use this property to override the axios version in package.json").defaultValue(DEFAULT_AXIOS_VERSION)); + this.cliOptions.add(new CliOption(WITH_AWSV4_SIGNATURE, "whether to include AWS v4 signature support", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); // Templates have no mapping between formatted property names and original base names so use only "original" and remove this option removeOption(CodegenConstants.MODEL_PROPERTY_NAMING); } @@ -182,6 +185,10 @@ public void processOpts() { setAxiosVersion(additionalProperties.get(AXIOS_VERSION).toString()); } additionalProperties.put("axiosVersion", getAxiosVersion()); + if (additionalProperties.containsKey(CodegenConstants.WITH_AWSV4_SIGNATURE_COMMENT)) { + this.setWithAWSV4Signature(Boolean.parseBoolean(additionalProperties.get(CodegenConstants.WITH_AWSV4_SIGNATURE_COMMENT).toString())); + } + additionalProperties.put(CodegenConstants.WITH_AWSV4_SIGNATURE_COMMENT, withAWSV4Signature); } @@ -307,6 +314,10 @@ public String modelDocFileFolder() { return (outputFolder + "/" + modelDocPath).replace('/', File.separatorChar); } + public void setWithAWSV4Signature(boolean withAWSV4Signature) { + this.withAWSV4Signature = withAWSV4Signature; + } + /** * Overriding toRegularExpression() to avoid escapeText() being called, * as it would return a broken regular expression if any escaped character / metacharacter were present. diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/api.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/api.mustache index 2ab3e2fdcbe0..545e01b9a53c 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/api.mustache @@ -17,7 +17,7 @@ import FormData from 'form-data' {{/withNodeImports}} // Some imports not used depending on template conditions // @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common{{importFileExtension}}'; +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction{{#withAWSV4Signature}}, setAWS4SignatureInterceptor{{/withAWSV4Signature}} } from './common{{importFileExtension}}'; import type { RequestArgs } from './base{{importFileExtension}}'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base{{importFileExtension}}'; diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache index 046261bc973f..449038234d7b 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache @@ -17,7 +17,7 @@ import FormData from 'form-data' {{/withNodeImports}} // Some imports not used depending on template conditions // @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '{{apiRelativeToRoot}}common{{importFileExtension}}'; +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction{{#withAWSV4Signature}}, setAWS4SignatureInterceptor{{/withAWSV4Signature}} } from '{{apiRelativeToRoot}}common{{importFileExtension}}'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '{{apiRelativeToRoot}}base{{importFileExtension}}'; {{#imports}} @@ -71,6 +71,10 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur {{#authMethods}} // authentication {{name}} required {{#isApiKey}} + {{#withAWSV4Signature}} + // aws v4 signature authentication required + await setAWS4SignatureInterceptor(globalAxios, configuration) + {{/withAWSV4Signature}} {{#isKeyInHeader}} await setApiKeyToObject(localVarHeaderParameter, "{{keyParamName}}", configuration) {{/isKeyInHeader}} diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/common.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/common.mustache index d778f29e6d3b..3b28a8220214 100755 --- a/modules/openapi-generator/src/main/resources/typescript-axios/common.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/common.mustache @@ -2,10 +2,12 @@ /* eslint-disable */ {{>licenseInfo}} - import type { Configuration } from "./configuration{{importFileExtension}}"; import type { RequestArgs } from "./base{{importFileExtension}}"; import type { AxiosInstance, AxiosResponse } from 'axios'; +{{#withAWSV4Signature}} +import { aws4Interceptor } from "aws4-axios"; +{{/withAWSV4Signature}} import { RequiredError } from "./base{{importFileExtension}}"; {{#withNodeImports}} import { URL, URLSearchParams } from 'url'; @@ -56,6 +58,25 @@ export const setOAuthToObject = async function (object: any, name: string, scope } } +{{#withAWSV4Signature}} +export const setAWS4SignatureInterceptor = async function (globalAxios: AxiosInstance, configuration?: Configuration) { + if (configuration && configuration.awsv4) { + const interceptor = aws4Interceptor({ + options: { + region: configuration.awsv4?.options?.region ?? process.env.AWS_REGION ?? 'us-east-1', + service: configuration.awsv4?.options?.service ?? 'execute-api', + }, + credentials: { + accessKeyId: configuration.awsv4?.credentials?.accessKeyId ?? process.env.AWS_ACCESS_KEY_ID, + secretAccessKey: configuration.awsv4?.credentials?.secretAccessKey ?? process.env.AWS_SECRET_ACCESS_KEY, + sessionToken: configuration.awsv4?.credentials?.sessionToken ?? process.env.AWS_SESSION_TOKEN + }, + }); + globalAxios.interceptors.request.use(interceptor); + } +} +{{/withAWSV4Signature}} + function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { if (parameter == null) return; if (typeof parameter === "object") { diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/configuration.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/configuration.mustache index 6dd78e7a1778..577907a1574b 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/configuration.mustache @@ -1,13 +1,24 @@ /* tslint:disable */ -/* eslint-disable */ {{>licenseInfo}} +interface AWSv4Configuration { + options?: { + region?: string + service?: string + } + credentials?: { + accessKeyId?: string + secretAccessKey?: string, + sessionToken?: string + } +} export interface ConfigurationParameters { apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); username?: string; password?: string; accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + awsv4?: AWSv4Configuration; basePath?: string; serverIndex?: number; baseOptions?: any; @@ -34,6 +45,17 @@ export class Configuration { * @param scopes oauth2 scope */ accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * parameter for aws4 signature security + * @param {Object} AWS4Signature - AWS4 Signature security + * @param {string} options.region - aws region + * @param {string} options.service - name of the service. + * @param {string} credentials.accessKeyId - aws access key id + * @param {string} credentials.secretAccessKey - aws access key + * @param {string} credentials.sessionToken - aws session token + * @memberof Configuration + */ + awsv4?: AWSv4Configuration; /** * override base path */ @@ -60,6 +82,7 @@ export class Configuration { this.username = param.username; this.password = param.password; this.accessToken = param.accessToken; + this.awsv4 = param.awsv4; this.basePath = param.basePath; this.serverIndex = param.serverIndex; this.baseOptions = { diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache index f05b33ed1eed..34ed22e3785d 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache @@ -27,6 +27,9 @@ }, "dependencies": { "axios": "{{axiosVersion}}" + {{#withAWSV4Signature}} + "aws4-axios": "^3.3.4" + {{/withAWSV4Signature}} }, "devDependencies": { "@types/node": "12.11.5 - 12.20.42", diff --git a/samples/client/echo_api/typescript-axios/build/common.ts b/samples/client/echo_api/typescript-axios/build/common.ts index 41e36d497493..9410167703b9 100644 --- a/samples/client/echo_api/typescript-axios/build/common.ts +++ b/samples/client/echo_api/typescript-axios/build/common.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ - import type { Configuration } from "./configuration"; import type { RequestArgs } from "./base"; import type { AxiosInstance, AxiosResponse } from 'axios'; @@ -63,6 +62,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } } + function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { if (parameter == null) return; if (typeof parameter === "object") { diff --git a/samples/client/echo_api/typescript-axios/build/configuration.ts b/samples/client/echo_api/typescript-axios/build/configuration.ts index 34e7d2f62f17..ff980524201c 100644 --- a/samples/client/echo_api/typescript-axios/build/configuration.ts +++ b/samples/client/echo_api/typescript-axios/build/configuration.ts @@ -1,5 +1,4 @@ /* tslint:disable */ -/* eslint-disable */ /** * Echo Server API * Echo Server API @@ -12,12 +11,24 @@ * Do not edit the class manually. */ +interface AWSv4Configuration { + options?: { + region?: string + service?: string + } + credentials?: { + accessKeyId?: string + secretAccessKey?: string, + sessionToken?: string + } +} export interface ConfigurationParameters { apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); username?: string; password?: string; accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + awsv4?: AWSv4Configuration; basePath?: string; serverIndex?: number; baseOptions?: any; @@ -44,6 +55,17 @@ export class Configuration { * @param scopes oauth2 scope */ accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * parameter for aws4 signature security + * @param {Object} AWS4Signature - AWS4 Signature security + * @param {string} options.region - aws region + * @param {string} options.service - name of the service. + * @param {string} credentials.accessKeyId - aws access key id + * @param {string} credentials.secretAccessKey - aws access key + * @param {string} credentials.sessionToken - aws session token + * @memberof Configuration + */ + awsv4?: AWSv4Configuration; /** * override base path */ @@ -70,6 +92,7 @@ export class Configuration { this.username = param.username; this.password = param.password; this.accessToken = param.accessToken; + this.awsv4 = param.awsv4; this.basePath = param.basePath; this.serverIndex = param.serverIndex; this.baseOptions = { diff --git a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/common.ts b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/common.ts index e6ac882c1dac..5a8d182be66c 100644 --- a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/common.ts +++ b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/common.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ - import type { Configuration } from "./configuration"; import type { RequestArgs } from "./base"; import type { AxiosInstance, AxiosResponse } from 'axios'; @@ -63,6 +62,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } } + function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { if (parameter == null) return; if (typeof parameter === "object") { diff --git a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/configuration.ts b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/configuration.ts index a63c023257b3..172a02242a9b 100644 --- a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/configuration.ts +++ b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/configuration.ts @@ -1,5 +1,4 @@ /* tslint:disable */ -/* eslint-disable */ /** * Example * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -12,12 +11,24 @@ * Do not edit the class manually. */ +interface AWSv4Configuration { + options?: { + region?: string + service?: string + } + credentials?: { + accessKeyId?: string + secretAccessKey?: string, + sessionToken?: string + } +} export interface ConfigurationParameters { apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); username?: string; password?: string; accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + awsv4?: AWSv4Configuration; basePath?: string; serverIndex?: number; baseOptions?: any; @@ -44,6 +55,17 @@ export class Configuration { * @param scopes oauth2 scope */ accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * parameter for aws4 signature security + * @param {Object} AWS4Signature - AWS4 Signature security + * @param {string} options.region - aws region + * @param {string} options.service - name of the service. + * @param {string} credentials.accessKeyId - aws access key id + * @param {string} credentials.secretAccessKey - aws access key + * @param {string} credentials.sessionToken - aws session token + * @memberof Configuration + */ + awsv4?: AWSv4Configuration; /** * override base path */ @@ -70,6 +92,7 @@ export class Configuration { this.username = param.username; this.password = param.password; this.accessToken = param.accessToken; + this.awsv4 = param.awsv4; this.basePath = param.basePath; this.serverIndex = param.serverIndex; this.baseOptions = { diff --git a/samples/client/petstore/typescript-axios/builds/composed-schemas/common.ts b/samples/client/petstore/typescript-axios/builds/composed-schemas/common.ts index ff80920e8850..769b805940e7 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/common.ts +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/common.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ - import type { Configuration } from "./configuration"; import type { RequestArgs } from "./base"; import type { AxiosInstance, AxiosResponse } from 'axios'; @@ -63,6 +62,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } } + function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { if (parameter == null) return; if (typeof parameter === "object") { diff --git a/samples/client/petstore/typescript-axios/builds/composed-schemas/configuration.ts b/samples/client/petstore/typescript-axios/builds/composed-schemas/configuration.ts index 9b343fd954ee..92e41548b684 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/configuration.ts +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/configuration.ts @@ -1,5 +1,4 @@ /* tslint:disable */ -/* eslint-disable */ /** * Example * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -12,12 +11,24 @@ * Do not edit the class manually. */ +interface AWSv4Configuration { + options?: { + region?: string + service?: string + } + credentials?: { + accessKeyId?: string + secretAccessKey?: string, + sessionToken?: string + } +} export interface ConfigurationParameters { apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); username?: string; password?: string; accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + awsv4?: AWSv4Configuration; basePath?: string; serverIndex?: number; baseOptions?: any; @@ -44,6 +55,17 @@ export class Configuration { * @param scopes oauth2 scope */ accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * parameter for aws4 signature security + * @param {Object} AWS4Signature - AWS4 Signature security + * @param {string} options.region - aws region + * @param {string} options.service - name of the service. + * @param {string} credentials.accessKeyId - aws access key id + * @param {string} credentials.secretAccessKey - aws access key + * @param {string} credentials.sessionToken - aws session token + * @memberof Configuration + */ + awsv4?: AWSv4Configuration; /** * override base path */ @@ -70,6 +92,7 @@ export class Configuration { this.username = param.username; this.password = param.password; this.accessToken = param.accessToken; + this.awsv4 = param.awsv4; this.basePath = param.basePath; this.serverIndex = param.serverIndex; this.baseOptions = { diff --git a/samples/client/petstore/typescript-axios/builds/default/common.ts b/samples/client/petstore/typescript-axios/builds/default/common.ts index 48a99b2fb1e0..99397a86c102 100644 --- a/samples/client/petstore/typescript-axios/builds/default/common.ts +++ b/samples/client/petstore/typescript-axios/builds/default/common.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ - import type { Configuration } from "./configuration"; import type { RequestArgs } from "./base"; import type { AxiosInstance, AxiosResponse } from 'axios'; @@ -63,6 +62,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } } + function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { if (parameter == null) return; if (typeof parameter === "object") { diff --git a/samples/client/petstore/typescript-axios/builds/default/configuration.ts b/samples/client/petstore/typescript-axios/builds/default/configuration.ts index c50ec4bf5d5b..77510956ab86 100644 --- a/samples/client/petstore/typescript-axios/builds/default/configuration.ts +++ b/samples/client/petstore/typescript-axios/builds/default/configuration.ts @@ -1,5 +1,4 @@ /* tslint:disable */ -/* eslint-disable */ /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. @@ -12,12 +11,24 @@ * Do not edit the class manually. */ +interface AWSv4Configuration { + options?: { + region?: string + service?: string + } + credentials?: { + accessKeyId?: string + secretAccessKey?: string, + sessionToken?: string + } +} export interface ConfigurationParameters { apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); username?: string; password?: string; accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + awsv4?: AWSv4Configuration; basePath?: string; serverIndex?: number; baseOptions?: any; @@ -44,6 +55,17 @@ export class Configuration { * @param scopes oauth2 scope */ accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * parameter for aws4 signature security + * @param {Object} AWS4Signature - AWS4 Signature security + * @param {string} options.region - aws region + * @param {string} options.service - name of the service. + * @param {string} credentials.accessKeyId - aws access key id + * @param {string} credentials.secretAccessKey - aws access key + * @param {string} credentials.sessionToken - aws session token + * @memberof Configuration + */ + awsv4?: AWSv4Configuration; /** * override base path */ @@ -70,6 +92,7 @@ export class Configuration { this.username = param.username; this.password = param.password; this.accessToken = param.accessToken; + this.awsv4 = param.awsv4; this.basePath = param.basePath; this.serverIndex = param.serverIndex; this.baseOptions = { diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/common.ts b/samples/client/petstore/typescript-axios/builds/es6-target/common.ts index 48a99b2fb1e0..99397a86c102 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/common.ts +++ b/samples/client/petstore/typescript-axios/builds/es6-target/common.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ - import type { Configuration } from "./configuration"; import type { RequestArgs } from "./base"; import type { AxiosInstance, AxiosResponse } from 'axios'; @@ -63,6 +62,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } } + function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { if (parameter == null) return; if (typeof parameter === "object") { diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/configuration.ts b/samples/client/petstore/typescript-axios/builds/es6-target/configuration.ts index c50ec4bf5d5b..77510956ab86 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/configuration.ts +++ b/samples/client/petstore/typescript-axios/builds/es6-target/configuration.ts @@ -1,5 +1,4 @@ /* tslint:disable */ -/* eslint-disable */ /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. @@ -12,12 +11,24 @@ * Do not edit the class manually. */ +interface AWSv4Configuration { + options?: { + region?: string + service?: string + } + credentials?: { + accessKeyId?: string + secretAccessKey?: string, + sessionToken?: string + } +} export interface ConfigurationParameters { apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); username?: string; password?: string; accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + awsv4?: AWSv4Configuration; basePath?: string; serverIndex?: number; baseOptions?: any; @@ -44,6 +55,17 @@ export class Configuration { * @param scopes oauth2 scope */ accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * parameter for aws4 signature security + * @param {Object} AWS4Signature - AWS4 Signature security + * @param {string} options.region - aws region + * @param {string} options.service - name of the service. + * @param {string} credentials.accessKeyId - aws access key id + * @param {string} credentials.secretAccessKey - aws access key + * @param {string} credentials.sessionToken - aws session token + * @memberof Configuration + */ + awsv4?: AWSv4Configuration; /** * override base path */ @@ -70,6 +92,7 @@ export class Configuration { this.username = param.username; this.password = param.password; this.accessToken = param.accessToken; + this.awsv4 = param.awsv4; this.basePath = param.basePath; this.serverIndex = param.serverIndex; this.baseOptions = { diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/common.ts b/samples/client/petstore/typescript-axios/builds/test-petstore/common.ts index 0a5b63b231ff..9c52b9dbdba0 100644 --- a/samples/client/petstore/typescript-axios/builds/test-petstore/common.ts +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/common.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ - import type { Configuration } from "./configuration"; import type { RequestArgs } from "./base"; import type { AxiosInstance, AxiosResponse } from 'axios'; @@ -63,6 +62,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } } + function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { if (parameter == null) return; if (typeof parameter === "object") { diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/configuration.ts b/samples/client/petstore/typescript-axios/builds/test-petstore/configuration.ts index db98c9fdf6fe..fd140b74505c 100644 --- a/samples/client/petstore/typescript-axios/builds/test-petstore/configuration.ts +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/configuration.ts @@ -1,5 +1,4 @@ /* tslint:disable */ -/* eslint-disable */ /** * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ @@ -12,12 +11,24 @@ * Do not edit the class manually. */ +interface AWSv4Configuration { + options?: { + region?: string + service?: string + } + credentials?: { + accessKeyId?: string + secretAccessKey?: string, + sessionToken?: string + } +} export interface ConfigurationParameters { apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); username?: string; password?: string; accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + awsv4?: AWSv4Configuration; basePath?: string; serverIndex?: number; baseOptions?: any; @@ -44,6 +55,17 @@ export class Configuration { * @param scopes oauth2 scope */ accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * parameter for aws4 signature security + * @param {Object} AWS4Signature - AWS4 Signature security + * @param {string} options.region - aws region + * @param {string} options.service - name of the service. + * @param {string} credentials.accessKeyId - aws access key id + * @param {string} credentials.secretAccessKey - aws access key + * @param {string} credentials.sessionToken - aws session token + * @memberof Configuration + */ + awsv4?: AWSv4Configuration; /** * override base path */ @@ -70,6 +92,7 @@ export class Configuration { this.username = param.username; this.password = param.password; this.accessToken = param.accessToken; + this.awsv4 = param.awsv4; this.basePath = param.basePath; this.serverIndex = param.serverIndex; this.baseOptions = { diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/common.ts b/samples/client/petstore/typescript-axios/builds/with-complex-headers/common.ts index 48a99b2fb1e0..99397a86c102 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/common.ts +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/common.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ - import type { Configuration } from "./configuration"; import type { RequestArgs } from "./base"; import type { AxiosInstance, AxiosResponse } from 'axios'; @@ -63,6 +62,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } } + function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { if (parameter == null) return; if (typeof parameter === "object") { diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/configuration.ts b/samples/client/petstore/typescript-axios/builds/with-complex-headers/configuration.ts index c50ec4bf5d5b..77510956ab86 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/configuration.ts +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/configuration.ts @@ -1,5 +1,4 @@ /* tslint:disable */ -/* eslint-disable */ /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. @@ -12,12 +11,24 @@ * Do not edit the class manually. */ +interface AWSv4Configuration { + options?: { + region?: string + service?: string + } + credentials?: { + accessKeyId?: string + secretAccessKey?: string, + sessionToken?: string + } +} export interface ConfigurationParameters { apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); username?: string; password?: string; accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + awsv4?: AWSv4Configuration; basePath?: string; serverIndex?: number; baseOptions?: any; @@ -44,6 +55,17 @@ export class Configuration { * @param scopes oauth2 scope */ accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * parameter for aws4 signature security + * @param {Object} AWS4Signature - AWS4 Signature security + * @param {string} options.region - aws region + * @param {string} options.service - name of the service. + * @param {string} credentials.accessKeyId - aws access key id + * @param {string} credentials.secretAccessKey - aws access key + * @param {string} credentials.sessionToken - aws session token + * @memberof Configuration + */ + awsv4?: AWSv4Configuration; /** * override base path */ @@ -70,6 +92,7 @@ export class Configuration { this.username = param.username; this.password = param.password; this.accessToken = param.accessToken; + this.awsv4 = param.awsv4; this.basePath = param.basePath; this.serverIndex = param.serverIndex; this.baseOptions = { diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/common.ts b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/common.ts index 0a5b63b231ff..9c52b9dbdba0 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/common.ts +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/common.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ - import type { Configuration } from "./configuration"; import type { RequestArgs } from "./base"; import type { AxiosInstance, AxiosResponse } from 'axios'; @@ -63,6 +62,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } } + function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { if (parameter == null) return; if (typeof parameter === "object") { diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/configuration.ts b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/configuration.ts index db98c9fdf6fe..fd140b74505c 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/configuration.ts +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/configuration.ts @@ -1,5 +1,4 @@ /* tslint:disable */ -/* eslint-disable */ /** * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ @@ -12,12 +11,24 @@ * Do not edit the class manually. */ +interface AWSv4Configuration { + options?: { + region?: string + service?: string + } + credentials?: { + accessKeyId?: string + secretAccessKey?: string, + sessionToken?: string + } +} export interface ConfigurationParameters { apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); username?: string; password?: string; accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + awsv4?: AWSv4Configuration; basePath?: string; serverIndex?: number; baseOptions?: any; @@ -44,6 +55,17 @@ export class Configuration { * @param scopes oauth2 scope */ accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * parameter for aws4 signature security + * @param {Object} AWS4Signature - AWS4 Signature security + * @param {string} options.region - aws region + * @param {string} options.service - name of the service. + * @param {string} credentials.accessKeyId - aws access key id + * @param {string} credentials.secretAccessKey - aws access key + * @param {string} credentials.sessionToken - aws session token + * @memberof Configuration + */ + awsv4?: AWSv4Configuration; /** * override base path */ @@ -70,6 +92,7 @@ export class Configuration { this.username = param.username; this.password = param.password; this.accessToken = param.accessToken; + this.awsv4 = param.awsv4; this.basePath = param.basePath; this.serverIndex = param.serverIndex; this.baseOptions = { diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces-and-with-single-request-param/common.ts b/samples/client/petstore/typescript-axios/builds/with-interfaces-and-with-single-request-param/common.ts index 48a99b2fb1e0..99397a86c102 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces-and-with-single-request-param/common.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces-and-with-single-request-param/common.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ - import type { Configuration } from "./configuration"; import type { RequestArgs } from "./base"; import type { AxiosInstance, AxiosResponse } from 'axios'; @@ -63,6 +62,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } } + function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { if (parameter == null) return; if (typeof parameter === "object") { diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces-and-with-single-request-param/configuration.ts b/samples/client/petstore/typescript-axios/builds/with-interfaces-and-with-single-request-param/configuration.ts index c50ec4bf5d5b..77510956ab86 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces-and-with-single-request-param/configuration.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces-and-with-single-request-param/configuration.ts @@ -1,5 +1,4 @@ /* tslint:disable */ -/* eslint-disable */ /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. @@ -12,12 +11,24 @@ * Do not edit the class manually. */ +interface AWSv4Configuration { + options?: { + region?: string + service?: string + } + credentials?: { + accessKeyId?: string + secretAccessKey?: string, + sessionToken?: string + } +} export interface ConfigurationParameters { apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); username?: string; password?: string; accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + awsv4?: AWSv4Configuration; basePath?: string; serverIndex?: number; baseOptions?: any; @@ -44,6 +55,17 @@ export class Configuration { * @param scopes oauth2 scope */ accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * parameter for aws4 signature security + * @param {Object} AWS4Signature - AWS4 Signature security + * @param {string} options.region - aws region + * @param {string} options.service - name of the service. + * @param {string} credentials.accessKeyId - aws access key id + * @param {string} credentials.secretAccessKey - aws access key + * @param {string} credentials.sessionToken - aws session token + * @memberof Configuration + */ + awsv4?: AWSv4Configuration; /** * override base path */ @@ -70,6 +92,7 @@ export class Configuration { this.username = param.username; this.password = param.password; this.accessToken = param.accessToken; + this.awsv4 = param.awsv4; this.basePath = param.basePath; this.serverIndex = param.serverIndex; this.baseOptions = { diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/common.ts b/samples/client/petstore/typescript-axios/builds/with-interfaces/common.ts index 48a99b2fb1e0..99397a86c102 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/common.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/common.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ - import type { Configuration } from "./configuration"; import type { RequestArgs } from "./base"; import type { AxiosInstance, AxiosResponse } from 'axios'; @@ -63,6 +62,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } } + function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { if (parameter == null) return; if (typeof parameter === "object") { diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/configuration.ts b/samples/client/petstore/typescript-axios/builds/with-interfaces/configuration.ts index c50ec4bf5d5b..77510956ab86 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/configuration.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/configuration.ts @@ -1,5 +1,4 @@ /* tslint:disable */ -/* eslint-disable */ /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. @@ -12,12 +11,24 @@ * Do not edit the class manually. */ +interface AWSv4Configuration { + options?: { + region?: string + service?: string + } + credentials?: { + accessKeyId?: string + secretAccessKey?: string, + sessionToken?: string + } +} export interface ConfigurationParameters { apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); username?: string; password?: string; accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + awsv4?: AWSv4Configuration; basePath?: string; serverIndex?: number; baseOptions?: any; @@ -44,6 +55,17 @@ export class Configuration { * @param scopes oauth2 scope */ accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * parameter for aws4 signature security + * @param {Object} AWS4Signature - AWS4 Signature security + * @param {string} options.region - aws region + * @param {string} options.service - name of the service. + * @param {string} credentials.accessKeyId - aws access key id + * @param {string} credentials.secretAccessKey - aws access key + * @param {string} credentials.sessionToken - aws session token + * @memberof Configuration + */ + awsv4?: AWSv4Configuration; /** * override base path */ @@ -70,6 +92,7 @@ export class Configuration { this.username = param.username; this.password = param.password; this.accessToken = param.accessToken; + this.awsv4 = param.awsv4; this.basePath = param.basePath; this.serverIndex = param.serverIndex; this.baseOptions = { diff --git a/samples/client/petstore/typescript-axios/builds/with-node-imports/common.ts b/samples/client/petstore/typescript-axios/builds/with-node-imports/common.ts index 69c609709819..3be098b3f3f5 100644 --- a/samples/client/petstore/typescript-axios/builds/with-node-imports/common.ts +++ b/samples/client/petstore/typescript-axios/builds/with-node-imports/common.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ - import type { Configuration } from "./configuration"; import type { RequestArgs } from "./base"; import type { AxiosInstance, AxiosResponse } from 'axios'; @@ -64,6 +63,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } } + function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { if (parameter == null) return; if (typeof parameter === "object") { diff --git a/samples/client/petstore/typescript-axios/builds/with-node-imports/configuration.ts b/samples/client/petstore/typescript-axios/builds/with-node-imports/configuration.ts index c50ec4bf5d5b..77510956ab86 100644 --- a/samples/client/petstore/typescript-axios/builds/with-node-imports/configuration.ts +++ b/samples/client/petstore/typescript-axios/builds/with-node-imports/configuration.ts @@ -1,5 +1,4 @@ /* tslint:disable */ -/* eslint-disable */ /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. @@ -12,12 +11,24 @@ * Do not edit the class manually. */ +interface AWSv4Configuration { + options?: { + region?: string + service?: string + } + credentials?: { + accessKeyId?: string + secretAccessKey?: string, + sessionToken?: string + } +} export interface ConfigurationParameters { apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); username?: string; password?: string; accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + awsv4?: AWSv4Configuration; basePath?: string; serverIndex?: number; baseOptions?: any; @@ -44,6 +55,17 @@ export class Configuration { * @param scopes oauth2 scope */ accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * parameter for aws4 signature security + * @param {Object} AWS4Signature - AWS4 Signature security + * @param {string} options.region - aws region + * @param {string} options.service - name of the service. + * @param {string} credentials.accessKeyId - aws access key id + * @param {string} credentials.secretAccessKey - aws access key + * @param {string} credentials.sessionToken - aws session token + * @memberof Configuration + */ + awsv4?: AWSv4Configuration; /** * override base path */ @@ -70,6 +92,7 @@ export class Configuration { this.username = param.username; this.password = param.password; this.accessToken = param.accessToken; + this.awsv4 = param.awsv4; this.basePath = param.basePath; this.serverIndex = param.serverIndex; this.baseOptions = { diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/common.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/common.ts index 48a99b2fb1e0..99397a86c102 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/common.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/common.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ - import type { Configuration } from "./configuration"; import type { RequestArgs } from "./base"; import type { AxiosInstance, AxiosResponse } from 'axios'; @@ -63,6 +62,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } } + function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { if (parameter == null) return; if (typeof parameter === "object") { diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/configuration.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/configuration.ts index c50ec4bf5d5b..77510956ab86 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/configuration.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/configuration.ts @@ -1,5 +1,4 @@ /* tslint:disable */ -/* eslint-disable */ /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. @@ -12,12 +11,24 @@ * Do not edit the class manually. */ +interface AWSv4Configuration { + options?: { + region?: string + service?: string + } + credentials?: { + accessKeyId?: string + secretAccessKey?: string, + sessionToken?: string + } +} export interface ConfigurationParameters { apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); username?: string; password?: string; accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + awsv4?: AWSv4Configuration; basePath?: string; serverIndex?: number; baseOptions?: any; @@ -44,6 +55,17 @@ export class Configuration { * @param scopes oauth2 scope */ accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * parameter for aws4 signature security + * @param {Object} AWS4Signature - AWS4 Signature security + * @param {string} options.region - aws region + * @param {string} options.service - name of the service. + * @param {string} credentials.accessKeyId - aws access key id + * @param {string} credentials.secretAccessKey - aws access key + * @param {string} credentials.sessionToken - aws session token + * @memberof Configuration + */ + awsv4?: AWSv4Configuration; /** * override base path */ @@ -70,6 +92,7 @@ export class Configuration { this.username = param.username; this.password = param.password; this.accessToken = param.accessToken; + this.awsv4 = param.awsv4; this.basePath = param.basePath; this.serverIndex = param.serverIndex; this.baseOptions = { diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/common.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version/common.ts index 48a99b2fb1e0..99397a86c102 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/common.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/common.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ - import type { Configuration } from "./configuration"; import type { RequestArgs } from "./base"; import type { AxiosInstance, AxiosResponse } from 'axios'; @@ -63,6 +62,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } } + function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { if (parameter == null) return; if (typeof parameter === "object") { diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/configuration.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version/configuration.ts index c50ec4bf5d5b..77510956ab86 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/configuration.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/configuration.ts @@ -1,5 +1,4 @@ /* tslint:disable */ -/* eslint-disable */ /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. @@ -12,12 +11,24 @@ * Do not edit the class manually. */ +interface AWSv4Configuration { + options?: { + region?: string + service?: string + } + credentials?: { + accessKeyId?: string + secretAccessKey?: string, + sessionToken?: string + } +} export interface ConfigurationParameters { apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); username?: string; password?: string; accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + awsv4?: AWSv4Configuration; basePath?: string; serverIndex?: number; baseOptions?: any; @@ -44,6 +55,17 @@ export class Configuration { * @param scopes oauth2 scope */ accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * parameter for aws4 signature security + * @param {Object} AWS4Signature - AWS4 Signature security + * @param {string} options.region - aws region + * @param {string} options.service - name of the service. + * @param {string} credentials.accessKeyId - aws access key id + * @param {string} credentials.secretAccessKey - aws access key + * @param {string} credentials.sessionToken - aws session token + * @memberof Configuration + */ + awsv4?: AWSv4Configuration; /** * override base path */ @@ -70,6 +92,7 @@ export class Configuration { this.username = param.username; this.password = param.password; this.accessToken = param.accessToken; + this.awsv4 = param.awsv4; this.basePath = param.basePath; this.serverIndex = param.serverIndex; this.baseOptions = { diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/common.ts b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/common.ts index 48a99b2fb1e0..99397a86c102 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/common.ts +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/common.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ - import type { Configuration } from "./configuration"; import type { RequestArgs } from "./base"; import type { AxiosInstance, AxiosResponse } from 'axios'; @@ -63,6 +62,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } } + function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { if (parameter == null) return; if (typeof parameter === "object") { diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/configuration.ts b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/configuration.ts index c50ec4bf5d5b..77510956ab86 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/configuration.ts +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/configuration.ts @@ -1,5 +1,4 @@ /* tslint:disable */ -/* eslint-disable */ /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. @@ -12,12 +11,24 @@ * Do not edit the class manually. */ +interface AWSv4Configuration { + options?: { + region?: string + service?: string + } + credentials?: { + accessKeyId?: string + secretAccessKey?: string, + sessionToken?: string + } +} export interface ConfigurationParameters { apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); username?: string; password?: string; accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + awsv4?: AWSv4Configuration; basePath?: string; serverIndex?: number; baseOptions?: any; @@ -44,6 +55,17 @@ export class Configuration { * @param scopes oauth2 scope */ accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * parameter for aws4 signature security + * @param {Object} AWS4Signature - AWS4 Signature security + * @param {string} options.region - aws region + * @param {string} options.service - name of the service. + * @param {string} credentials.accessKeyId - aws access key id + * @param {string} credentials.secretAccessKey - aws access key + * @param {string} credentials.sessionToken - aws session token + * @memberof Configuration + */ + awsv4?: AWSv4Configuration; /** * override base path */ @@ -70,6 +92,7 @@ export class Configuration { this.username = param.username; this.password = param.password; this.accessToken = param.accessToken; + this.awsv4 = param.awsv4; this.basePath = param.basePath; this.serverIndex = param.serverIndex; this.baseOptions = { diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/common.ts b/samples/client/petstore/typescript-axios/builds/with-string-enums/common.ts index 48a99b2fb1e0..99397a86c102 100644 --- a/samples/client/petstore/typescript-axios/builds/with-string-enums/common.ts +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/common.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ - import type { Configuration } from "./configuration"; import type { RequestArgs } from "./base"; import type { AxiosInstance, AxiosResponse } from 'axios'; @@ -63,6 +62,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } } + function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { if (parameter == null) return; if (typeof parameter === "object") { diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/configuration.ts b/samples/client/petstore/typescript-axios/builds/with-string-enums/configuration.ts index c50ec4bf5d5b..77510956ab86 100644 --- a/samples/client/petstore/typescript-axios/builds/with-string-enums/configuration.ts +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/configuration.ts @@ -1,5 +1,4 @@ /* tslint:disable */ -/* eslint-disable */ /** * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. @@ -12,12 +11,24 @@ * Do not edit the class manually. */ +interface AWSv4Configuration { + options?: { + region?: string + service?: string + } + credentials?: { + accessKeyId?: string + secretAccessKey?: string, + sessionToken?: string + } +} export interface ConfigurationParameters { apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); username?: string; password?: string; accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + awsv4?: AWSv4Configuration; basePath?: string; serverIndex?: number; baseOptions?: any; @@ -44,6 +55,17 @@ export class Configuration { * @param scopes oauth2 scope */ accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * parameter for aws4 signature security + * @param {Object} AWS4Signature - AWS4 Signature security + * @param {string} options.region - aws region + * @param {string} options.service - name of the service. + * @param {string} credentials.accessKeyId - aws access key id + * @param {string} credentials.secretAccessKey - aws access key + * @param {string} credentials.sessionToken - aws session token + * @memberof Configuration + */ + awsv4?: AWSv4Configuration; /** * override base path */ @@ -70,6 +92,7 @@ export class Configuration { this.username = param.username; this.password = param.password; this.accessToken = param.accessToken; + this.awsv4 = param.awsv4; this.basePath = param.basePath; this.serverIndex = param.serverIndex; this.baseOptions = {