I scavenged the internet but didn't find anything to solve this problem. Is it possible to add the lombok annotations in a swagger class UPON generation?
I have this swagger schema:
Product:
type: "object"
required:
- idSeller
- model
- name
- description
- price
properties:
id:
type: string
idSeller:
type: string
model:
type: string
name:
type: string
description:
type: string
price:
type: number
format: currency
minimum: 0.01
Which generated this code:
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2019-10-18T20:36:31.834-03:00")
public class Product {
@JsonProperty("id")
private String id = null;
@JsonProperty("idSeller")
private String idSeller = null;
//rest of the code ommited
}
But I need it to generate this:
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2019-10-18T20:36:31.834-03:00")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Product {
@JsonProperty("id")
private String id = null;
@JsonProperty("idSeller")
private String idSeller = null;
//rest of the code ommited
}
With the lombok Data, Builder, NoArgsConstructor and AllArgsConstructor annotations.
Could you help me on this?