[Java Libraries] Jakarta Validation API support useJakartaEe flag#19469
[Java Libraries] Jakarta Validation API support useJakartaEe flag#19469wing328 merged 2 commits intoOpenAPITools:masterfrom horaceli:useJakartaEe-no-effect-on-validation-api
Conversation
|
Hi, this effectively requires that the |
|
This is basically a partial revert of #18332 (which caused a regression and broke Jakarta 2 validation-api). The improvement here is it also imports the correct version in maven by default (but can easily be overridden by explicitly specifying the validation-api version) |
|
To utilize |
|
@Chrimle thanks for the feedback. Just labelled this PR as bug fixes as well. |
Fixes #19398 and #19437
For context,
useJakartaEepreviously only determined the javax/jakarta imports for validation-api, not the maven Jakarta dependency version (that only worked for annotation-api).#18332 and #19171 aligned the validation-api to use
jakarta.*package as a previous commit had already upgraded the validation-api version to 3.x. Unfortunately this caused a regression as end users can manually specify 2.x, in which case they would still need thejavax.*package. This partially reverts those changes and once again makes the javax/jakarta package configurable.This PR allows the use of
useJakartaEeflag in the same way Jakarta annotation-api switches betweenjavax.*andjakarta.*packages. This also switches betweenjakarta.validation-api2 and 3 so the correct dependencies are included.Note that it only applies to generators in
Java/librariesPR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master(upcoming 7.6.0 minor release - breaking changes with fallbacks),8.0.x(breaking changes without fallbacks)