From f5ff651cf5fb27d492012ea3bce55167711f4ca2 Mon Sep 17 00:00:00 2001 From: Nikos Atlas Date: Wed, 27 Aug 2025 11:51:44 +0200 Subject: [PATCH 1/4] add missing typeRoots config on tsconfig --- .../src/main/resources/typescript/tsconfig.mustache | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache index 41c29f4da44c..1a0321809583 100644 --- a/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache @@ -11,6 +11,9 @@ {{/supportsES6}} "moduleResolution": "node", "declaration": true, + "typeRoots": [ + "node_modules/@types" + ] /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) From bc13b1d8e8e60849d91469c4e066526d3e7423c1 Mon Sep 17 00:00:00 2001 From: Nikos Atlas Date: Wed, 27 Aug 2025 12:05:20 +0200 Subject: [PATCH 2/4] add samples --- samples/client/echo_api/typescript/build/tsconfig.json | 3 +++ .../others/typescript/builds/array-of-lists/tsconfig.json | 3 +++ .../others/typescript/builds/enum-single-value/tsconfig.json | 3 +++ .../others/typescript/builds/null-types-simple/tsconfig.json | 3 +++ .../others/typescript/builds/with-unique-items/tsconfig.json | 3 +++ .../client/others/typescript/encode-decode/build/tsconfig.json | 3 +++ .../client/petstore/typescript/builds/browser/tsconfig.json | 3 +++ .../petstore/typescript/builds/composed-schemas/tsconfig.json | 3 +++ .../client/petstore/typescript/builds/default/tsconfig.json | 3 +++ .../petstore/typescript/builds/explode-query/tsconfig.json | 3 +++ .../client/petstore/typescript/builds/inversify/tsconfig.json | 3 +++ .../client/petstore/typescript/builds/jquery/tsconfig.json | 3 +++ .../petstore/typescript/builds/nullable-enum/tsconfig.json | 3 +++ .../petstore/typescript/builds/object_params/tsconfig.json | 3 +++ 14 files changed, 42 insertions(+) diff --git a/samples/client/echo_api/typescript/build/tsconfig.json b/samples/client/echo_api/typescript/build/tsconfig.json index 98956dc9c6c6..aed43a00b8ba 100644 --- a/samples/client/echo_api/typescript/build/tsconfig.json +++ b/samples/client/echo_api/typescript/build/tsconfig.json @@ -5,6 +5,9 @@ "target": "es5", "moduleResolution": "node", "declaration": true, + "typeRoots": [ + "node_modules/@types" + ] /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) diff --git a/samples/client/others/typescript/builds/array-of-lists/tsconfig.json b/samples/client/others/typescript/builds/array-of-lists/tsconfig.json index b5f1ee70e9cb..b444bc896c10 100644 --- a/samples/client/others/typescript/builds/array-of-lists/tsconfig.json +++ b/samples/client/others/typescript/builds/array-of-lists/tsconfig.json @@ -5,6 +5,9 @@ "target": "es5", "moduleResolution": "node", "declaration": true, + "typeRoots": [ + "node_modules/@types" + ] /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) diff --git a/samples/client/others/typescript/builds/enum-single-value/tsconfig.json b/samples/client/others/typescript/builds/enum-single-value/tsconfig.json index b5f1ee70e9cb..b444bc896c10 100644 --- a/samples/client/others/typescript/builds/enum-single-value/tsconfig.json +++ b/samples/client/others/typescript/builds/enum-single-value/tsconfig.json @@ -5,6 +5,9 @@ "target": "es5", "moduleResolution": "node", "declaration": true, + "typeRoots": [ + "node_modules/@types" + ] /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) diff --git a/samples/client/others/typescript/builds/null-types-simple/tsconfig.json b/samples/client/others/typescript/builds/null-types-simple/tsconfig.json index b5f1ee70e9cb..b444bc896c10 100644 --- a/samples/client/others/typescript/builds/null-types-simple/tsconfig.json +++ b/samples/client/others/typescript/builds/null-types-simple/tsconfig.json @@ -5,6 +5,9 @@ "target": "es5", "moduleResolution": "node", "declaration": true, + "typeRoots": [ + "node_modules/@types" + ] /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) diff --git a/samples/client/others/typescript/builds/with-unique-items/tsconfig.json b/samples/client/others/typescript/builds/with-unique-items/tsconfig.json index b5f1ee70e9cb..b444bc896c10 100644 --- a/samples/client/others/typescript/builds/with-unique-items/tsconfig.json +++ b/samples/client/others/typescript/builds/with-unique-items/tsconfig.json @@ -5,6 +5,9 @@ "target": "es5", "moduleResolution": "node", "declaration": true, + "typeRoots": [ + "node_modules/@types" + ] /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) diff --git a/samples/client/others/typescript/encode-decode/build/tsconfig.json b/samples/client/others/typescript/encode-decode/build/tsconfig.json index 98956dc9c6c6..aed43a00b8ba 100644 --- a/samples/client/others/typescript/encode-decode/build/tsconfig.json +++ b/samples/client/others/typescript/encode-decode/build/tsconfig.json @@ -5,6 +5,9 @@ "target": "es5", "moduleResolution": "node", "declaration": true, + "typeRoots": [ + "node_modules/@types" + ] /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/browser/tsconfig.json index 4f23fa5addd6..e5f4a3e481d6 100644 --- a/samples/openapi3/client/petstore/typescript/builds/browser/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/browser/tsconfig.json @@ -6,6 +6,9 @@ "esModuleInterop": true, "moduleResolution": "node", "declaration": true, + "typeRoots": [ + "node_modules/@types" + ] /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json index b5f1ee70e9cb..b444bc896c10 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json @@ -5,6 +5,9 @@ "target": "es5", "moduleResolution": "node", "declaration": true, + "typeRoots": [ + "node_modules/@types" + ] /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) diff --git a/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json index 98956dc9c6c6..aed43a00b8ba 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json @@ -5,6 +5,9 @@ "target": "es5", "moduleResolution": "node", "declaration": true, + "typeRoots": [ + "node_modules/@types" + ] /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) diff --git a/samples/openapi3/client/petstore/typescript/builds/explode-query/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/explode-query/tsconfig.json index 98956dc9c6c6..aed43a00b8ba 100644 --- a/samples/openapi3/client/petstore/typescript/builds/explode-query/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/explode-query/tsconfig.json @@ -5,6 +5,9 @@ "target": "es5", "moduleResolution": "node", "declaration": true, + "typeRoots": [ + "node_modules/@types" + ] /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json index cc0b2b2a3795..d9e82ad81357 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json @@ -6,6 +6,9 @@ "esModuleInterop": true, "moduleResolution": "node", "declaration": true, + "typeRoots": [ + "node_modules/@types" + ] /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json index b5f1ee70e9cb..b444bc896c10 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json @@ -5,6 +5,9 @@ "target": "es5", "moduleResolution": "node", "declaration": true, + "typeRoots": [ + "node_modules/@types" + ] /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) diff --git a/samples/openapi3/client/petstore/typescript/builds/nullable-enum/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/nullable-enum/tsconfig.json index b5f1ee70e9cb..b444bc896c10 100644 --- a/samples/openapi3/client/petstore/typescript/builds/nullable-enum/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/nullable-enum/tsconfig.json @@ -5,6 +5,9 @@ "target": "es5", "moduleResolution": "node", "declaration": true, + "typeRoots": [ + "node_modules/@types" + ] /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json index 98956dc9c6c6..aed43a00b8ba 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json @@ -5,6 +5,9 @@ "target": "es5", "moduleResolution": "node", "declaration": true, + "typeRoots": [ + "node_modules/@types" + ] /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) From 108cf79f8a76f5e761007b73ded63d8cd3542248 Mon Sep 17 00:00:00 2001 From: Nikos Atlas Date: Wed, 27 Aug 2025 12:21:59 +0200 Subject: [PATCH 3/4] Apply suggestion from @macjohnny Co-authored-by: Esteban Gehring --- .../src/main/resources/typescript/tsconfig.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache index 1a0321809583..894b2ef9d3a0 100644 --- a/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache @@ -13,7 +13,7 @@ "declaration": true, "typeRoots": [ "node_modules/@types" - ] + ], /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) From ba342ab5be7c5b912413b532245028beb1cb7c5c Mon Sep 17 00:00:00 2001 From: Nikos Atlas Date: Wed, 27 Aug 2025 12:32:53 +0200 Subject: [PATCH 4/4] update samples --- samples/client/echo_api/typescript/build/tsconfig.json | 2 +- .../others/typescript/builds/array-of-lists/tsconfig.json | 2 +- .../others/typescript/builds/enum-single-value/tsconfig.json | 2 +- .../others/typescript/builds/null-types-simple/tsconfig.json | 2 +- .../others/typescript/builds/with-unique-items/tsconfig.json | 2 +- .../client/others/typescript/encode-decode/build/tsconfig.json | 2 +- .../client/petstore/typescript/builds/browser/tsconfig.json | 2 +- .../petstore/typescript/builds/composed-schemas/tsconfig.json | 2 +- .../client/petstore/typescript/builds/default/tsconfig.json | 2 +- .../petstore/typescript/builds/explode-query/tsconfig.json | 2 +- .../client/petstore/typescript/builds/inversify/tsconfig.json | 2 +- .../client/petstore/typescript/builds/jquery/tsconfig.json | 2 +- .../petstore/typescript/builds/nullable-enum/tsconfig.json | 2 +- .../petstore/typescript/builds/object_params/tsconfig.json | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/samples/client/echo_api/typescript/build/tsconfig.json b/samples/client/echo_api/typescript/build/tsconfig.json index aed43a00b8ba..953996de3971 100644 --- a/samples/client/echo_api/typescript/build/tsconfig.json +++ b/samples/client/echo_api/typescript/build/tsconfig.json @@ -7,7 +7,7 @@ "declaration": true, "typeRoots": [ "node_modules/@types" - ] + ], /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) diff --git a/samples/client/others/typescript/builds/array-of-lists/tsconfig.json b/samples/client/others/typescript/builds/array-of-lists/tsconfig.json index b444bc896c10..d6a3507bd4c5 100644 --- a/samples/client/others/typescript/builds/array-of-lists/tsconfig.json +++ b/samples/client/others/typescript/builds/array-of-lists/tsconfig.json @@ -7,7 +7,7 @@ "declaration": true, "typeRoots": [ "node_modules/@types" - ] + ], /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) diff --git a/samples/client/others/typescript/builds/enum-single-value/tsconfig.json b/samples/client/others/typescript/builds/enum-single-value/tsconfig.json index b444bc896c10..d6a3507bd4c5 100644 --- a/samples/client/others/typescript/builds/enum-single-value/tsconfig.json +++ b/samples/client/others/typescript/builds/enum-single-value/tsconfig.json @@ -7,7 +7,7 @@ "declaration": true, "typeRoots": [ "node_modules/@types" - ] + ], /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) diff --git a/samples/client/others/typescript/builds/null-types-simple/tsconfig.json b/samples/client/others/typescript/builds/null-types-simple/tsconfig.json index b444bc896c10..d6a3507bd4c5 100644 --- a/samples/client/others/typescript/builds/null-types-simple/tsconfig.json +++ b/samples/client/others/typescript/builds/null-types-simple/tsconfig.json @@ -7,7 +7,7 @@ "declaration": true, "typeRoots": [ "node_modules/@types" - ] + ], /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) diff --git a/samples/client/others/typescript/builds/with-unique-items/tsconfig.json b/samples/client/others/typescript/builds/with-unique-items/tsconfig.json index b444bc896c10..d6a3507bd4c5 100644 --- a/samples/client/others/typescript/builds/with-unique-items/tsconfig.json +++ b/samples/client/others/typescript/builds/with-unique-items/tsconfig.json @@ -7,7 +7,7 @@ "declaration": true, "typeRoots": [ "node_modules/@types" - ] + ], /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) diff --git a/samples/client/others/typescript/encode-decode/build/tsconfig.json b/samples/client/others/typescript/encode-decode/build/tsconfig.json index aed43a00b8ba..953996de3971 100644 --- a/samples/client/others/typescript/encode-decode/build/tsconfig.json +++ b/samples/client/others/typescript/encode-decode/build/tsconfig.json @@ -7,7 +7,7 @@ "declaration": true, "typeRoots": [ "node_modules/@types" - ] + ], /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/browser/tsconfig.json index e5f4a3e481d6..43b5ae9e8b25 100644 --- a/samples/openapi3/client/petstore/typescript/builds/browser/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/browser/tsconfig.json @@ -8,7 +8,7 @@ "declaration": true, "typeRoots": [ "node_modules/@types" - ] + ], /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json index b444bc896c10..d6a3507bd4c5 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json @@ -7,7 +7,7 @@ "declaration": true, "typeRoots": [ "node_modules/@types" - ] + ], /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) diff --git a/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json index aed43a00b8ba..953996de3971 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json @@ -7,7 +7,7 @@ "declaration": true, "typeRoots": [ "node_modules/@types" - ] + ], /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) diff --git a/samples/openapi3/client/petstore/typescript/builds/explode-query/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/explode-query/tsconfig.json index aed43a00b8ba..953996de3971 100644 --- a/samples/openapi3/client/petstore/typescript/builds/explode-query/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/explode-query/tsconfig.json @@ -7,7 +7,7 @@ "declaration": true, "typeRoots": [ "node_modules/@types" - ] + ], /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json index d9e82ad81357..047850335fa7 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json @@ -8,7 +8,7 @@ "declaration": true, "typeRoots": [ "node_modules/@types" - ] + ], /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json index b444bc896c10..d6a3507bd4c5 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json @@ -7,7 +7,7 @@ "declaration": true, "typeRoots": [ "node_modules/@types" - ] + ], /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) diff --git a/samples/openapi3/client/petstore/typescript/builds/nullable-enum/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/nullable-enum/tsconfig.json index b444bc896c10..d6a3507bd4c5 100644 --- a/samples/openapi3/client/petstore/typescript/builds/nullable-enum/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/nullable-enum/tsconfig.json @@ -7,7 +7,7 @@ "declaration": true, "typeRoots": [ "node_modules/@types" - ] + ], /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json index aed43a00b8ba..953996de3971 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json @@ -7,7 +7,7 @@ "declaration": true, "typeRoots": [ "node_modules/@types" - ] + ], /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!)