Issue with Swagger UI #27
-
|
Hello, After migrating my application to SpringBoot 3.5.5, SpringCloud 2025.0.0 and CIB Seven 2.1.0-alpha, the Swagger UI is no more displayed. In fact the URL /v3/api-docs/public if returning a 500 error with the exception: java.lang.NoSuchMethodError: 'java.lang.String io.swagger.v3.oas.annotations.media.Schema.$dynamicRef()' at io.swagger.v3.core.util.AnnotationsUtils.getSchemaFromAnnotation(AnnotationsUtils.java:674) On my main DEV branch using Camunda 7.23.0, I don't have this issue and the Swagger UI is correctly displayed. Does anyone have the same issue? BR |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hello Pascal, I noticed your issue is a classic and very common dependency conflict specific to the Spring Boot 3.x and OpenAPI ecosystem. The error, This is a classpath issue, not a code bug. The Recommended Solution: Centralized Dependency ManagementThe most professional and stable solution is to ensure that only the official Springdoc starter is responsible for managing all the transitive OpenAPI dependencies. Here is the precise course of action:
If the issue persists, your next step should be to run a dependency analysis (like This approach eliminates the root cause and provides the most stable long-term fix. Hope this gets your Swagger UI working! If this fixes your 500 error, please mark this comment as the correct answer. |
Beta Was this translation helpful? Give feedback.
Hello Pascal,
I noticed your issue is a classic and very common dependency conflict specific to the Spring Boot 3.x and OpenAPI ecosystem. The error,
java.lang.NoSuchMethodError: 'java.lang.String io.swagger.v3.oas.annotations.media.Schema.$dynamicRef()', occurs because a class (likely from one of your other dependencies) was compiled against a newer version of the OpenAPI library (io.swagger.v3) than the one that is actually loaded at runtime.This is a classpath issue, not a code bug.
The Recommended Solution: Centralized Dependency Management
The most professional and stable solution is to ensure that only the official Springdoc starter is responsible for managing all the transitive Op…