From 436534fbba6dd0595f5fdc84c5eb83c0b6df1ff2 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 28 Apr 2026 14:43:43 +0800 Subject: [PATCH 1/9] ignore deprecation --- .../typescript-fetch/builds/with-npm-version/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json b/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json index 4567ec19899a..02a1d15d5bd0 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "declaration": true, "target": "es5", + "ignoreDeprecations": "6.0", "module": "commonjs", "moduleResolution": "node", "outDir": "dist", From a87fe0a9abf865827255a45275696e0797db2a0b Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 28 Apr 2026 14:45:49 +0800 Subject: [PATCH 2/9] fix --- .../typescript-fetch/builds/with-npm-version/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json b/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json index 02a1d15d5bd0..bd484b7075a0 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "declaration": true, "target": "es5", - "ignoreDeprecations": "6.0", + "ignoreDeprecations": "5.0", "module": "commonjs", "moduleResolution": "node", "outDir": "dist", From f5eba6c3b47ba02787a6ed9dbe7222619afb8ecc Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 28 Apr 2026 14:52:03 +0800 Subject: [PATCH 3/9] update template --- .../src/main/resources/typescript-fetch/tsconfig.mustache | 1 + .../petstore/typescript-fetch/builds/es6-target/tsconfig.json | 1 + .../builds/prefix-parameter-interfaces/tsconfig.json | 1 + .../typescript-fetch/builds/sagas-and-records/tsconfig.json | 1 + .../typescript-fetch/builds/without-runtime-checks/tsconfig.json | 1 + 5 files changed, 5 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/tsconfig.mustache index a8778b096590..638ca6cfcc67 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/tsconfig.mustache @@ -2,6 +2,7 @@ "compilerOptions": { "declaration": true, "target": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}es5{{/supportsES6}}", + "ignoreDeprecations": "{{#supportsES6}}6.0{{/supportsES6}}{{^supportsES6}}5.0{{/supportsES6}}", {{#sagasAndRecords}} "strict": true, {{/sagasAndRecords}} diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/tsconfig.json b/samples/client/petstore/typescript-fetch/builds/es6-target/tsconfig.json index 250280d9ab0e..aef21d8e7ee2 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/tsconfig.json +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "declaration": true, "target": "es6", + "ignoreDeprecations": "6.0", "module": "commonjs", "moduleResolution": "node", "outDir": "dist", diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/tsconfig.json b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/tsconfig.json index 4567ec19899a..bd484b7075a0 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/tsconfig.json +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "declaration": true, "target": "es5", + "ignoreDeprecations": "5.0", "module": "commonjs", "moduleResolution": "node", "outDir": "dist", diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/tsconfig.json b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/tsconfig.json index 5047f4d59a36..cc7b24361dc9 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/tsconfig.json +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "declaration": true, "target": "es6", + "ignoreDeprecations": "6.0", "strict": true, "module": "commonjs", "moduleResolution": "node", diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/tsconfig.json b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/tsconfig.json index 4567ec19899a..bd484b7075a0 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/tsconfig.json +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "declaration": true, "target": "es5", + "ignoreDeprecations": "5.0", "module": "commonjs", "moduleResolution": "node", "outDir": "dist", From c1bbd1f6e6a7d0ef09fcd0550ab9f32ade7b9d85 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 28 Apr 2026 15:00:58 +0800 Subject: [PATCH 4/9] switch --- bin/configs/typescript-fetch-with-npm-version.yaml | 1 + .../src/main/resources/typescript-fetch/tsconfig.mustache | 2 ++ .../petstore/typescript-fetch/builds/es6-target/tsconfig.json | 1 - .../builds/prefix-parameter-interfaces/tsconfig.json | 1 - .../typescript-fetch/builds/sagas-and-records/tsconfig.json | 1 - .../builds/without-runtime-checks/tsconfig.json | 1 - 6 files changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/configs/typescript-fetch-with-npm-version.yaml b/bin/configs/typescript-fetch-with-npm-version.yaml index cd669c5e0d2a..70c726ae813b 100644 --- a/bin/configs/typescript-fetch-with-npm-version.yaml +++ b/bin/configs/typescript-fetch-with-npm-version.yaml @@ -7,3 +7,4 @@ additionalProperties: npmName: '@openapitools/typescript-fetch-petstore' npmRepository: https://skimdb.npmjs.com/registry snapshot: false + ignoreDeprecations: true diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/tsconfig.mustache index 638ca6cfcc67..e8c9fd448a8b 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/tsconfig.mustache @@ -2,7 +2,9 @@ "compilerOptions": { "declaration": true, "target": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}es5{{/supportsES6}}", + {{#ignoreDeprecations}} "ignoreDeprecations": "{{#supportsES6}}6.0{{/supportsES6}}{{^supportsES6}}5.0{{/supportsES6}}", + {{/ignoreDeprecations}} {{#sagasAndRecords}} "strict": true, {{/sagasAndRecords}} diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/tsconfig.json b/samples/client/petstore/typescript-fetch/builds/es6-target/tsconfig.json index aef21d8e7ee2..250280d9ab0e 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/tsconfig.json +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/tsconfig.json @@ -2,7 +2,6 @@ "compilerOptions": { "declaration": true, "target": "es6", - "ignoreDeprecations": "6.0", "module": "commonjs", "moduleResolution": "node", "outDir": "dist", diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/tsconfig.json b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/tsconfig.json index bd484b7075a0..4567ec19899a 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/tsconfig.json +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/tsconfig.json @@ -2,7 +2,6 @@ "compilerOptions": { "declaration": true, "target": "es5", - "ignoreDeprecations": "5.0", "module": "commonjs", "moduleResolution": "node", "outDir": "dist", diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/tsconfig.json b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/tsconfig.json index cc7b24361dc9..5047f4d59a36 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/tsconfig.json +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/tsconfig.json @@ -2,7 +2,6 @@ "compilerOptions": { "declaration": true, "target": "es6", - "ignoreDeprecations": "6.0", "strict": true, "module": "commonjs", "moduleResolution": "node", diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/tsconfig.json b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/tsconfig.json index bd484b7075a0..4567ec19899a 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/tsconfig.json +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/tsconfig.json @@ -2,7 +2,6 @@ "compilerOptions": { "declaration": true, "target": "es5", - "ignoreDeprecations": "5.0", "module": "commonjs", "moduleResolution": "node", "outDir": "dist", From 333ee76e87481ad2e589ecc29e0fcbc39bb655ce Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 28 Apr 2026 15:09:01 +0800 Subject: [PATCH 5/9] test with es6 --- bin/configs/typescript-fetch-with-npm-version.yaml | 1 + .../builds/with-npm-version/.openapi-generator/FILES | 1 + .../typescript-fetch/builds/with-npm-version/package.json | 4 +++- .../builds/with-npm-version/tsconfig.esm.json | 7 +++++++ .../builds/with-npm-version/tsconfig.json | 8 ++------ 5 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.esm.json diff --git a/bin/configs/typescript-fetch-with-npm-version.yaml b/bin/configs/typescript-fetch-with-npm-version.yaml index 70c726ae813b..1642b15f1f9f 100644 --- a/bin/configs/typescript-fetch-with-npm-version.yaml +++ b/bin/configs/typescript-fetch-with-npm-version.yaml @@ -8,3 +8,4 @@ additionalProperties: npmRepository: https://skimdb.npmjs.com/registry snapshot: false ignoreDeprecations: true + supportsES6: true diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/FILES b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/FILES index 3cf2461a65c2..b7078082a023 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/FILES +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/FILES @@ -24,4 +24,5 @@ src/models/Tag.ts src/models/User.ts src/models/index.ts src/runtime.ts +tsconfig.esm.json tsconfig.json diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/package.json b/samples/client/petstore/typescript-fetch/builds/with-npm-version/package.json index 50d947e6258d..6d44ed32b0c2 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/package.json +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/package.json @@ -9,8 +9,10 @@ }, "main": "./dist/index.js", "types": "./dist/index.d.ts", + "module": "./dist/esm/index.js", + "sideEffects": false, "scripts": { - "build": "tsc", + "build": "tsc && tsc -p tsconfig.esm.json", "prepare": "npm run build" }, "devDependencies": { diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.esm.json b/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.esm.json new file mode 100644 index 000000000000..2c0331cce040 --- /dev/null +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.esm.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "esnext", + "outDir": "dist/esm" + } +} diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json b/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json index bd484b7075a0..aef21d8e7ee2 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json @@ -1,15 +1,11 @@ { "compilerOptions": { "declaration": true, - "target": "es5", - "ignoreDeprecations": "5.0", + "target": "es6", + "ignoreDeprecations": "6.0", "module": "commonjs", "moduleResolution": "node", "outDir": "dist", - "lib": [ - "es6", - "dom" - ], "typeRoots": [ "node_modules/@types" ] From 65fd40f8283dcf3b709da387d55d8a1c9c74fc0b Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 28 Apr 2026 15:22:10 +0800 Subject: [PATCH 6/9] Revert "test with es6" This reverts commit 333ee76e87481ad2e589ecc29e0fcbc39bb655ce. --- bin/configs/typescript-fetch-with-npm-version.yaml | 1 - .../builds/with-npm-version/.openapi-generator/FILES | 1 - .../typescript-fetch/builds/with-npm-version/package.json | 4 +--- .../builds/with-npm-version/tsconfig.esm.json | 7 ------- .../builds/with-npm-version/tsconfig.json | 8 ++++++-- 5 files changed, 7 insertions(+), 14 deletions(-) delete mode 100644 samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.esm.json diff --git a/bin/configs/typescript-fetch-with-npm-version.yaml b/bin/configs/typescript-fetch-with-npm-version.yaml index 1642b15f1f9f..70c726ae813b 100644 --- a/bin/configs/typescript-fetch-with-npm-version.yaml +++ b/bin/configs/typescript-fetch-with-npm-version.yaml @@ -8,4 +8,3 @@ additionalProperties: npmRepository: https://skimdb.npmjs.com/registry snapshot: false ignoreDeprecations: true - supportsES6: true diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/FILES b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/FILES index b7078082a023..3cf2461a65c2 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/FILES +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/FILES @@ -24,5 +24,4 @@ src/models/Tag.ts src/models/User.ts src/models/index.ts src/runtime.ts -tsconfig.esm.json tsconfig.json diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/package.json b/samples/client/petstore/typescript-fetch/builds/with-npm-version/package.json index 6d44ed32b0c2..50d947e6258d 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/package.json +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/package.json @@ -9,10 +9,8 @@ }, "main": "./dist/index.js", "types": "./dist/index.d.ts", - "module": "./dist/esm/index.js", - "sideEffects": false, "scripts": { - "build": "tsc && tsc -p tsconfig.esm.json", + "build": "tsc", "prepare": "npm run build" }, "devDependencies": { diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.esm.json b/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.esm.json deleted file mode 100644 index 2c0331cce040..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.esm.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "module": "esnext", - "outDir": "dist/esm" - } -} diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json b/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json index aef21d8e7ee2..bd484b7075a0 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json @@ -1,11 +1,15 @@ { "compilerOptions": { "declaration": true, - "target": "es6", - "ignoreDeprecations": "6.0", + "target": "es5", + "ignoreDeprecations": "5.0", "module": "commonjs", "moduleResolution": "node", "outDir": "dist", + "lib": [ + "es6", + "dom" + ], "typeRoots": [ "node_modules/@types" ] From e3c4a1dde121c243a80f57e6d4235ec141aec73b Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 28 Apr 2026 15:23:30 +0800 Subject: [PATCH 7/9] update --- bin/configs/typescript-fetch-with-npm-version.yaml | 2 +- .../src/main/resources/typescript-fetch/tsconfig.mustache | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/configs/typescript-fetch-with-npm-version.yaml b/bin/configs/typescript-fetch-with-npm-version.yaml index 70c726ae813b..45d0d64ac88c 100644 --- a/bin/configs/typescript-fetch-with-npm-version.yaml +++ b/bin/configs/typescript-fetch-with-npm-version.yaml @@ -7,4 +7,4 @@ additionalProperties: npmName: '@openapitools/typescript-fetch-petstore' npmRepository: https://skimdb.npmjs.com/registry snapshot: false - ignoreDeprecations: true + ignoreDeprecations: "5.0" diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/tsconfig.mustache index e8c9fd448a8b..7ae886030afe 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/tsconfig.mustache @@ -3,7 +3,7 @@ "declaration": true, "target": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}es5{{/supportsES6}}", {{#ignoreDeprecations}} - "ignoreDeprecations": "{{#supportsES6}}6.0{{/supportsES6}}{{^supportsES6}}5.0{{/supportsES6}}", + "ignoreDeprecations": "{{{.}}}", {{/ignoreDeprecations}} {{#sagasAndRecords}} "strict": true, From 902e2a05d084682a14f31e60397e685cd45702f6 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 28 Apr 2026 15:33:30 +0800 Subject: [PATCH 8/9] update --- bin/configs/typescript-fetch-with-npm-version.yaml | 2 +- .../typescript-fetch/builds/with-npm-version/tsconfig.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/configs/typescript-fetch-with-npm-version.yaml b/bin/configs/typescript-fetch-with-npm-version.yaml index 45d0d64ac88c..0f2096dbebad 100644 --- a/bin/configs/typescript-fetch-with-npm-version.yaml +++ b/bin/configs/typescript-fetch-with-npm-version.yaml @@ -7,4 +7,4 @@ additionalProperties: npmName: '@openapitools/typescript-fetch-petstore' npmRepository: https://skimdb.npmjs.com/registry snapshot: false - ignoreDeprecations: "5.0" + ignoreDeprecations: "6.0" diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json b/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json index bd484b7075a0..02a1d15d5bd0 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "declaration": true, "target": "es5", - "ignoreDeprecations": "5.0", + "ignoreDeprecations": "6.0", "module": "commonjs", "moduleResolution": "node", "outDir": "dist", From 6de6421afd8b798103f417ee681005a9a6170a60 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 28 Apr 2026 15:39:44 +0800 Subject: [PATCH 9/9] update --- bin/configs/typescript-fetch-with-npm-version.yaml | 2 +- .../typescript-fetch/builds/with-npm-version/tsconfig.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/configs/typescript-fetch-with-npm-version.yaml b/bin/configs/typescript-fetch-with-npm-version.yaml index 0f2096dbebad..45d0d64ac88c 100644 --- a/bin/configs/typescript-fetch-with-npm-version.yaml +++ b/bin/configs/typescript-fetch-with-npm-version.yaml @@ -7,4 +7,4 @@ additionalProperties: npmName: '@openapitools/typescript-fetch-petstore' npmRepository: https://skimdb.npmjs.com/registry snapshot: false - ignoreDeprecations: "6.0" + ignoreDeprecations: "5.0" diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json b/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json index 02a1d15d5bd0..bd484b7075a0 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "declaration": true, "target": "es5", - "ignoreDeprecations": "6.0", + "ignoreDeprecations": "5.0", "module": "commonjs", "moduleResolution": "node", "outDir": "dist",