From ff13923f55ebe840d20252830abd9f8ff5fdb1ef Mon Sep 17 00:00:00 2001 From: Richard Willis Date: Sat, 21 Aug 2021 07:32:32 +0100 Subject: [PATCH] [typescript-fetch] Fix config getter type issue (#10216) The return type now matches the config fetchApi type --- .../src/main/resources/typescript-fetch/runtime.mustache | 2 +- .../petstore/typescript-fetch/builds/default-v3.0/runtime.ts | 2 +- .../client/petstore/typescript-fetch/builds/default/runtime.ts | 2 +- samples/client/petstore/typescript-fetch/builds/enum/runtime.ts | 2 +- .../petstore/typescript-fetch/builds/es6-target/src/runtime.ts | 2 +- .../typescript-fetch/builds/multiple-parameters/runtime.ts | 2 +- .../builds/prefix-parameter-interfaces/src/runtime.ts | 2 +- .../typescript-fetch/builds/sagas-and-records/src/runtime.ts | 2 +- .../builds/typescript-three-plus/src/runtime.ts | 2 +- .../petstore/typescript-fetch/builds/with-interfaces/runtime.ts | 2 +- .../typescript-fetch/builds/with-npm-version/src/runtime.ts | 2 +- .../builds/without-runtime-checks/src/runtime.ts | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache index fb23ec78881..3d68d5a2adf 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache @@ -137,7 +137,7 @@ export class Configuration { return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; } - get fetchApi(): FetchAPI { + get fetchApi(): FetchAPI | undefined { return this.configuration.fetchApi; } diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/runtime.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/runtime.ts index a310e79b907..ad34f142a13 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/runtime.ts @@ -148,7 +148,7 @@ export class Configuration { return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; } - get fetchApi(): FetchAPI { + get fetchApi(): FetchAPI | undefined { return this.configuration.fetchApi; } diff --git a/samples/client/petstore/typescript-fetch/builds/default/runtime.ts b/samples/client/petstore/typescript-fetch/builds/default/runtime.ts index acfcb283280..14eb8eb3127 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/runtime.ts @@ -148,7 +148,7 @@ export class Configuration { return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; } - get fetchApi(): FetchAPI { + get fetchApi(): FetchAPI | undefined { return this.configuration.fetchApi; } diff --git a/samples/client/petstore/typescript-fetch/builds/enum/runtime.ts b/samples/client/petstore/typescript-fetch/builds/enum/runtime.ts index 1d73582a193..1c4540e2207 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/enum/runtime.ts @@ -148,7 +148,7 @@ export class Configuration { return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; } - get fetchApi(): FetchAPI { + get fetchApi(): FetchAPI | undefined { return this.configuration.fetchApi; } diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/runtime.ts index acfcb283280..14eb8eb3127 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/runtime.ts @@ -148,7 +148,7 @@ export class Configuration { return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; } - get fetchApi(): FetchAPI { + get fetchApi(): FetchAPI | undefined { return this.configuration.fetchApi; } diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts index acfcb283280..14eb8eb3127 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts @@ -148,7 +148,7 @@ export class Configuration { return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; } - get fetchApi(): FetchAPI { + get fetchApi(): FetchAPI | undefined { return this.configuration.fetchApi; } diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/runtime.ts index acfcb283280..14eb8eb3127 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/runtime.ts @@ -148,7 +148,7 @@ export class Configuration { return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; } - get fetchApi(): FetchAPI { + get fetchApi(): FetchAPI | undefined { return this.configuration.fetchApi; } diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/runtime.ts index fb1ccd134ef..fcb03abe66c 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/runtime.ts @@ -148,7 +148,7 @@ export class Configuration { return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; } - get fetchApi(): FetchAPI { + get fetchApi(): FetchAPI | undefined { return this.configuration.fetchApi; } diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/runtime.ts index fb1ccd134ef..fcb03abe66c 100644 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/runtime.ts @@ -148,7 +148,7 @@ export class Configuration { return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; } - get fetchApi(): FetchAPI { + get fetchApi(): FetchAPI | undefined { return this.configuration.fetchApi; } diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts index acfcb283280..14eb8eb3127 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts @@ -148,7 +148,7 @@ export class Configuration { return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; } - get fetchApi(): FetchAPI { + get fetchApi(): FetchAPI | undefined { return this.configuration.fetchApi; } diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/runtime.ts index acfcb283280..14eb8eb3127 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/runtime.ts @@ -148,7 +148,7 @@ export class Configuration { return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; } - get fetchApi(): FetchAPI { + get fetchApi(): FetchAPI | undefined { return this.configuration.fetchApi; } diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/runtime.ts index acfcb283280..14eb8eb3127 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/runtime.ts @@ -148,7 +148,7 @@ export class Configuration { return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; } - get fetchApi(): FetchAPI { + get fetchApi(): FetchAPI | undefined { return this.configuration.fetchApi; }