From 343d4b87f8dfb917fe5acddf49fe3a6cc1351d21 Mon Sep 17 00:00:00 2001 From: Aleksandr Fedorov Date: Fri, 27 Sep 2024 10:53:11 +0300 Subject: [PATCH 1/2] fix: ignore unknown properties in Callback --- src/main/java/com/onlyoffice/model/common/Changes.java | 2 ++ .../com/onlyoffice/model/documenteditor/callback/Action.java | 2 ++ .../onlyoffice/model/documenteditor/callback/ForcesaveType.java | 2 ++ .../com/onlyoffice/model/documenteditor/callback/History.java | 2 ++ .../com/onlyoffice/model/documenteditor/callback/Status.java | 2 ++ .../onlyoffice/model/documenteditor/callback/action/Type.java | 2 ++ 6 files changed, 12 insertions(+) diff --git a/src/main/java/com/onlyoffice/model/common/Changes.java b/src/main/java/com/onlyoffice/model/common/Changes.java index 667008d8..a359609a 100644 --- a/src/main/java/com/onlyoffice/model/common/Changes.java +++ b/src/main/java/com/onlyoffice/model/common/Changes.java @@ -18,6 +18,7 @@ package com.onlyoffice.model.common; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import lombok.AllArgsConstructor; import lombok.Builder; @@ -35,6 +36,7 @@ @AllArgsConstructor @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonIgnoreProperties(ignoreUnknown = true) public class Changes { /** diff --git a/src/main/java/com/onlyoffice/model/documenteditor/callback/Action.java b/src/main/java/com/onlyoffice/model/documenteditor/callback/Action.java index 9472a396..4b00a0c2 100644 --- a/src/main/java/com/onlyoffice/model/documenteditor/callback/Action.java +++ b/src/main/java/com/onlyoffice/model/documenteditor/callback/Action.java @@ -18,6 +18,7 @@ package com.onlyoffice.model.documenteditor.callback; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.onlyoffice.model.documenteditor.callback.action.Type; import lombok.AllArgsConstructor; @@ -34,6 +35,7 @@ @AllArgsConstructor @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonIgnoreProperties(ignoreUnknown = true) public class Action { /** diff --git a/src/main/java/com/onlyoffice/model/documenteditor/callback/ForcesaveType.java b/src/main/java/com/onlyoffice/model/documenteditor/callback/ForcesaveType.java index c9449bd0..e88d7a1f 100644 --- a/src/main/java/com/onlyoffice/model/documenteditor/callback/ForcesaveType.java +++ b/src/main/java/com/onlyoffice/model/documenteditor/callback/ForcesaveType.java @@ -19,6 +19,7 @@ package com.onlyoffice.model.documenteditor.callback; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonValue; import lombok.AllArgsConstructor; import lombok.Getter; @@ -32,6 +33,7 @@ */ @AllArgsConstructor @Getter +@JsonIgnoreProperties(ignoreUnknown = true) public enum ForcesaveType { /** diff --git a/src/main/java/com/onlyoffice/model/documenteditor/callback/History.java b/src/main/java/com/onlyoffice/model/documenteditor/callback/History.java index 3d86e3f6..e8db7471 100644 --- a/src/main/java/com/onlyoffice/model/documenteditor/callback/History.java +++ b/src/main/java/com/onlyoffice/model/documenteditor/callback/History.java @@ -18,6 +18,7 @@ package com.onlyoffice.model.documenteditor.callback; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.onlyoffice.model.common.Changes; import lombok.AllArgsConstructor; @@ -43,6 +44,7 @@ @AllArgsConstructor @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonIgnoreProperties(ignoreUnknown = true) public class History { /** diff --git a/src/main/java/com/onlyoffice/model/documenteditor/callback/Status.java b/src/main/java/com/onlyoffice/model/documenteditor/callback/Status.java index 4a72b6bd..4a478aef 100644 --- a/src/main/java/com/onlyoffice/model/documenteditor/callback/Status.java +++ b/src/main/java/com/onlyoffice/model/documenteditor/callback/Status.java @@ -19,6 +19,7 @@ package com.onlyoffice.model.documenteditor.callback; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonValue; import lombok.AllArgsConstructor; import lombok.Getter; @@ -32,6 +33,7 @@ */ @AllArgsConstructor @Getter +@JsonIgnoreProperties(ignoreUnknown = true) public enum Status { /** diff --git a/src/main/java/com/onlyoffice/model/documenteditor/callback/action/Type.java b/src/main/java/com/onlyoffice/model/documenteditor/callback/action/Type.java index 4c3e340c..51ed7f51 100644 --- a/src/main/java/com/onlyoffice/model/documenteditor/callback/action/Type.java +++ b/src/main/java/com/onlyoffice/model/documenteditor/callback/action/Type.java @@ -19,6 +19,7 @@ package com.onlyoffice.model.documenteditor.callback.action; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonValue; import lombok.AllArgsConstructor; import lombok.Getter; @@ -32,6 +33,7 @@ */ @AllArgsConstructor @Getter +@JsonIgnoreProperties(ignoreUnknown = true) public enum Type { /** From 9587d7316e8e8cef8f7b7a3e022c254775ced850 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Wed, 16 Oct 2024 12:38:48 +0300 Subject: [PATCH 2/2] 1.2.1 --- CHANGELOG.md | 4 ++++ pom.xml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a018c2c..c70426cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 1.2.1 +## Changed +- ignore unknown properties + ## 1.2.0 ## Added - DocumentType - PDF diff --git a/pom.xml b/pom.xml index 825445a9..1d6879b9 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.onlyoffice docs-integration-sdk - 1.2.0 + 1.2.1 jar ${project.groupId}:${project.artifactId}