[REQ][Kotlin][jvm-spring-webclient] Support for useSpringBoot4 and useJackson3
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- kotlin, spring, spring-boot
- Lĩnh vực
- tooling
Hướng nghiên cứu
Start at the Kotlin generator path for library=jvm-spring-webclient and inspect how useSpringBoot3, Jackson types, WebClient codecs, and generated build dependencies are selected. Compare the existing Spring Boot 3 handling with the requested useSpringBoot4 and useJackson3 options, then verify generated code and dependencies for both flags and their defaults.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
Spring Boot 4 (Spring Framework 7) is now GA and uses Jackson 3 (tools.jackson.*) as its default JSON library, while Jackson 2 support in Spring Framework 7 is deprecated.
The Kotlin client generator with library=jvm-spring-webclient currently offers only useSpringBoot3. The generated code is tied to Spring Boot 3 and Jackson 2, so it uses:
com.fasterxml.jackson.databind.ObjectMapperand relatedcom.fasterxml.jackson.databind.*typesJackson2JsonEncoder/Jackson2JsonDecoderfor WebClient codecscom.fasterxml.jackson.module:jackson-module-kotlinandjackson-datatype-jsr310in the generated build files
This causes problems when the generated client is used in a Spring Boot 4 application:
- Two Jackson major versions end up on the classpath (Jackson 2 for the generated client and Jackson 3 for the application).
- The application's auto-configured
JsonMapperand its customizations can't be reused by the generated client. - The generated code depends on deprecated Spring APIs (
Jackson2JsonEncoder/Jackson2JsonDecoder), which will likely be removed in a future Spring release.
I'm always frustrated when I have to post-process generated sources or maintain custom templates just to make the client compile cleanly and work with Spring Boot 4.
Describe the solution you'd like
Add two new options for the Kotlin client generator with library=jvm-spring-webclient:
useSpringBoot4(defaultfalse): generates code and build files targeting Spring Boot 4 / Spring Framework 7.useJackson3(defaultfalse, possibly implied byuseSpringBoot4): generates code using Jackson 3, including:tools.jackson.databind.json.JsonMapper(immutable, built via builder) instead ofObjectMapperJacksonJsonEncoder/JacksonJsonDecoderinstead ofJackson2JsonEncoder/Jackson2JsonDecoder- the
tools.jackson.module:jackson-module-kotlindependency - no separate
jackson-datatype-jsr310, since Java time support is built into Jackson 3 core - annotations kept as
com.fasterxml.jackson.annotation.*, which Jackson 3 still uses
The generated client would then be able to accept a JsonMapper from the application context, as it can with an ObjectMapper today.
Example configuration:
generatorName: kotlin
library: jvm-spring-webclient
additionalProperties:
useSpringBoot4: true
useJackson3: true
serializationLibrary: jackson
Describe alternatives you've considered
- Keeping Jackson 2 alongside Jackson 3: this works for now, but it duplicates dependencies, splits mapper configuration, and relies on deprecated Spring APIs.
- Custom templates (
templateDir): this is possible, but every user has to maintain a fork of the templates and keep it in sync with upstream changes. - Switching to
kotlinx_serialization: this means a large change to the existing models and doesn't fit projects standardized on Jackson. - Using a different library (e.g.
jvm-spring-restclient): this isn't an option for reactive code based on WebClient.
Additional context
| Component | Version |
|---|---|
| OpenAPI Generator | 7.x.x |
| Spring Boot | 4.0.x |
| Kotlin | 2.x |
Question: Is this on the roadmap, and roughly when could support for useSpringBoot4 / useJackson3 in jvm-spring-webclient be expected?
If it helps, I'm happy to contribute a PR given some guidance on the preferred approach:
- Should
useJackson3be a separate flag, or implied byuseSpringBoot4? - Should the implementation be aligned with how other Spring-based generators handle Spring Boot 4 / Jackson 3?
- Ngôn ngữ chính
- Java
- Star
- 26.9k
- Fork
- 7.8k
- Merge trung bình
- 2 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 180
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của OpenAPITools/openapi-generator
-
Issue: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
OpenAPITools/openapi-generator#25643 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
OpenAPITools/openapi-generator#25640 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG][JAVA] Deprecated properties only get @Deprecated on the getter (base, feign, native, microprofile)Có thể đã có người làm @Inf1mum đã nhận 2 ngày trước. Đang mởIssue: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
OpenAPITools/openapi-generator#25567 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG][KOTLIN-SERVER] typeInfoAnnotation.mustache uses As.PROPERTY → discriminator property serialized twiceCó thể đã có người làm @Inf1mum đã nhận 9 ngày trước. Đang mởIssue: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
OpenAPITools/openapi-generator#25524 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[REQ][JAVA][resteasy] Support for Jackson 3 / useJackson3Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởEnhancement: Feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
OpenAPITools/openapi-generator#25364 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của OpenAPITools/openapi-generator
Issue tương tự
-
bug emitter:client:csharp
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
microsoft/typespec#12572 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
GCC 15.2: -Wcast-qual warning - cast discards const qualifier from pointer target type (H5trace.c)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] RemotingHelper.connect swaps the socket send and receive buffer configurationCó thể đã có người làm @amalsaidov đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-area-label
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày
-
area/ai area/backend component/zeebe kind/task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày