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

Relax Swagger Core 1.6.x OSGi constraints to allow usage of the Bean Validation API 1.1/2.0 #3497

Merged
merged 2 commits into from
Jun 3, 2020

Conversation

reta
Copy link
Contributor

@reta reta commented Apr 4, 2020

Background

Currently, Swagger Core depends on javax.validation API v1.1, strict. The OSGi manifest correctly includes the javax.validation API range as part of Import-Package instructions set: javax.validation.constraints;version="[1.1,2)"

Problem

The javax.validation API v1.1 is superseded by v2.0 and is rarely used. The version range for OSGi deployments could be relaxed to include v2.0 as well: javax.validation.constraints;version="[1.1,3)".

 <Import-Package>javax.validation.constraints;version="[1.1,3)",*</Import-Package>

This is the only change in MANIFEST.MF (pretty minor) but it would actually relax the javax.validation version requirements and allow to use Swagger Core with Bean Validation 2.0 and/or with Jakarta artifacts inside OSGi container.

@frantuma this is backport of the #3445 to 1.6.x release branch. The latest Swagger Core 2.1.2 works like a charm.

Thank you!

@reta
Copy link
Contributor Author

reta commented Apr 29, 2020

@frantuma sorry for poking, mind please taking a look? thank you!

@ffang
Copy link

ffang commented May 26, 2020

Yes, please relax the range to accept validation-api 2.x, guess no one still stick to 1.x and IMO there is no harm to do so.

Thanks!

@frantuma frantuma self-assigned this May 27, 2020
@frantuma frantuma modified the milestones: M2, M3 May 27, 2020
@frantuma frantuma merged commit 072d54b into swagger-api:1.5 Jun 3, 2020
@frantuma
Copy link
Member

frantuma commented Jun 3, 2020

thanks!

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

Successfully merging this pull request may close these issues.

None yet

3 participants