-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Open
Labels
Description
Is your feature request related to a problem? Please describe.
Spring constructor can be improved with better support for Jackson and for JSpecify.
Describe the solution you'd like
The Spring generator can generate 3 types of constructors:
- default empty constructor
- constructor for required fields
- constructor for all arguments
We can improve them by adding the @JsonProperty on the fields of the constructors. It is already done in the RestClient.
Adding the @JsonCreator on the all argument constructor to help jackson.
Fix #22757 when using all argument constructors.
Use JSpecify @NullUnmarked on the default constructor to avoid false alarms from code analysis.
Describe alternatives you've considered
custom templates.
Add full support for JSpecify