Skip to content

[REQ] Add support for Spring Boot 4 and Jackson 3 to kotlin generator and jvm-spring-restclient library #23114

@olaisolheim

Description

@olaisolheim

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).

Image Image

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions