Relax Swagger Core 1.6.x OSGi constraints to allow usage of the Bean Validation API 1.1/2.0 #3497
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
Currently, Swagger Core depends on
javax.validation
API v1.1, strict. The OSGi manifest correctly includes thejavax.validation
API range as part ofImport-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)"
.This is the only change in
MANIFEST.MF
(pretty minor) but it would actually relax thejavax.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!