-
Notifications
You must be signed in to change notification settings - Fork 6k
Open
Labels
Milestone
Description
Description
Limiting number of empty line breaks in Mustache output is a known issue and it seems there will be no "fix" for that coming from Mustache team.
Example (generated with latest master):
/**
* Unique identifier for this bid. Read-only.
* @return id
**/
@ApiModelProperty(value = "Unique identifier for this bid. Read-only.")
public Long getId() {
return id;
}This is clearly broken.
While Mustache is unable to fix this issue themselves (due to the way it generates output), Swagger Codegen can roll its own fix, following the example as outlined in that same issue.
Short summary: use some special non-whitespace character to represent line break in all templates. Post-process output from Mustache, removing all line breaks (\n) and replacing the special character with line breaks instead.
Swagger-codegen version
All versions so far.