From d733e463138a0a02de374a40ea93090089d9c36e Mon Sep 17 00:00:00 2001 From: Mats Byrkjeland Date: Mon, 9 Oct 2023 13:39:15 +0200 Subject: [PATCH] Use xsd:dateTime for new timestamp type --- datatypes.xsd | 2 +- .../api/datatypes/types/share/ShareDocumentsRequestEvent.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/datatypes.xsd b/datatypes.xsd index 2466960..bf2b5e6 100644 --- a/datatypes.xsd +++ b/datatypes.xsd @@ -493,7 +493,7 @@ - + diff --git a/src/main/java/no/digipost/api/datatypes/types/share/ShareDocumentsRequestEvent.java b/src/main/java/no/digipost/api/datatypes/types/share/ShareDocumentsRequestEvent.java index cec47cf..80ba5fe 100644 --- a/src/main/java/no/digipost/api/datatypes/types/share/ShareDocumentsRequestEvent.java +++ b/src/main/java/no/digipost/api/datatypes/types/share/ShareDocumentsRequestEvent.java @@ -7,6 +7,7 @@ import javax.validation.constraints.NotNull; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlSchemaType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -29,6 +30,7 @@ public class ShareDocumentsRequestEvent implements DataType { ShareDocumentsRequestEventType eventType; @XmlElement(name = "timestamp", required = true) + @XmlSchemaType(name="dateTime") @Description("When the event occurred") ZonedDateTime timestamp;