forked from loafle/openapi-generator-original
Add date time format annotation on pojo for model query parameters (#5437)
* Add date time format annotation on pojo for model query parameters * Regenetare samples * update spring samples Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
@@ -47,9 +47,11 @@ public class FormatTest {
|
||||
private Resource binary;
|
||||
|
||||
@JsonProperty("date")
|
||||
@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE)
|
||||
private LocalDate date;
|
||||
|
||||
@JsonProperty("dateTime")
|
||||
@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME)
|
||||
private OffsetDateTime dateTime;
|
||||
|
||||
@JsonProperty("uuid")
|
||||
|
||||
@@ -24,6 +24,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
|
||||
private UUID uuid;
|
||||
|
||||
@JsonProperty("dateTime")
|
||||
@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME)
|
||||
private OffsetDateTime dateTime;
|
||||
|
||||
@JsonProperty("map")
|
||||
|
||||
@@ -26,6 +26,7 @@ public class Order {
|
||||
private Integer quantity;
|
||||
|
||||
@JsonProperty("shipDate")
|
||||
@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME)
|
||||
private OffsetDateTime shipDate;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user