Forum Discussion
- nmraoChampion Level 3Note that it will limit the end users to single date format than flexible.
Related Content
- 2 years ago
- 12 months ago
- 2 years ago
- 4 years ago
- 2 years ago
I have a variable in yml file
startDate:
type:string
format:date
I'm using swagger-generater to generate java code from yml.
It's generating a startDate variable as below
@JsonProperty("startDate")
private LocalDate startDate = null;
But I need as below
@JsonProperty("startDate")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
private LocalDate startDate = null;
Can someone help me on this?