diff --git a/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/io/OrgDataClient.java b/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/io/OrgDataClient.java index 0355cb11b20..8b1a791a14b 100644 --- a/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/io/OrgDataClient.java +++ b/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/io/OrgDataClient.java @@ -32,9 +32,9 @@ public class OrgDataClient { */ public T get(String url, String userAgent, Class type) { JerseyClientResponse response = jerseyClientHelperForOrgLoaders.executeGetRequest(url, null, null, false, Map.of(), Map.of("User-Agent", userAgent), type, String.class); - int status = response.getStatus(); + int status = response.getStatus(); if (status != 200) { - LOGGER.warn("Unable to fetch file {}: {}", new Object[] { url, status }); + LOGGER.error("Unable to fetch file {}: {}", new Object[] { url, status }); return null; } return response.getEntity(); diff --git a/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/ror/RorOrgLoadSource.java b/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/ror/RorOrgLoadSource.java index 37a9840c5f1..a42ddc906c5 100644 --- a/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/ror/RorOrgLoadSource.java +++ b/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/ror/RorOrgLoadSource.java @@ -79,7 +79,7 @@ public class RorOrgLoadSource implements OrgLoadSource { @Resource private OrgDisambiguatedExternalIdentifierDao orgDisambiguatedExternalIdentifierDao; - @Value("${org.orcid.core.orgs.ror.zenodoRecordsUrl:https://zenodo.org/api/records/?communities=ror-data}") + @Value("${org.orcid.core.orgs.ror.zenodoRecordsUrl:https://zenodo.org/api/records?communities=ror-data}") private String rorZenodoRecordsUrl; @Resource diff --git a/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/zenodo/api/ZenodoRecords.java b/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/zenodo/api/ZenodoRecords.java index f3227f51c6c..9056f740542 100644 --- a/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/zenodo/api/ZenodoRecords.java +++ b/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/zenodo/api/ZenodoRecords.java @@ -6,7 +6,7 @@ @JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(value = { "aggregations", "links" }) +@JsonIgnoreProperties(ignoreUnknown = true) public class ZenodoRecords { @JsonProperty("hits") diff --git a/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/zenodo/api/ZenodoRecordsFile.java b/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/zenodo/api/ZenodoRecordsFile.java index 130fedfb488..3b38579f44e 100644 --- a/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/zenodo/api/ZenodoRecordsFile.java +++ b/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/zenodo/api/ZenodoRecordsFile.java @@ -1,7 +1,9 @@ package org.orcid.scheduler.loader.source.zenodo.api; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +@JsonIgnoreProperties(ignoreUnknown = true) public class ZenodoRecordsFile { @JsonProperty("bucket") diff --git a/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/zenodo/api/ZenodoRecordsFileLinks.java b/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/zenodo/api/ZenodoRecordsFileLinks.java index 50e505ed29a..c101e896b74 100644 --- a/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/zenodo/api/ZenodoRecordsFileLinks.java +++ b/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/zenodo/api/ZenodoRecordsFileLinks.java @@ -1,7 +1,9 @@ package org.orcid.scheduler.loader.source.zenodo.api; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +@JsonIgnoreProperties(ignoreUnknown = true) public class ZenodoRecordsFileLinks { @JsonProperty("self") diff --git a/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/zenodo/api/ZenodoRecordsHit.java b/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/zenodo/api/ZenodoRecordsHit.java index 31a0b352a7e..6c8caaafb7d 100644 --- a/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/zenodo/api/ZenodoRecordsHit.java +++ b/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/zenodo/api/ZenodoRecordsHit.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; @JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(value = { "metadata", "owners", "stats", "revision" }) +@JsonIgnoreProperties(ignoreUnknown = true) public class ZenodoRecordsHit { @JsonProperty("conceptdoi") diff --git a/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/zenodo/api/ZenodoRecordsHitLinks.java b/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/zenodo/api/ZenodoRecordsHitLinks.java index 57ba1b1e46f..f33ec19d1c9 100644 --- a/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/zenodo/api/ZenodoRecordsHitLinks.java +++ b/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/zenodo/api/ZenodoRecordsHitLinks.java @@ -1,7 +1,9 @@ package org.orcid.scheduler.loader.source.zenodo.api; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +@JsonIgnoreProperties(ignoreUnknown = true) public class ZenodoRecordsHitLinks { @JsonProperty("badge") diff --git a/properties/development.properties b/properties/development.properties index bfcef35f40a..de9a4064834 100644 --- a/properties/development.properties +++ b/properties/development.properties @@ -196,7 +196,7 @@ org.orcid.core.orgs.fundref.localFilePath=/tmp/some/path # ROR org imports org.orcid.core.orgs.ror.enabled=false -org.orcid.core.orgs.ror.zenodoRecordsUrl=https://zenodo.org/api/records/?communities=ror-data +org.orcid.core.orgs.ror.zenodoRecordsUrl=https://zenodo.org/api/records?communities=ror-data org.orcid.core.orgs.ror.localDataPath=/tmp/ror/ror.json org.orcid.core.orgs.ror.localZipPath=/tmp/ror/ror.zip