In my spring-boot application, I use swagger2 to document the web-services.
I use some classes that have java.sql.Time and java.util.Date attributes.
In swagger-ui, they appears like this :
I want to modify this to display :
"change_date": "YYYY-MM-DD"
"change_time": "mm:ss"
Here is my class :
@lombok.Data
@JsonRootName("translation_value")
@ApiModel(value="TranslationValue", description="Traduction de valeur")
public class TranslationValue implements Serializable {
@JsonProperty("translation_id") private Integer translationId;
@JsonProperty("family") private String family;
@JsonProperty("language_code") private String languageCode;
@JsonProperty("value") private String value;
@JsonProperty("translation_language_code") private String translationLanguageCode;
@JsonProperty("translation_value") private String translationValue;
@JsonProperty("delivered") private String delivered;
@JsonProperty("creation_date") private Date creationDate;
@JsonProperty("creation_time") private Time creationTime;
@JsonProperty("creation_user") private String creationUser;
@JsonProperty("change_date") private Date changeDate;
@JsonProperty("change_time") private Time changeTime;
@JsonProperty("change_user") private String changeUser;
@JsonProperty("status") private String status;
@JsonProperty("orignal_translation_id") private Integer orignalTranslationId;
}
How can I do this ? I don't find any annotation to set the format.