You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What's the actual output vs expected output? (If it was the same I wouldn't be here)
[Optional] Sponsorship to speed up the bug fix or feature request (example) (Je suis very poor, señorita.Maybe one day.)
Description
OpenAPI Java (Spring) generator is not adding the correct javax.validation imports with this specific configuration (Reactor, Spring, Optional-wrapped, etc check bellow). I believe is a bug with this specific configuration, because it usually works fine with some slightly similar configurations.
Everything expected generates EXCEPT the import javax.validation.constraints.Min; line, breaking the maven compile goal because of unimported @Min annotation.
Steps to reproduce
Use mvn -U -T 1C clean install or IntelliJ's GUI IntelliJ's GUI with similar file contents.
The text was updated successfully, but these errors were encountered:
I also stumbled upon this during some prototyping, and it seems to be caused primarily by delegatePattern=true.
It seems to me, the problem lies with the lack of the {{javaxPackage}}.validation.constraints.* import in the delegate template - an import for {{javaxPackage}}.validation.Valid was added with #15330 to resolve a similar issue, but the accompanying import for the constraints annotations is still absent.
Bug Report Checklist
Description
OpenAPI Java (Spring) generator is not adding the correct javax.validation imports with this specific configuration (Reactor, Spring, Optional-wrapped, etc check bellow). I believe is a bug with this specific configuration, because it usually works fine with some slightly similar configurations.
openapi-generator version
Spring Java Generator
Version 6.6.0
File
Yaml:
Pom XML:
Generated:
Generation Details
Everything expected generates EXCEPT the
import javax.validation.constraints.Min;
line, breaking the maven compile goal because of unimported@Min
annotation.Steps to reproduce
Use
mvn -U -T 1C clean install
or IntelliJ's GUI IntelliJ's GUI with similar file contents.The text was updated successfully, but these errors were encountered: