From da017c1db99387a382982692c12ed9e1c168d62b Mon Sep 17 00:00:00 2001 From: Muhammad Saud Khan Date: Mon, 15 Jan 2024 17:33:19 +0100 Subject: [PATCH 1/2] feat: added timeToLive attribute to the discoveryfinder model --- .../models/catenax/Discovery.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/dpp-backend/digitalproductpass/src/main/java/org/eclipse/tractusx/digitalproductpass/models/catenax/Discovery.java b/dpp-backend/digitalproductpass/src/main/java/org/eclipse/tractusx/digitalproductpass/models/catenax/Discovery.java index 2792b0525..cf4b13925 100644 --- a/dpp-backend/digitalproductpass/src/main/java/org/eclipse/tractusx/digitalproductpass/models/catenax/Discovery.java +++ b/dpp-backend/digitalproductpass/src/main/java/org/eclipse/tractusx/digitalproductpass/models/catenax/Discovery.java @@ -25,6 +25,7 @@ package org.eclipse.tractusx.digitalproductpass.models.catenax; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -34,6 +35,7 @@ * This class consists exclusively to define attributes and methods related to discovering the needed Endpoints. **/ @JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) public class Discovery { /** ATTRIBUTES **/ @@ -73,14 +75,17 @@ public static class Endpoint { String documentation; @JsonProperty("resourceId") String resourceId; + @JsonProperty("timeToLive") + String timeToLive; /** CONSTRUCTOR(S) **/ - public Endpoint(String type, String description, String endpointAddress, String documentation, String resourceId) { + public Endpoint(String type, String description, String endpointAddress, String documentation, String resourceId, String timeToLive) { this.type = type; this.description = description; this.endpointAddress = endpointAddress; this.documentation = documentation; this.resourceId = resourceId; + this.timeToLive = timeToLive; } public Endpoint() { } @@ -121,5 +126,13 @@ public String getResourceId() { public void setResourceId(String resourceId) { this.resourceId = resourceId; } + @SuppressWarnings("Unused") + public String getTimeToLive() { + return timeToLive; + } + @SuppressWarnings("Unused") + public void setTimeToLive(String timeToLive) { + this.timeToLive = timeToLive; + } } } From a1f27e12f1d9e50e8643f5a6828c8409fa77c2bf Mon Sep 17 00:00:00 2001 From: Saud Khan <98085363+saudkhan116@users.noreply.github.com> Date: Thu, 18 Jan 2024 16:28:27 +0100 Subject: [PATCH 2/2] renamed file from the MOCK --- src/assets/MOCK/{CX:XYZ78901:BAT-XYZ789.json => BAT-XYZ789.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/assets/MOCK/{CX:XYZ78901:BAT-XYZ789.json => BAT-XYZ789.json} (100%) diff --git a/src/assets/MOCK/CX:XYZ78901:BAT-XYZ789.json b/src/assets/MOCK/BAT-XYZ789.json similarity index 100% rename from src/assets/MOCK/CX:XYZ78901:BAT-XYZ789.json rename to src/assets/MOCK/BAT-XYZ789.json