Skip to content

Springdoc 2.8.x + Spring Boot 3.4.1 breaks native image support #2870

Closed

Description

@goafabric

Latest Spring Doc + Spring Boot 3.4.1 breaks the native image support.
Accessing OpenAPI will bail out with an error 400.

The following Reflection hints can at least get OpenAPI working Again:

@RegisterReflection(classes = {io.swagger.v3.core.jackson.mixin.Schema31Mixin.TypeSerializer.class, io.swagger.v3.oas.models.media.JsonSchema.class, com.fasterxml.jackson.databind.BeanDescription.class}, memberCategories = {MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.INVOKE_PUBLIC_METHODS})

=>

I kindly ask to add them, as the latest org.graalvm.buildtools.native:0.10.4 does not seem to contain the reachability metadata.
It can also be done in other ways, as long as the classes above are registered for Reflection.

Thx in advance

Activity

  1. goafabric commented on Jan 23, 2025

    @goafabric
    Author

    add least for kotlin projects more reflection problems arised,
    for now the could be mitigated by setting

    springdoc:
    enable-kotlin: false

  2. bnasslahsen commented on Jan 25, 2025

    @bnasslahsen
    Collaborator

    @goafabric,

    I have added a fix for it.
    If you can also validate on your end, that would be great.

  3. added
    bug
    on Jan 25, 2025
  4. goafabric commented on Jan 27, 2025

    @goafabric
    Author

    thank you

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions