Skip to content

Spring 4.0 support #283

Open
Open

Description

Activity

  1. tedberg commented on Mar 3, 2026

    @tedberg

    Is there a setting to generate with Jackson 3 instead of Jackson 2? I see in the commit messages that you are using Spring 7, but I don't see how to generate compatible code.

  2. hauner commented on Mar 4, 2026

    @hauner
    MemberAuthor

    There is currently no specific Spring Boot 4 code. The Spring 7 stuff is only used in the tests (dependabot pull request).

    Still on Spring Boot 3 here. My Spring Boot 4 samples just use jackson 2 so I didn't think about that....

    To switch between 2/3 it should provide another option like

    options:
      jackson: com.fasterxml.jackson
    #  jackson: tools.jackson

    or

    options:
      jackson: 2
    #  jackson: 3

    I did the first version for bean-validation , javax vs jakarta but I wonder if I go just for the simpler configuration. May be more user friendly to just switch between 2and 3.

  3. added this to the 2026.3 milestone on Mar 4, 2026
  4. tedberg commented on Mar 5, 2026

    @tedberg

    The second options would be simpler. Someone could have a typo in the first option. That first option also implies that if Jackson 4 launches and a package prefix of com.jackson4 that we could just supply that. Using 2 or 3, someone could put 4, but the mapping parser can easily return an error that only 2 and 3 are supported in this version.

  5. hauner commented on Mar 6, 2026

    @hauner
    MemberAuthor

    Yes, thought so too and I started to implement it like that.

  6. hauner commented on Mar 15, 2026

    @hauner
    MemberAuthor

    I'm confused now ;-)

    Do you have something that does not work?

    With Jackson 3 it seems that it is still using the annotations in the com.fasterxml.jackson.annotation namespace. This means, at least for now, it should just work out of the box ....

  7. tedberg commented on Mar 19, 2026

    @tedberg

    For Jackson 3, they changed the package from com.fasterxml.jackson to tools.jackson. https://cowtowncoder.medium.com/jackson-3-0-0-ga-released-1f669cda529a

    So if you upgrade to Spring Boot 4 and don't change the config back to using Jackson 2, none of the generated code compiles. The only workaround is to downgrade back to Jackson 2.

  8. hauner commented on Mar 20, 2026

    @hauner
    MemberAuthor

    https://github.com/FasterXML/jackson/blob/main/jackson3/MIGRATING_TO_JACKSON_3.md#2-new-maven-group-id-and-java-package

    This states that the annotation package does not change.

    And annotation is the only package the processor adds to the generated code... if i didn't miss anything :-)

  9. tedberg commented on Mar 20, 2026

    @tedberg

    Oh, that's actually good news - I must have been missing a maven dependency during the trial upgrade. Will try again.

  10. tedberg commented on Mar 21, 2026

    @tedberg

    Ok, I can confirm, I was able to upgrade an app using openapi-processor to Spring Boot 4.0.4 without issue. I guess the title for this issue can be more specifically about the API Versioning you mentioned.

  11. tedberg commented on May 9, 2026

    @tedberg

    The other minor thing I see is that the generated code in the spring folder use deprecated annotations, causing compiler warnings.

  12. hauner commented on May 10, 2026

    @hauner
    MemberAuthor

    Can you tell me which one? Taking a quick look at the output of the samples I don't see any.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions