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

Incorrect version of jakarta.validation-api 3.1.0 instead of 3.0.2 starting with swagger-core-jakarta 2.2.25 #4849

Open
mjschwaiger opened this issue Feb 26, 2025 · 1 comment

Comments

@mjschwaiger
Copy link

mjschwaiger commented Feb 26, 2025

Version 2.2.25 and newer of swagger-core-jakarta and define version 3.1.0 instead of 3.0.2 of component jakarta.validation-api.

The current version definition was introduced in swagger-core-jakarta:2.2.25 in pull request 4740 where ${jakarta.validation-version} was updated from 3.0.2 to 3.1.0. This may have happened accidentally.

Jakarta (Bean) Validation versions

See https://jakarta.ee/specifications/bean-validation/ for more details.

The baseline for Spring Boot 3.x and Spring Framework 6.x is Jakarta 10 EE, so components such as swagger-core-jakarta should not update this baseline to versions based on Jakarta 11 EE, which will be the baseline for Spring Boot 4.x and Spring Framework 7.x.

The rest of the Jakarta components (e.g. jakarta.ws.rs-api:jar:3.1.0) are also based on Jakarta 10 EE.

Example: this would resolve to jakarta.validation-api:3.1.0 which is the release for Jakarta 11 EE

dependencies {
  implementation("org.springframework.boot:spring-boot-starter:3.4.3") /* based on Jakarta 10 EE */
  implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.5")
}

In fact, you would expect this to resolve to jakarta.validation-api:3.0.2.

So my suggestion would be to reverse this change and create a new version.

@T3rm1
Copy link

T3rm1 commented Mar 1, 2025

This project is not related to Spring. So that's not an issue. Also there are no backwards incompatible changes in Jakarta Validation 3.1. The only real issue I see is, that Jakarta Validation 3.1 now requires Java 17 instead of previously Java 8 as minimum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants