diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache index 6d6d0febbf1e..f5576424924a 100755 --- a/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache @@ -38,8 +38,10 @@ export interface RequestArgs { */ export class BaseAPI { protected configuration: Configuration | undefined; + protected basePath: string | undefined; + protected axios: AxiosInstance | undefined; - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) { if (configuration) { this.configuration = configuration; this.basePath = configuration.basePath || this.basePath; @@ -54,7 +56,9 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - constructor(public field: string, msg?: string) { + public field: string | undefined + + constructor(field: string, msg?: string) { super(msg); this.name = "RequiredError" } diff --git a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/base.ts b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/base.ts index 0f9241761b2f..71e7e13a13a4 100644 --- a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/base.ts +++ b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/base.ts @@ -49,8 +49,10 @@ export interface RequestArgs { */ export class BaseAPI { protected configuration: Configuration | undefined; + protected basePath: string | undefined; + protected axios: AxiosInstance | undefined; - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) { if (configuration) { this.configuration = configuration; this.basePath = configuration.basePath || this.basePath; @@ -65,7 +67,9 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - constructor(public field: string, msg?: string) { + public field: string | undefined + + constructor(field: string, msg?: string) { super(msg); this.name = "RequiredError" } diff --git a/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts b/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts index d24c18a6aed5..b7c44369bef4 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts @@ -49,8 +49,10 @@ export interface RequestArgs { */ export class BaseAPI { protected configuration: Configuration | undefined; + protected basePath: string | undefined; + protected axios: AxiosInstance | undefined; - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) { if (configuration) { this.configuration = configuration; this.basePath = configuration.basePath || this.basePath; @@ -65,7 +67,9 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - constructor(public field: string, msg?: string) { + public field: string | undefined + + constructor(field: string, msg?: string) { super(msg); this.name = "RequiredError" } diff --git a/samples/client/petstore/typescript-axios/builds/default/base.ts b/samples/client/petstore/typescript-axios/builds/default/base.ts index 6a80fbd4e509..52f4c0da7865 100644 --- a/samples/client/petstore/typescript-axios/builds/default/base.ts +++ b/samples/client/petstore/typescript-axios/builds/default/base.ts @@ -49,8 +49,10 @@ export interface RequestArgs { */ export class BaseAPI { protected configuration: Configuration | undefined; + protected basePath: string | undefined; + protected axios: AxiosInstance | undefined; - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) { if (configuration) { this.configuration = configuration; this.basePath = configuration.basePath || this.basePath; @@ -65,7 +67,9 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - constructor(public field: string, msg?: string) { + public field: string | undefined + + constructor(field: string, msg?: string) { super(msg); this.name = "RequiredError" } diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/base.ts b/samples/client/petstore/typescript-axios/builds/es6-target/base.ts index 6a80fbd4e509..52f4c0da7865 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/base.ts +++ b/samples/client/petstore/typescript-axios/builds/es6-target/base.ts @@ -49,8 +49,10 @@ export interface RequestArgs { */ export class BaseAPI { protected configuration: Configuration | undefined; + protected basePath: string | undefined; + protected axios: AxiosInstance | undefined; - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) { if (configuration) { this.configuration = configuration; this.basePath = configuration.basePath || this.basePath; @@ -65,7 +67,9 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - constructor(public field: string, msg?: string) { + public field: string | undefined + + constructor(field: string, msg?: string) { super(msg); this.name = "RequiredError" } diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts b/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts index de8321eac184..f25ec0331d0a 100644 --- a/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts @@ -49,8 +49,10 @@ export interface RequestArgs { */ export class BaseAPI { protected configuration: Configuration | undefined; + protected basePath: string | undefined; + protected axios: AxiosInstance | undefined; - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) { if (configuration) { this.configuration = configuration; this.basePath = configuration.basePath || this.basePath; @@ -65,7 +67,9 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - constructor(public field: string, msg?: string) { + public field: string | undefined + + constructor(field: string, msg?: string) { super(msg); this.name = "RequiredError" } diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts b/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts index 6a80fbd4e509..52f4c0da7865 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts @@ -49,8 +49,10 @@ export interface RequestArgs { */ export class BaseAPI { protected configuration: Configuration | undefined; + protected basePath: string | undefined; + protected axios: AxiosInstance | undefined; - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) { if (configuration) { this.configuration = configuration; this.basePath = configuration.basePath || this.basePath; @@ -65,7 +67,9 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - constructor(public field: string, msg?: string) { + public field: string | undefined + + constructor(field: string, msg?: string) { super(msg); this.name = "RequiredError" } diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts index de8321eac184..f25ec0331d0a 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts @@ -49,8 +49,10 @@ export interface RequestArgs { */ export class BaseAPI { protected configuration: Configuration | undefined; + protected basePath: string | undefined; + protected axios: AxiosInstance | undefined; - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) { if (configuration) { this.configuration = configuration; this.basePath = configuration.basePath || this.basePath; @@ -65,7 +67,9 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - constructor(public field: string, msg?: string) { + public field: string | undefined + + constructor(field: string, msg?: string) { super(msg); this.name = "RequiredError" } diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts b/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts index 6a80fbd4e509..52f4c0da7865 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts @@ -49,8 +49,10 @@ export interface RequestArgs { */ export class BaseAPI { protected configuration: Configuration | undefined; + protected basePath: string | undefined; + protected axios: AxiosInstance | undefined; - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) { if (configuration) { this.configuration = configuration; this.basePath = configuration.basePath || this.basePath; @@ -65,7 +67,9 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - constructor(public field: string, msg?: string) { + public field: string | undefined + + constructor(field: string, msg?: string) { super(msg); this.name = "RequiredError" } diff --git a/samples/client/petstore/typescript-axios/builds/with-node-imports/base.ts b/samples/client/petstore/typescript-axios/builds/with-node-imports/base.ts index 6a80fbd4e509..52f4c0da7865 100644 --- a/samples/client/petstore/typescript-axios/builds/with-node-imports/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-node-imports/base.ts @@ -49,8 +49,10 @@ export interface RequestArgs { */ export class BaseAPI { protected configuration: Configuration | undefined; + protected basePath: string | undefined; + protected axios: AxiosInstance | undefined; - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) { if (configuration) { this.configuration = configuration; this.basePath = configuration.basePath || this.basePath; @@ -65,7 +67,9 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - constructor(public field: string, msg?: string) { + public field: string | undefined + + constructor(field: string, msg?: string) { super(msg); this.name = "RequiredError" } diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts index 6a80fbd4e509..52f4c0da7865 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts @@ -49,8 +49,10 @@ export interface RequestArgs { */ export class BaseAPI { protected configuration: Configuration | undefined; + protected basePath: string | undefined; + protected axios: AxiosInstance | undefined; - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) { if (configuration) { this.configuration = configuration; this.basePath = configuration.basePath || this.basePath; @@ -65,7 +67,9 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - constructor(public field: string, msg?: string) { + public field: string | undefined + + constructor(field: string, msg?: string) { super(msg); this.name = "RequiredError" } diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts index 6a80fbd4e509..52f4c0da7865 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts @@ -49,8 +49,10 @@ export interface RequestArgs { */ export class BaseAPI { protected configuration: Configuration | undefined; + protected basePath: string | undefined; + protected axios: AxiosInstance | undefined; - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) { if (configuration) { this.configuration = configuration; this.basePath = configuration.basePath || this.basePath; @@ -65,7 +67,9 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - constructor(public field: string, msg?: string) { + public field: string | undefined + + constructor(field: string, msg?: string) { super(msg); this.name = "RequiredError" } diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts index 6a80fbd4e509..52f4c0da7865 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts @@ -49,8 +49,10 @@ export interface RequestArgs { */ export class BaseAPI { protected configuration: Configuration | undefined; + protected basePath: string | undefined; + protected axios: AxiosInstance | undefined; - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) { if (configuration) { this.configuration = configuration; this.basePath = configuration.basePath || this.basePath; @@ -65,7 +67,9 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - constructor(public field: string, msg?: string) { + public field: string | undefined + + constructor(field: string, msg?: string) { super(msg); this.name = "RequiredError" } diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts b/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts index 6a80fbd4e509..52f4c0da7865 100644 --- a/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts @@ -49,8 +49,10 @@ export interface RequestArgs { */ export class BaseAPI { protected configuration: Configuration | undefined; + protected basePath: string | undefined; + protected axios: AxiosInstance | undefined; - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) { if (configuration) { this.configuration = configuration; this.basePath = configuration.basePath || this.basePath; @@ -65,7 +67,9 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - constructor(public field: string, msg?: string) { + public field: string | undefined + + constructor(field: string, msg?: string) { super(msg); this.name = "RequiredError" }