From 299122e36e4af2d86b25d4928b27d0ebe3872303 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Sep 2026 01:32:24 +0800 Subject: [PATCH 1/7] build(deps-dev): bump ip-address (#25045) Bumps [ip-address](https://github.com/beaugunderson/ip-address) from 10.4.0 to 10.7.2. - [Release notes](https://github.com/beaugunderson/ip-address/releases) - [Commits](https://github.com/beaugunderson/ip-address/compare/v10.4.0...v10.7.2) --- updated-dependencies: - dependency-name: ip-address dependency-version: 10.7.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../petstore/typescript-angular-v19/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/client/petstore/typescript-angular-v19/package-lock.json b/samples/client/petstore/typescript-angular-v19/package-lock.json index a37cd2b34303..dd58d9f4775c 100644 --- a/samples/client/petstore/typescript-angular-v19/package-lock.json +++ b/samples/client/petstore/typescript-angular-v19/package-lock.json @@ -10636,9 +10636,9 @@ } }, "node_modules/ip-address": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.4.0.tgz", - "integrity": "sha512-oSK96Grm3aP6OrS263xVxbNDGVL7rzBtYdpGqlDG8iQdoenDoTs/nkki+DflYbAEE8Xl6o5YxhxlrKvI3nqKXQ==", + "version": "10.7.2", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.7.2.tgz", + "integrity": "sha512-7H/2gFSIitxc0hG3nOI1glS8QLo/EHBFFLk8vEUjXY/xu0AdL8jZ9U1IzO2PUm0d2D/ofQcAifb0g6OBkt8U7w==", "dev": true, "license": "MIT", "engines": { From 06cb6cfef13c81d7be2a2efa1263c3be490f2c97 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Sep 2026 01:32:36 +0800 Subject: [PATCH 2/7] build(deps): bump ip-address (#25044) Bumps [ip-address](https://github.com/beaugunderson/ip-address) from 10.4.0 to 10.7.2. - [Release notes](https://github.com/beaugunderson/ip-address/releases) - [Commits](https://github.com/beaugunderson/ip-address/compare/v10.4.0...v10.7.2) --- updated-dependencies: - dependency-name: ip-address dependency-version: 10.7.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../tests/browser/package-lock.json | 34 ++++--------------- 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/samples/openapi3/client/petstore/typescript/tests/browser/package-lock.json b/samples/openapi3/client/petstore/typescript/tests/browser/package-lock.json index f0dee0d20865..052e2bc77061 100644 --- a/samples/openapi3/client/petstore/typescript/tests/browser/package-lock.json +++ b/samples/openapi3/client/petstore/typescript/tests/browser/package-lock.json @@ -2525,9 +2525,10 @@ } }, "node_modules/ip-address": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.4.0.tgz", - "integrity": "sha512-oSK96Grm3aP6OrS263xVxbNDGVL7rzBtYdpGqlDG8iQdoenDoTs/nkki+DflYbAEE8Xl6o5YxhxlrKvI3nqKXQ==", + "version": "10.7.2", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.7.2.tgz", + "integrity": "sha512-7H/2gFSIitxc0hG3nOI1glS8QLo/EHBFFLk8vEUjXY/xu0AdL8jZ9U1IzO2PUm0d2D/ofQcAifb0g6OBkt8U7w==", + "license": "MIT", "engines": { "node": ">= 12" } @@ -3454,20 +3455,6 @@ } } }, - "node_modules/puppeteer/node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "optional": true, - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, "node_modules/qs": { "version": "6.15.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.2.tgz", @@ -6073,9 +6060,9 @@ } }, "ip-address": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.4.0.tgz", - "integrity": "sha512-oSK96Grm3aP6OrS263xVxbNDGVL7rzBtYdpGqlDG8iQdoenDoTs/nkki+DflYbAEE8Xl6o5YxhxlrKvI3nqKXQ==" + "version": "10.7.2", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.7.2.tgz", + "integrity": "sha512-7H/2gFSIitxc0hG3nOI1glS8QLo/EHBFFLk8vEUjXY/xu0AdL8jZ9U1IzO2PUm0d2D/ofQcAifb0g6OBkt8U7w==" }, "ip-regex": { "version": "4.3.0", @@ -6702,13 +6689,6 @@ "js-yaml": "^4.1.0", "parse-json": "^5.2.0" } - }, - "typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "optional": true, - "peer": true } } }, From 482bbe90415ae8c023a674ef29f44cc67d4a072e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Sep 2026 01:33:19 +0800 Subject: [PATCH 3/7] build(deps): bump multer and @nestjs/platform-express (#25039) Bumps [multer](https://github.com/expressjs/multer) to 2.4.0 and updates ancestor dependency [@nestjs/platform-express](https://github.com/nestjs/nest/tree/HEAD/packages/platform-express). These dependencies need to be updated together. Updates `multer` from 2.2.0 to 2.4.0 - [Release notes](https://github.com/expressjs/multer/releases) - [Changelog](https://github.com/expressjs/multer/blob/main/CHANGELOG.md) - [Commits](https://github.com/expressjs/multer/compare/v2.2.0...v2.4.0) Updates `@nestjs/platform-express` from 11.1.28 to 11.2.6 - [Release notes](https://github.com/nestjs/nest/releases) - [Commits](https://github.com/nestjs/nest/commits/v11.2.6/packages/platform-express) --- updated-dependencies: - dependency-name: multer dependency-version: 2.4.0 dependency-type: indirect - dependency-name: "@nestjs/platform-express" dependency-version: 11.2.6 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../package-lock.json | 43 ++++++------------- .../typescript-nestjs-server/package.json | 2 +- 2 files changed, 14 insertions(+), 31 deletions(-) diff --git a/samples/server/petstore/typescript-nestjs-server/package-lock.json b/samples/server/petstore/typescript-nestjs-server/package-lock.json index 49faee73eb4f..f786b16183b8 100644 --- a/samples/server/petstore/typescript-nestjs-server/package-lock.json +++ b/samples/server/petstore/typescript-nestjs-server/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@nestjs/common": "^11.0.1", "@nestjs/core": "^11.1.18", - "@nestjs/platform-express": "^11.1.28", + "@nestjs/platform-express": "^11.2.6", "cookie-parser": "^1.4.7", "reflect-metadata": "^0.2.2", "rxjs": "^7.8.1" @@ -2398,14 +2398,14 @@ } }, "node_modules/@nestjs/platform-express": { - "version": "11.1.28", - "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-11.1.28.tgz", - "integrity": "sha512-hU+9Sz4m+onHrR5AmelI59QKmY/Re546bPnygnpqqeQdHDiJpBgjWbL4t6Jr73CBpS60cpyng7WzjgphNB9iwA==", + "version": "11.2.6", + "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-11.2.6.tgz", + "integrity": "sha512-jPypI/+aueizkYG2Bw2kg8GaNsWE7ekFBSQ/Rwet7wEdBA/+q2FA364UbDabqjlR7C3VSNHmP/JXh+8+jXyDOw==", "license": "MIT", "dependencies": { "cors": "2.8.6", "express": "5.2.1", - "multer": "2.2.0", + "multer": "2.4.0", "path-to-regexp": "8.4.2", "tslib": "2.8.1" }, @@ -4909,6 +4909,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, "license": "MIT" }, "node_modules/busboy": { @@ -5326,21 +5327,6 @@ "dev": true, "license": "MIT" }, - "node_modules/concat-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", - "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", - "engines": [ - "node >= 6.0" - ], - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.0.2", - "typedarray": "^0.0.6" - } - }, "node_modules/consola": { "version": "3.4.2", "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", @@ -8627,14 +8613,13 @@ "license": "MIT" }, "node_modules/multer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/multer/-/multer-2.2.0.tgz", - "integrity": "sha512-6rdyFg2kLrMh9Jee7/BMPuV9lEAd7lLW2YUpF9/YxR7njyoUwwQ0ZPh3TaIY50Sw6vlyD2HW3wGOkTS4P79xrQ==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/multer/-/multer-2.4.0.tgz", + "integrity": "sha512-7dqa0ZcFfzbefdTuIkzOSMvZWC0J7FLqBOjJUZvDCXShIURWKxAyTT1wHhnE5q19c7jOJf43IYYKjBmZVZmvhg==", "license": "MIT", "dependencies": { "append-field": "^1.0.0", "busboy": "^1.6.0", - "concat-stream": "^2.0.0", "type-is": "^1.6.18" }, "engines": { @@ -9451,6 +9436,7 @@ "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, "license": "MIT", "dependencies": { "inherits": "^2.0.3", @@ -9683,6 +9669,7 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, "funding": [ { "type": "github", @@ -10096,6 +10083,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, "license": "MIT", "dependencies": { "safe-buffer": "~5.2.0" @@ -10960,12 +10948,6 @@ "url": "https://opencollective.com/express" } }, - "node_modules/typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", - "license": "MIT" - }, "node_modules/typescript": { "version": "5.8.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", @@ -11109,6 +11091,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, "license": "MIT" }, "node_modules/v8-compile-cache-lib": { diff --git a/samples/server/petstore/typescript-nestjs-server/package.json b/samples/server/petstore/typescript-nestjs-server/package.json index 901d2eecac08..d1a23f302654 100644 --- a/samples/server/petstore/typescript-nestjs-server/package.json +++ b/samples/server/petstore/typescript-nestjs-server/package.json @@ -18,7 +18,7 @@ "dependencies": { "@nestjs/common": "^11.0.1", "@nestjs/core": "^11.1.18", - "@nestjs/platform-express": "^11.1.28", + "@nestjs/platform-express": "^11.2.6", "cookie-parser": "^1.4.7", "reflect-metadata": "^0.2.2", "rxjs": "^7.8.1" From 854531402f04b14112fb2c080b33663851958d44 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Sep 2026 01:35:35 +0800 Subject: [PATCH 4/7] build(deps): bump undici (#25043) Bumps [undici](https://github.com/nodejs/undici) from 7.29.0 to 7.30.0. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](https://github.com/nodejs/undici/compare/v7.29.0...v7.30.0) --- updated-dependencies: - dependency-name: undici dependency-version: 7.30.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../petstore/typescript/tests/jquery/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/openapi3/client/petstore/typescript/tests/jquery/package-lock.json b/samples/openapi3/client/petstore/typescript/tests/jquery/package-lock.json index 9bb30d70c64f..b684a923cc51 100644 --- a/samples/openapi3/client/petstore/typescript/tests/jquery/package-lock.json +++ b/samples/openapi3/client/petstore/typescript/tests/jquery/package-lock.json @@ -3603,9 +3603,9 @@ } }, "node_modules/undici": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-7.29.0.tgz", - "integrity": "sha512-IDxfleLmmbSskfWSUATiN1nfn2rDuvnMOqb5CWR92iIfojA0Ud+ulOAAEQ57LPr9rWmsreUyf5lwyao+7GNNVw==", + "version": "7.30.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.30.0.tgz", + "integrity": "sha512-dkrQXeHSaoamnItlYbmzG0wFYrM0ZwDxCIg0A7aKjTyyhh9svRzCNFEzV+Vm05/yehjCzjDZ31KXfGEjYSztDQ==", "license": "MIT", "engines": { "node": ">=20.18.1" From a01a87b32b44eca5c51c6bf5f4eab67b046ed71a Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 30 Sep 2026 02:27:56 +0800 Subject: [PATCH 5/7] update typescript undici dependency to newer version (#25051) --- .../src/main/resources/typescript/package.mustache | 2 +- samples/client/echo_api/typescript/build/package.json | 2 +- .../client/others/typescript/encode-decode/build/package.json | 2 +- .../client/petstore/typescript/builds/default/package.json | 2 +- .../petstore/typescript/builds/explode-query/package.json | 2 +- .../client/petstore/typescript/builds/inversify/package.json | 2 +- .../petstore/typescript/builds/object_params/package.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript/package.mustache b/modules/openapi-generator/src/main/resources/typescript/package.mustache index cd6a3d90c807..319918a36c8b 100644 --- a/modules/openapi-generator/src/main/resources/typescript/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/package.mustache @@ -44,7 +44,7 @@ {{#fetch-api}} {{#platforms}} {{#node}} - "undici": "^7.29.0", + "undici": "^7.29.1", {{/node}} {{#browser}} "whatwg-fetch": "^3.0.0", diff --git a/samples/client/echo_api/typescript/build/package.json b/samples/client/echo_api/typescript/build/package.json index 2849b0b82b3f..108b4e09a51c 100644 --- a/samples/client/echo_api/typescript/build/package.json +++ b/samples/client/echo_api/typescript/build/package.json @@ -32,7 +32,7 @@ "prepare": "npm run build" }, "dependencies": { - "undici": "^7.29.0", + "undici": "^7.29.1", "@types/node": "^20.17.10", "form-data": "^4.0.4", "es6-promise": "^4.2.4" diff --git a/samples/client/others/typescript/encode-decode/build/package.json b/samples/client/others/typescript/encode-decode/build/package.json index 50bcb10c42d8..dda9b95f2e27 100644 --- a/samples/client/others/typescript/encode-decode/build/package.json +++ b/samples/client/others/typescript/encode-decode/build/package.json @@ -32,7 +32,7 @@ "prepare": "npm run build" }, "dependencies": { - "undici": "^7.29.0", + "undici": "^7.29.1", "@types/node": "^20.17.10", "form-data": "^4.0.4", "es6-promise": "^4.2.4" diff --git a/samples/openapi3/client/petstore/typescript/builds/default/package.json b/samples/openapi3/client/petstore/typescript/builds/default/package.json index 231e91aa367f..5e954979f4bf 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/default/package.json @@ -32,7 +32,7 @@ "prepare": "npm run build" }, "dependencies": { - "undici": "^7.29.0", + "undici": "^7.29.1", "@types/node": "^20.17.10", "form-data": "^4.0.4", "es6-promise": "^4.2.4" diff --git a/samples/openapi3/client/petstore/typescript/builds/explode-query/package.json b/samples/openapi3/client/petstore/typescript/builds/explode-query/package.json index 231e91aa367f..5e954979f4bf 100644 --- a/samples/openapi3/client/petstore/typescript/builds/explode-query/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/explode-query/package.json @@ -32,7 +32,7 @@ "prepare": "npm run build" }, "dependencies": { - "undici": "^7.29.0", + "undici": "^7.29.1", "@types/node": "^20.17.10", "form-data": "^4.0.4", "es6-promise": "^4.2.4" diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/package.json b/samples/openapi3/client/petstore/typescript/builds/inversify/package.json index da09e76d2ec1..0e9c112fd4b7 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/package.json @@ -32,7 +32,7 @@ "prepare": "npm run build" }, "dependencies": { - "undici": "^7.29.0", + "undici": "^7.29.1", "@types/node": "^20.17.10", "form-data": "^4.0.4", "inversify": "^6.0.1", diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/package.json b/samples/openapi3/client/petstore/typescript/builds/object_params/package.json index 231e91aa367f..5e954979f4bf 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/package.json @@ -32,7 +32,7 @@ "prepare": "npm run build" }, "dependencies": { - "undici": "^7.29.0", + "undici": "^7.29.1", "@types/node": "^20.17.10", "form-data": "^4.0.4", "es6-promise": "^4.2.4" From 59339a9c17c7008935ed25b6e0d92c8fef8fb09f Mon Sep 17 00:00:00 2001 From: kdelay <90545043+kdelay@users.noreply.github.com> Date: Wed, 30 Sep 2026 03:33:18 +0900 Subject: [PATCH 6/7] [kotlin-spring] Add clientRegistrationId option for declarative HTTP interface (#25013) Mirror the Java spring generator's clientRegistrationId option (#22726) for kotlin-spring with library=spring-declarative-http-interface. When set, the generated interfaces are annotated with @ClientRegistrationId and the spring-boot-starter-oauth2-client dependency is added to the Spring Boot 4 build files even if the spec declares no security schemes. The option requires useSpringBoot4=true and is rejected for other libraries, matching the Java generator. Output is unchanged when it is not set. Fixes #24936 --- docs/generators/kotlin-spring.md | 1 + .../languages/KotlinSpringServerCodegen.java | 19 ++++++ .../apiInterface.mustache | 6 ++ .../buildGradle-sb4-Kts.mustache | 3 +- .../pom-sb4.mustache | 8 +++ .../spring/KotlinSpringServerCodegenTest.java | 61 +++++++++++++++++++ 6 files changed, 97 insertions(+), 1 deletion(-) diff --git a/docs/generators/kotlin-spring.md b/docs/generators/kotlin-spring.md index 26bb22126a6b..c5dbbe4cdf53 100644 --- a/docs/generators/kotlin-spring.md +++ b/docs/generators/kotlin-spring.md @@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |autoXSpringPaginated|Automatically add x-spring-paginated to operations that have the given set of pagination query parameters. 'page-size-sort' requires 'page', 'size', and 'sort'; 'page-size' requires only 'page' and 'size' (sort may be absent). Operations with x-spring-paginated explicitly set to false will not be auto-detected. The legacy values 'true' (alias for 'page-size-sort') and 'false' (alias for 'none') are deprecated and will be removed in a future release.|
**none**
Disable auto-detection.
**page-size-sort**
Require 'page', 'size', and 'sort' query parameters.
**page-size**
Require only 'page' and 'size' query parameters.
**true**
(deprecated) alias for 'page-size-sort'.
**false**
(deprecated) alias for 'none'.
|none| |basePackage|base package (invokerPackage) for generated code| |org.openapitools| |beanQualifiers|Whether to add fully-qualifier class names as bean qualifiers in @Component and @RestController annotations. May be used to prevent bean names clash if multiple generated libraries (contexts) added to single project.| |false| +|clientRegistrationId|Client registration ID for OAuth2 in Spring HTTP Interface (@ClientRegistrationId annotation). Requires library=spring-declarative-http-interface and useSpringBoot4=true (Spring Security 7).| |null| |companionObject|Whether to generate companion objects in data classes, enabling companion extensions.| |false| |configPackage|configuration package for generated code| |org.openapitools.configuration| |declarativeInterfaceReactiveMode|What type of reactive style to use in Spring Http declarative interface|
**coroutines**
Use kotlin-idiomatic 'suspend' functions
**reactor**
Use reactor return wrappers 'Mono' and 'Flux'
|coroutines| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java index 62a3557c031a..fd65ec415551 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java @@ -101,6 +101,7 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen public static final String BEAN_QUALIFIERS = "beanQualifiers"; public static final String USE_RESPONSE_ENTITY = "useResponseEntity"; public static final String DECLARATIVE_INTERFACE_REACTIVE_MODE = "declarativeInterfaceReactiveMode"; + public static final String CLIENT_REGISTRATION_ID = "clientRegistrationId"; public static final String USE_SPRING_BOOT3 = "useSpringBoot3"; public static final String USE_SPRING_BOOT4 = "useSpringBoot4"; @@ -223,6 +224,8 @@ public void setAutoXSpringPaginated(boolean autoXSpringPaginated) { protected boolean useSpringBoot4 = false; @Getter @Setter protected boolean useSpringBuiltInValidation = false; + @Getter @Setter + protected String clientRegistrationId = null; @Setter @Getter protected RequestMappingMode requestMappingMode = RequestMappingMode.controller; @@ -426,6 +429,8 @@ public KotlinSpringServerCodegen() { } cliOptions.add(declarativeInterfaceReactiveModeOpt); + cliOptions.add(CliOption.newString(CLIENT_REGISTRATION_ID, "Client registration ID for OAuth2 in Spring HTTP Interface (@ClientRegistrationId annotation). Requires library=" + SPRING_DECLARATIVE_HTTP_INTERFACE_LIBRARY + " and useSpringBoot4=true (Spring Security 7).")); + if (null != defaultDocumentationProvider()) { CliOption documentationProviderCliOption = new CliOption(DOCUMENTATION_PROVIDER, "Select the OpenAPI documentation provider.") @@ -601,6 +606,9 @@ public void processOpts() { if (additionalProperties.containsKey(USE_SPRING_BOOT4)) { this.setUseSpringBoot4(convertPropertyToBoolean(USE_SPRING_BOOT4)); } + if (additionalProperties.containsKey(CLIENT_REGISTRATION_ID)) { + this.setClientRegistrationId(additionalProperties.get(CLIENT_REGISTRATION_ID).toString()); + } if (additionalProperties.containsKey(USE_SPRING_BUILT_IN_VALIDATION)) { this.setUseSpringBuiltInValidation(convertPropertyToBoolean(USE_SPRING_BUILT_IN_VALIDATION)); writePropertyBack(USE_SPRING_BUILT_IN_VALIDATION, useSpringBuiltInValidation); @@ -805,6 +813,17 @@ public void processOpts() { writePropertyBack(USE_FEIGN_CLIENT, useFeignClient); writePropertyBack(SKIP_DEFAULT_INTERFACE, skipDefaultInterface); } + if (clientRegistrationId != null && !clientRegistrationId.isEmpty()) { + if (!SPRING_DECLARATIVE_HTTP_INTERFACE_LIBRARY.equals(library)) { + throw new IllegalArgumentException(CLIENT_REGISTRATION_ID + " is only supported with the " + SPRING_DECLARATIVE_HTTP_INTERFACE_LIBRARY + " library"); + } + if (!isUseSpringBoot4()) { + throw new IllegalArgumentException(CLIENT_REGISTRATION_ID + " requires " + USE_SPRING_BOOT4 + "=true because @ClientRegistrationId is provided by Spring Security 7"); + } + additionalProperties.put(CLIENT_REGISTRATION_ID, clientRegistrationId); + } else { + additionalProperties.remove(CLIENT_REGISTRATION_ID); + } writePropertyBack(REACTIVE, reactive); writePropertyBack(REACTIVE_MULTIPART, reactive && SPRING_BOOT.equals(library)); writePropertyBack(EXCEPTION_HANDLER, exceptionHandler); diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/apiInterface.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/apiInterface.mustache index 10c6a9b5c8b4..0de95c2b2275 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/apiInterface.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/apiInterface.mustache @@ -29,6 +29,9 @@ import io.swagger.annotations.AuthorizationScope import org.springframework.web.service.annotation.* import org.springframework.web.bind.annotation.* +{{#clientRegistrationId}} +import org.springframework.security.oauth2.client.annotation.ClientRegistrationId +{{/clientRegistrationId}} {{^useResponseEntity}} import org.springframework.http.HttpStatus {{/useResponseEntity}} @@ -55,6 +58,9 @@ import kotlin.collections.Map {{#useBeanValidation}} @Validated {{/useBeanValidation}} +{{#clientRegistrationId}} +@ClientRegistrationId("{{{clientRegistrationId}}}") +{{/clientRegistrationId}} {{#operations}} interface {{classname}} { diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/buildGradle-sb4-Kts.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/buildGradle-sb4-Kts.mustache index f7c7371fb2e7..9da83255d7d5 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/buildGradle-sb4-Kts.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/buildGradle-sb4-Kts.mustache @@ -67,7 +67,8 @@ dependencies { {{/useJackson3}} {{#hasAuthMethods}} - implementation("org.springframework.boot:spring-boot-starter-oauth2-client"){{/hasAuthMethods}} + implementation("org.springframework.boot:spring-boot-starter-oauth2-client"){{/hasAuthMethods}}{{^hasAuthMethods}}{{#clientRegistrationId}} + implementation("org.springframework.boot:spring-boot-starter-oauth2-client"){{/clientRegistrationId}}{{/hasAuthMethods}} {{#useBeanValidation}} implementation("jakarta.validation:jakarta.validation-api"){{/useBeanValidation}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/pom-sb4.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/pom-sb4.mustache index 149bcde6bd31..44483b91a221 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/pom-sb4.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface/pom-sb4.mustache @@ -180,6 +180,14 @@ spring-boot-starter-oauth2-client {{/hasAuthMethods}} + {{^hasAuthMethods}} + {{#clientRegistrationId}} + + org.springframework.boot + spring-boot-starter-oauth2-client + + {{/clientRegistrationId}} + {{/hasAuthMethods}} {{#useJackson3}} {{jacksonPackage}}.dataformat diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java index 9386932bab2f..e0f05bd69b3d 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java @@ -1510,6 +1510,67 @@ public void generateHttpInterfaceRendersOperationExtraAnnotation() throws Except ); } + @Test + public void generateHttpInterfaceWithClientRegistrationId() throws Exception { + Map props = new HashMap<>(); + props.put(USE_SPRING_BOOT4, "true"); + props.put(CLIENT_REGISTRATION_ID, "my-oauth-client"); + + Map files = generateFromContract("src/test/resources/3_0/kotlin/petstore.yaml", props, new HashMap<>(), + configurator -> configurator.setLibrary(SPRING_DECLARATIVE_HTTP_INTERFACE_LIBRARY)); + + Path petApi = files.get("PetApi.kt").toPath(); + assertFileContains(petApi, + "import org.springframework.security.oauth2.client.annotation.ClientRegistrationId", + "@ClientRegistrationId(\"my-oauth-client\")\ninterface PetApi {"); + } + + @Test + public void generateHttpInterfaceWithClientRegistrationIdAddsOAuth2ClientDependencyWithoutAuthMethods() throws Exception { + Map props = new HashMap<>(); + props.put(USE_SPRING_BOOT4, "true"); + props.put(CLIENT_REGISTRATION_ID, "my-oauth-client"); + + Map files = generateFromContract("src/test/resources/3_0/kotlin/bean-qualifiers.yaml", props, new HashMap<>(), + configurator -> configurator.setLibrary(SPRING_DECLARATIVE_HTTP_INTERFACE_LIBRARY)); + + assertFileContains(files.get("build.gradle.kts").toPath(), + "implementation(\"org.springframework.boot:spring-boot-starter-oauth2-client\")"); + } + + @Test + public void generateHttpInterfaceWithoutClientRegistrationId() throws Exception { + Map props = new HashMap<>(); + props.put(USE_SPRING_BOOT4, "true"); + + Map files = generateFromContract("src/test/resources/3_0/kotlin/petstore.yaml", props, new HashMap<>(), + configurator -> configurator.setLibrary(SPRING_DECLARATIVE_HTTP_INTERFACE_LIBRARY)); + + assertFileNotContains(files.get("PetApi.kt").toPath(), "ClientRegistrationId"); + } + + @Test + public void shouldRefuseClientRegistrationIdWithoutSpringBoot4() { + Map props = new HashMap<>(); + props.put(CLIENT_REGISTRATION_ID, "my-oauth-client"); + + Assertions.assertThatExceptionOfType(IllegalArgumentException.class) + .isThrownBy(() -> generateFromContract("src/test/resources/3_0/kotlin/petstore.yaml", props, new HashMap<>(), + configurator -> configurator.setLibrary(SPRING_DECLARATIVE_HTTP_INTERFACE_LIBRARY))) + .withMessageContaining(USE_SPRING_BOOT4); + } + + @Test + public void shouldRefuseClientRegistrationIdOutsideDeclarativeHttpInterface() { + Map props = new HashMap<>(); + props.put(USE_SPRING_BOOT4, "true"); + props.put(CLIENT_REGISTRATION_ID, "my-oauth-client"); + + Assertions.assertThatExceptionOfType(IllegalArgumentException.class) + .isThrownBy(() -> generateFromContract("src/test/resources/3_0/kotlin/petstore.yaml", props)) + .withMessageContaining(SPRING_DECLARATIVE_HTTP_INTERFACE_LIBRARY); + } + @Test public void generateHttpInterfaceReactiveWithCoroutinesResponseEntity() throws Exception { File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); From 3ffa1a16aa2c7ab7468facf6837ecf78b9a38be6 Mon Sep 17 00:00:00 2001 From: Max Azatian <66359507+HardMax71@users.noreply.github.com> Date: Wed, 30 Sep 2026 08:27:26 +0200 Subject: [PATCH 7/7] [rust] Name a oneOf member without a title or type after its base type (#25017) * [rust] Name a oneOf member without a title or type after its base type * [rust] Delete the files the oneOf member test generates --- .../codegen/languages/RustClientCodegen.java | 6 ++-- .../codegen/rust/RustClientCodegenTest.java | 16 ++++++++++ .../3_0/rust/oneof-member-without-type.yaml | 32 +++++++++++++++++++ 3 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 modules/openapi-generator/src/test/resources/3_0/rust/oneof-member-without-type.yaml diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java index 76ba95107cff..d2d4dcc51fd9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java @@ -319,8 +319,10 @@ public CodegenModel fromModel(String name, Schema model) { } else { // In-placed type (primitive), because there is no mapping or ref for it. - // use camelized `title` if present, otherwise use `type` - String oneOfName = Optional.ofNullable(schema.getTitle()).orElseGet(schema::getType); + // use camelized `title` if present, otherwise use `type`, otherwise the property's base type + String oneOfName = Optional.ofNullable(schema.getTitle()) + .or(() -> Optional.ofNullable(ModelUtils.getType(schema))) + .orElse(oneOf.baseType); oneOf.setName(toModelName(oneOfName)); } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/rust/RustClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/rust/RustClientCodegenTest.java index 5309bd644fd3..6f8a164ea40d 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/rust/RustClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/rust/RustClientCodegenTest.java @@ -471,4 +471,20 @@ public void testMapQueryParamsSerializeAsJson() throws IOException { TestUtils.assertFileNotContains(outputPath, "param_value.to_string()"); } } + + @Test + public void testOneOfMemberWithoutTitleOrType() throws IOException { + Path target = Files.createTempDirectory("test"); + target.toFile().deleteOnExit(); + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName("rust") + .setInputSpec("src/test/resources/3_0/rust/oneof-member-without-type.yaml") + .setSkipOverwrite(false) + .setOutputDir(target.toAbsolutePath().toString().replace("\\", "/")); + List files = new DefaultGenerator().opts(configurator.toClientOptInput()).generate(); + files.forEach(File::deleteOnExit); + Path outputPath = Path.of(target.toString(), "/src/models/conditions.rs"); + TestUtils.assertFileExists(outputPath); + TestUtils.assertFileContains(outputPath, "WorkflowPathCondition(Box)"); + } } diff --git a/modules/openapi-generator/src/test/resources/3_0/rust/oneof-member-without-type.yaml b/modules/openapi-generator/src/test/resources/3_0/rust/oneof-member-without-type.yaml new file mode 100644 index 000000000000..114d8dad74c4 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/rust/oneof-member-without-type.yaml @@ -0,0 +1,32 @@ +openapi: 3.0.3 +info: + title: oneOf member without a type + version: "1" +paths: + /conditions: + get: + operationId: getConditions + responses: + "200": + description: ok + content: + application/json: + schema: + $ref: "#/components/schemas/Conditions" +components: + schemas: + Conditions: + type: object + oneOf: + - type: object + maxProperties: 0 + - allOf: + - $ref: "#/components/schemas/WorkflowPathCondition" + required: + - workflow_path + maxProperties: 1 + WorkflowPathCondition: + type: object + properties: + workflow_path: + type: string