Open rubena opened 6 years ago
Also it causes compile problems for Java if there are two fields named like this: 'identifier' and 'setIdentifier'. The java model class would contain two methods like this:
public void setIdentifier(String identifier) {
this.identifier = identifier;
}
public DocumentIdentificationDto withSetIdentifier(String setIdentifier) {
this.setIdentifier = setIdentifier;
return this;
}
It would be nice to be able to set a prefix for the Builder methods, e.g. 'with'. In the meantime if there any workaround?
Description
When we generate the Java client of the defined API, the model comes with a builder pattern that makes no possible to access attributes on Freemarker without using the full getter method name. It forces us to use ${item.getId()} instead of ${item.id} or change the generated code, which is not an option in a project where the model must be generated many times.
Swagger-codegen version
2.3.1
Command line used for generation
Maven plugin configuration:
Suggest a fix/enhancement
A configuration option to disable builder generation