From 1bd066e95e35798f5b0b5f7ead42564eb28c3b19 Mon Sep 17 00:00:00 2001 From: Mikhail Podolskiy Date: Tue, 29 Oct 2024 14:27:27 +0100 Subject: [PATCH] #2517 Ignore unknown properties --- .../java/org/gbif/ipt/model/datapackage/metadata/col/Agent.java | 2 ++ .../org/gbif/ipt/model/datapackage/metadata/col/Citation.java | 2 ++ .../gbif/ipt/model/datapackage/metadata/col/ColMetadata.java | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/main/java/org/gbif/ipt/model/datapackage/metadata/col/Agent.java b/src/main/java/org/gbif/ipt/model/datapackage/metadata/col/Agent.java index 43019ef24d..cbb3ff07eb 100644 --- a/src/main/java/org/gbif/ipt/model/datapackage/metadata/col/Agent.java +++ b/src/main/java/org/gbif/ipt/model/datapackage/metadata/col/Agent.java @@ -18,6 +18,7 @@ import java.util.StringJoiner; import javax.validation.constraints.Size; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -30,6 +31,7 @@ * The minimum requirement is either a persons family name, an organisation name or any of the identifiers for them. */ @JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) @JsonPropertyOrder({ "orcid", "family", diff --git a/src/main/java/org/gbif/ipt/model/datapackage/metadata/col/Citation.java b/src/main/java/org/gbif/ipt/model/datapackage/metadata/col/Citation.java index 72c6543d2e..6099ca7642 100644 --- a/src/main/java/org/gbif/ipt/model/datapackage/metadata/col/Citation.java +++ b/src/main/java/org/gbif/ipt/model/datapackage/metadata/col/Citation.java @@ -29,6 +29,7 @@ import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -39,6 +40,7 @@ * Generated from JSON schema. */ @JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) @JsonPropertyOrder({ "id", "type", diff --git a/src/main/java/org/gbif/ipt/model/datapackage/metadata/col/ColMetadata.java b/src/main/java/org/gbif/ipt/model/datapackage/metadata/col/ColMetadata.java index aedb9e60ac..67f2c0efe5 100644 --- a/src/main/java/org/gbif/ipt/model/datapackage/metadata/col/ColMetadata.java +++ b/src/main/java/org/gbif/ipt/model/datapackage/metadata/col/ColMetadata.java @@ -27,6 +27,7 @@ import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -37,6 +38,7 @@ * Generated from JSON schema. */ @JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) @JsonPropertyOrder({ "doi", "identifier",