schema-registry icon indicating copy to clipboard operation
schema-registry copied to clipboard

Exclude swagger from client registry

Open expe-elenigen opened this issue 1 year ago • 1 comments

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.

expe-elenigen avatar Oct 18 '23 01:10 expe-elenigen

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.

mjustin avatar Nov 27 '23 17:11 mjustin