-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PPANTT-36] feat: Add update maintenance API (#310)
* [PPANTT-36] added update maintenance API * [PPANTT-36] added javadoc * [PPANTT-36] added unit tests * [PPANTT-36] updated openapi * [PPANTT-36] feat: add openapi.json, PaStazionePaRepositoryTest --------- Co-authored-by: Alessio Cialini <63233981+alessio-cialini@users.noreply.github.com> Co-authored-by: Alessio Cialini <alessio.cialini@emeal.nttdata.com>
- Loading branch information
1 parent
9329a1f
commit 5c416b6
Showing
9 changed files
with
14,432 additions
and
14,699 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
.../java/it/gov/pagopa/apiconfig/core/model/stationmaintenance/UpdateStationMaintenance.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package it.gov.pagopa.apiconfig.core.model.stationmaintenance; | ||
|
||
import com.fasterxml.jackson.annotation.JsonFormat; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import com.fasterxml.jackson.datatype.jsr310.ser.OffsetDateTimeSerializer; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import it.gov.pagopa.apiconfig.core.util.Constants; | ||
import it.gov.pagopa.apiconfig.core.util.OffsetDateTimeDeserializer; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import org.springframework.format.annotation.DateTimeFormat; | ||
|
||
import javax.validation.constraints.NotNull; | ||
import java.time.OffsetDateTime; | ||
|
||
/** | ||
* Model class that define the input field for updating a station's maintenance | ||
*/ | ||
@Getter | ||
@Setter | ||
@Builder | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class UpdateStationMaintenance { | ||
|
||
@JsonProperty("start_date_time") | ||
@JsonFormat(pattern = Constants.DateTimeFormat.DATE_TIME_FORMAT) | ||
@JsonSerialize(using = OffsetDateTimeSerializer.class) | ||
@JsonDeserialize(using = OffsetDateTimeDeserializer.class) | ||
@Schema( | ||
example = "2024-04-01T13:00:00.000Z", | ||
description = "The start date time of the station maintenance") | ||
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) | ||
private OffsetDateTime startDateTime; | ||
|
||
@JsonProperty("end_date_time") | ||
@NotNull | ||
@JsonFormat(pattern = Constants.DateTimeFormat.DATE_TIME_FORMAT) | ||
@JsonSerialize(using = OffsetDateTimeSerializer.class) | ||
@JsonDeserialize(using = OffsetDateTimeDeserializer.class) | ||
@Schema( | ||
example = "2024-04-01T13:00:00.000Z", | ||
required = true, | ||
description = "The end date time of the station maintenance") | ||
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) | ||
private OffsetDateTime endDateTime; | ||
|
||
@JsonProperty("stand_in") | ||
@Schema(description = "StandIn flag") | ||
private Boolean standIn; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.