schema-registry
schema-registry copied to clipboard
Exclude swagger from client registry
In our project, we are using swagger and when we import :
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-schema-registry-parent</artifactId>
<version>7.6.0-0</version>
</dependency>
It brings a transitive dependency to our project :
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
</dependency>
Which result in a conflict of version and in my case, it even breaks Swagger:
Fetch error
response status is 500 /v3/api-docs
So I have to explicitly exclude the transitive dependency coming from your library and I was actually surprised to see that in a "client" there's a need to define the swagger annotations, so I would like to know the reason behind and if you would have a solution to avoid this extra dependency.
If this is the same issue I just ran across (#2864), the issue is that it transitively brings in the old swagger-annotations
instead of the new swagger-annotations-jakarta
. The two libraries conflict, so you end up playing classpath roulette with old and new versions of classes on the classpath.