Closed horaceli closed 3 months ago
thanks for the fix.
I was able to repeat the issue and confirmed the fix
[INFO] --- source:3.2.0:jar-no-fork (attach-sources) @ openapi-java-client ---
[INFO] Building jar: C:\Users\wing3\AppData\Local\Temp\resteasy234a\target\openapi-java-client-1.0.0-sources.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.329 s
[INFO] Finished at: 2024-07-18T16:59:21+08:00
[INFO] ------------------------------------------------------------------------
18332 replaced instances of
{{javaPackage}}.validation
withjakarta.validation
because all generated poms under Java/libraries usejakarta.validation:jakarta.validation-api:3.0.2
(which uses jakarta package namespace).However a couple of moustache templates were missed out, so if
useJakartaEe
flag was disabled, some code would still requirejavax.validation.*
while some would requirejakarta.validation.*
- this PR fixes that by aligning with the package included in the generated pom.Note that this issue only affects
jakarta.validation-api
and notjakarta.annotation-api
. Annotation API uses different versions in the pom depending on theuserJakartaEe
flag, e.g. https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/pom.mustache#L360PR checklist
(For Windows users, please run the script in Git BASH) 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)