-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Remove Lombok. #644
Comments
@jjjasper I'm wondering.. maybe it would be easier to always use lombok in generated code? Looks like less code to maintain in mustache templates. backbase-openapi-tools/boat-scaffold/src/main/templates/boat-spring/pojo.mustache Lines 315 to 373 in 92b2e8f
backbase-openapi-tools/boat-scaffold/src/main/templates/boat-spring/pojo.mustache Lines 27 to 30 in 92b2e8f
Maybe we need to do some more analysis which approach to choose (I'm definitely for keeping only one of them) |
@jjjasper @lombok.Getter
@lombok.Setter
@lombok.EqualsAndHashCode.Include
@lombok.ToString.Include
@Valid
@NotNull
private List<@Valid PaymentRequestLine> lines = new ArrayList<>(); code generated without lombok @Valid
@NotNull
private List<@Valid PaymentRequestLine> lines = new ArrayList<>();
/**
* Payment request details
* @return lines
*/
@NotNull @Valid
@Schema(name = "lines", description = "Payment request details", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("lines")
public List<@Valid PaymentRequestLine> getLines() {
return lines;
}
public void setLines(List<@Valid PaymentRequestLine> lines) {
this.lines = lines;
} The sample without lombok contains some additional annotations (e.g. JsonProperty, Schema). The one which uses lombok seems not to have these annotations. |
Using lombok in the generated sources does not make sense. Lombok value is to keep source code readable and compact by avoiding boiler-plate getters and setters. Generated code is not meant to be looked at, it is not aimed to be pretty and nobody cares if it is boiler-plate because nobody maintains it.
Adding lombok support complicates solutions (having to take into account both with and without lombok)
The text was updated successfully, but these errors were encountered: