Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.8.0 has transitive slf4j 2.0 dependency #2543

Closed
stolyarchukav opened this issue Mar 21, 2024 · 5 comments
Closed

1.8.0 has transitive slf4j 2.0 dependency #2543

stolyarchukav opened this issue Mar 21, 2024 · 5 comments
Labels
invalid This doesn't seem right

Comments

@stolyarchukav
Copy link

1.8.0 version has a transitive slf4j 2.0.9 dependency which does not work properly with Spring Boot 2.7.x, see spring-projects/spring-boot#12649

Comparative dependency graphs
1.8.0
--- io.swagger.core.v3:swagger-core:2.2.20
| | | +--- jakarta.xml.bind:jakarta.xml.bind-api:2.3.3
| | | | --- jakarta.activation:jakarta.activation-api:1.2.2
| | | +--- org.apache.commons:commons-lang3:3.14.0
| | | +--- org.slf4j:slf4j-api:2.0.9

1.7.0
--- io.swagger.core.v3:swagger-core:2.2.9
| | | +--- jakarta.xml.bind:jakarta.xml.bind-api:2.3.2
| | | | --- jakarta.activation:jakarta.activation-api:1.2.1
| | | +--- org.apache.commons:commons-lang3:3.12.0 -> 3.14.0
| | | +--- org.slf4j:slf4j-api:1.7.36

@codespearhead
Copy link
Contributor

@stolyarchukav
Copy link
Author

Spring Boot 2.x is EOL for OSS support and it won't be long until commercial support is dropped as well.

I thought 2.0.x versions should be based on Spring Boot 3, but 1.x line should keep Spring Boot 2 compatibility. Am I wrong?

@codespearhead
Copy link
Contributor

codespearhead commented Mar 24, 2024

Correct, but the readme of this project says there will be no more OSS support for version springdoc-openapi 1.x. However, commercial support is available.

@bnasslahsen
Copy link
Contributor

@stolyarchukav,

The version used for slf4j will be org.slf4j:slf4j-api:jar:1.7.36

If you are having something else, make sure you provide Minimal, Reproducible Example - with HelloController that reproduces the problem

@bnasslahsen bnasslahsen added the invalid This doesn't seem right label Mar 28, 2024
@blulic
Copy link

blulic commented Sep 3, 2024

Confirming the issue @bnasslahsen @codespearhead. This is not an invalid issue. Dependency chain is very clear.

Upgrading SpringDoc to 1.8.0 in any Spring Boot 2.7.x project will make SLF4J unusable, without explicit override of swagger-core to the version on SLF4J 1.7.

Latest io.swagger.core.v3:swagger-core version with SLF4J 1.7 is 2.2.16.
swagger-core 2.2.17 is on SLF4J 2.0.9 (it is not nice to introduce a breaking change in the patch version).

springdoc-openapi-common brings swagger-core 2.2.20. Source link.

I can make a contribution for 1.8.1 (to downgrade swagger-core to 2.2.16), if you would consider publishing it? Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

4 participants