File tree Expand file tree Collapse file tree 6 files changed +17
-1
lines changed
main/java/org/gitlab4j/api
test/resources/org/gitlab4j/models Expand file tree Collapse file tree 6 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 77import org .gitlab4j .models .Constants .ProjectCreationLevel ;
88import org .gitlab4j .models .Constants .SubgroupCreationLevel ;
99import org .gitlab4j .models .utils .JacksonJson ;
10+ import org .gitlab4j .models .utils .MultiDateFormatDeserializer ;
1011
1112import com .fasterxml .jackson .annotation .JsonProperty ;
13+ import com .fasterxml .jackson .databind .annotation .JsonDeserialize ;
1214import com .fasterxml .jackson .databind .annotation .JsonSerialize ;
1315
1416public class Group extends AbstractGroup <Group > {
@@ -137,6 +139,7 @@ public void setJobArtifactsSize(Long jobArtifactsSize) {
137139 * The creation date of the project.
138140 */
139141 @ JsonProperty ("created_at" )
142+ @ JsonDeserialize (using = MultiDateFormatDeserializer .class )
140143 private Date createdAt ;
141144
142145 /**
Original file line number Diff line number Diff line change @@ -318,6 +318,7 @@ public String toString() {
318318 private Boolean mirror ;
319319
320320 @ JsonProperty ("updated_at" )
321+ @ JsonDeserialize (using = MultiDateFormatDeserializer .class )
321322 private Date updatedAt ;
322323
323324 @ JsonProperty ("description_html" )
Original file line number Diff line number Diff line change 44import java .util .Date ;
55
66import org .gitlab4j .models .utils .JacksonJson ;
7+ import org .gitlab4j .models .utils .MultiDateFormatDeserializer ;
78
89import com .fasterxml .jackson .annotation .JsonProperty ;
10+ import com .fasterxml .jackson .databind .annotation .JsonDeserialize ;
911
1012public class PullMirror implements Serializable {
1113 private static final long serialVersionUID = 1L ;
@@ -17,12 +19,15 @@ public class PullMirror implements Serializable {
1719 private String lastError ;
1820
1921 @ JsonProperty ("last_successful_update_at" )
22+ @ JsonDeserialize (using = MultiDateFormatDeserializer .class )
2023 private Date lastSuccessfulUpdateAt ;
2124
2225 @ JsonProperty ("last_update_at" )
26+ @ JsonDeserialize (using = MultiDateFormatDeserializer .class )
2327 private Date lastUpdateAt ;
2428
2529 @ JsonProperty ("last_update_started_at" )
30+ @ JsonDeserialize (using = MultiDateFormatDeserializer .class )
2631 private Date lastUpdateStartedAt ;
2732
2833 @ JsonProperty ("update_status" )
Original file line number Diff line number Diff line change 88
99import com .fasterxml .jackson .annotation .JsonProperty ;
1010import com .fasterxml .jackson .databind .annotation .JsonDeserialize ;
11+ import com .fasterxml .jackson .databind .annotation .JsonSerialize ;
1112
1213public class EventIssue {
1314
@@ -65,6 +66,7 @@ public class EventIssue {
6566 private Long updatedById ;
6667
6768 @ JsonProperty ("last_edited_at" )
69+ @ JsonDeserialize (using = MultiDateFormatDeserializer .class )
6870 private Date lastEditedAt ;
6971
7072 @ JsonProperty ("last_edited_by_id" )
@@ -83,6 +85,7 @@ public class EventIssue {
8385 private Boolean discussionLocked ;
8486
8587 @ JsonProperty ("due_date" )
88+ @ JsonSerialize (using = JacksonJson .DateOnlySerializer .class )
8689 private Date dueDate ;
8790
8891 @ JsonProperty ("moved_to_id" )
Original file line number Diff line number Diff line change 55import org .gitlab4j .api .models .Diff ;
66import org .gitlab4j .models .utils .JacksonJson ;
77import org .gitlab4j .models .utils .JacksonJsonEnumHelper ;
8+ import org .gitlab4j .models .utils .MultiDateFormatDeserializer ;
89
910import com .fasterxml .jackson .annotation .JsonCreator ;
1011import com .fasterxml .jackson .annotation .JsonProperty ;
1112import com .fasterxml .jackson .annotation .JsonValue ;
13+ import com .fasterxml .jackson .databind .annotation .JsonDeserialize ;
1214
1315public class NoteEvent extends AbstractEvent {
1416 private static final long serialVersionUID = 1L ;
@@ -170,9 +172,11 @@ public static class ObjectAttributes {
170172 private Long authorId ;
171173
172174 @ JsonProperty ("created_at" )
175+ @ JsonDeserialize (using = MultiDateFormatDeserializer .class )
173176 private Date createdAt ;
174177
175178 @ JsonProperty ("updated_at" )
179+ @ JsonDeserialize (using = MultiDateFormatDeserializer .class )
176180 private Date updatedAt ;
177181
178182 @ JsonProperty ("project_id" )
Original file line number Diff line number Diff line change 4646 "state_id" : 1 ,
4747 "confidential" : false ,
4848 "discussion_locked" : true ,
49- "due_date" : " 2014-12-03T18:15:43.248Z " ,
49+ "due_date" : " 2014-12-03 " ,
5050 "moved_to_id" : 1 ,
5151 "duplicated_to_id" : 1 ,
5252 "time_estimate" : 1800 ,
You can’t perform that action at this time.
0 commit comments