From daf99809e64e2b23bacd638eda8b390f84730d15 Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Wed, 23 Oct 2024 17:56:00 +0200 Subject: [PATCH] added default value ('false`) to `includeCollections` parameter --- .../application/geoportal/service/rest/GeoportalHealth.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/GeoportalHealth.java b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/GeoportalHealth.java index 47a53de..6df4bb4 100644 --- a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/GeoportalHealth.java +++ b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/GeoportalHealth.java @@ -1,5 +1,6 @@ package org.gcube.application.geoportal.service.rest; +import javax.ws.rs.DefaultValue; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; @@ -74,8 +75,9 @@ public class GeoportalHealth { @Path("/mongo") @Produces({ MediaType.APPLICATION_JSON }) public Response mongoCheck(@QueryParam("context") String context, - @QueryParam("include_collections") Boolean includeCollections) throws JsonProcessingException { - log.debug("mongoCheck called in the context {}", context); + @DefaultValue("false") @QueryParam("include_collections") Boolean includeCollections) + throws JsonProcessingException { + log.debug("mongoCheck called in the context {}, includeCollections {}", context, includeCollections); if (context == null) { HealthCheckResponse response = HealthCheckResponse.named(MongoHealthCheck.SERVICE_NAME) .withData("context", "is required parameter (e.g. context=/gcube/devsec/devVRE)").down().build();