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
Why we need this improvement?
With Spring Boot 3, the validation dependencies have migrated to jakarta.validation et the use of javax.validation in projects is discouraged by Spring for compatibility raisons.
How will this change help?
Give the possibility to use jakarta.validation will avoid to have un compatible dependency in one project
Description
What changes have to be introduced?
It will be great if the possibility to have de new Preset to have the right dependancy added like a JAKARTA_CONSTRAINTS_PRESET or have an option to chose which dependency we would add in JAVA_CONSTRAINTS_PRESET ("import javax.validation.constraints.;" (default) or "import jakarta.validation.constraints.;".
Will this be a breaking change?
No breaking change for proposition one is simply an add.
The second proposition have need to change the type of JAVA_CONSTRAINTS_PRESET to manage options
How could it be implemented/designed?
Solution one
Add in the file modelina/src/generators/java/presets/constraitntsPreset.ts the code below.
It's a copy of JAVA_CONSTRAINTS_PRESET with the only change in for the addDependency
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request. Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
Reason/Context
With Spring Boot 3, the validation dependencies have migrated to jakarta.validation et the use of javax.validation in projects is discouraged by Spring for compatibility raisons.
Give the possibility to use jakarta.validation will avoid to have un compatible dependency in one project
Description
It will be great if the possibility to have de new Preset to have the right dependancy added like a JAKARTA_CONSTRAINTS_PRESET or have an option to chose which dependency we would add in JAVA_CONSTRAINTS_PRESET ("import javax.validation.constraints.;" (default) or "import jakarta.validation.constraints.;".
No breaking change for proposition one is simply an add.
The second proposition have need to change the type of JAVA_CONSTRAINTS_PRESET to manage options
Solution one
Add in the file modelina/src/generators/java/presets/constraitntsPreset.ts the code below.
It's a copy of JAVA_CONSTRAINTS_PRESET with the only change in for the addDependency
Solution two:
Modify the file modelina/src/generators/java/presets/constraitntsPreset.ts with the code below.
The text was updated successfully, but these errors were encountered: