From 57dec57f7294768a7efffd3a6031e118a9eb799f Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Thu, 18 Apr 2024 17:43:35 +0200 Subject: [PATCH] updated consumes --- .settings/org.eclipse.wst.common.component | 3 +++ .../datatransfer/resolver/services/GeoportalExporter.java | 5 ++++- .../datatransfer/resolver/services/GeoportalResolver.java | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index f98fdce..da8308c 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -129,6 +129,9 @@ + + uses + uses diff --git a/src/main/java/org/gcube/datatransfer/resolver/services/GeoportalExporter.java b/src/main/java/org/gcube/datatransfer/resolver/services/GeoportalExporter.java index 9061f43..9641623 100644 --- a/src/main/java/org/gcube/datatransfer/resolver/services/GeoportalExporter.java +++ b/src/main/java/org/gcube/datatransfer/resolver/services/GeoportalExporter.java @@ -4,6 +4,7 @@ import javax.servlet.http.HttpServletRequest; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; @@ -29,7 +30,7 @@ import org.slf4j.LoggerFactory; * * Apr 16, 2024 */ -@Path("/geoportal") +@Path("geoportal") public class GeoportalExporter { public static final String EXPORT_TYPE = "type"; @@ -58,6 +59,7 @@ public class GeoportalExporter { */ @GET @Path("/export/{type}/{usecase_id}/{project_id}") + @Produces({ MediaType.TEXT_HTML, MediaType.TEXT_PLAIN }) public Response export(@Context HttpServletRequest req, @PathParam(EXPORT_TYPE) String export_type, @PathParam(PATH_USECASE_ID) String ucdID, @PathParam(PATH_PROJECT_ID) String projectID) throws WebApplicationException { @@ -129,6 +131,7 @@ public class GeoportalExporter { @GET @Path("/export/{type}/healthcheck") + @Produces({ MediaType.TEXT_HTML, MediaType.TEXT_PLAIN }) public Response healthcheck(@Context HttpServletRequest req, @PathParam(EXPORT_TYPE) String export_type) throws WebApplicationException { diff --git a/src/main/java/org/gcube/datatransfer/resolver/services/GeoportalResolver.java b/src/main/java/org/gcube/datatransfer/resolver/services/GeoportalResolver.java index e063e7b..33d9dd0 100644 --- a/src/main/java/org/gcube/datatransfer/resolver/services/GeoportalResolver.java +++ b/src/main/java/org/gcube/datatransfer/resolver/services/GeoportalResolver.java @@ -47,7 +47,7 @@ import com.google.common.cache.CacheLoader.InvalidCacheLoadException; * * Apr 03, 2024 */ -@Path("/geo") +@Path("geo") public class GeoportalResolver { public static final String GEO_DE = "de"; // data-entry