Is your feature request related to a problem? Please describe.
The kotlin generator does not support Spring Boot 4 and Jackson 3 when used with the jvm-spring-restclient library.
Spring Boot 4 and Jackson 3 both came with changes that cause the generated code to now use deprecated and non-compiling code if used with Spring Boot 4 and Jackson 3.
Describe the solution you'd like
Add configuration options to instruct the generator to generate code that works with Spring Boot 4 and Jackson 3.
The spring generator was updated with new configuration options useSpringBoot4 and useJackson3 in #22854 which causes the generator to generate code compatible with the new versions. Perhaps the same options can be reused for this generator? 🙏
Describe alternatives you've considered
Until support is added, we will have to revert to generating clients in Java or add wiring to our build that swaps generated classes with our own.
Additional context
As far as I can see, in the generated code in our project, the issue is that the generated code uses MappingJackson2HttpMessageConverter (which is deprecated in Spring Boot 4). It also uses the package com.fasterxml.jackson (which moved to tools.jackson in Jackson 3).
As an alternative to adding support for useJackson3 as mentioned above, perhaps serializationLibrary could be extended with support for jackson3 instead of the existing jackson.
Related to #23098, but this adds support to kotlin-spring, which is typically used for the server-side and not the client-side (as is the case for kotlin generator in this issue).
Is your feature request related to a problem? Please describe.
The
kotlingenerator does not support Spring Boot 4 and Jackson 3 when used with thejvm-spring-restclientlibrary.Spring Boot 4 and Jackson 3 both came with changes that cause the generated code to now use deprecated and non-compiling code if used with Spring Boot 4 and Jackson 3.
Describe the solution you'd like
Add configuration options to instruct the generator to generate code that works with Spring Boot 4 and Jackson 3.
The
springgenerator was updated with new configuration optionsuseSpringBoot4anduseJackson3in #22854 which causes the generator to generate code compatible with the new versions. Perhaps the same options can be reused for this generator? 🙏Describe alternatives you've considered
Until support is added, we will have to revert to generating clients in Java or add wiring to our build that swaps generated classes with our own.
Additional context
As far as I can see, in the generated code in our project, the issue is that the generated code uses
MappingJackson2HttpMessageConverter(which is deprecated in Spring Boot 4). It also uses the packagecom.fasterxml.jackson(which moved totools.jacksonin Jackson 3).As an alternative to adding support for
useJackson3as mentioned above, perhapsserializationLibrarycould be extended with support forjackson3instead of the existingjackson.Related to #23098, but this adds support to kotlin-spring, which is typically used for the server-side and not the client-side (as is the case for
kotlingenerator in this issue).