diff --git a/apps/scholexplorer-api/src/main/java/eu/dnetlib/scholix/api/MainApplication.java b/apps/scholexplorer-api/src/main/java/eu/dnetlib/scholix/api/MainApplication.java index 91b3b3cd..bb244ef5 100644 --- a/apps/scholexplorer-api/src/main/java/eu/dnetlib/scholix/api/MainApplication.java +++ b/apps/scholexplorer-api/src/main/java/eu/dnetlib/scholix/api/MainApplication.java @@ -76,7 +76,7 @@ public class MainApplication extends AbstractDnetApp { @Bean public GroupedOpenApi publicApiV2() { return GroupedOpenApi.builder() - .group(ScholixAPIConstants.API_V1_NAME) + .group(ScholixAPIConstants.API_V2_NAME) .pathsToMatch("/v2/**") .build(); } @@ -86,4 +86,9 @@ public class MainApplication extends AbstractDnetApp { return "ScholeExplorer APIs"; } + @Override + protected String swaggerDesc() { + return ScholixAPIConstants.API_DESCRIPTION; + } + } diff --git a/apps/scholexplorer-api/src/main/java/eu/dnetlib/scholix/api/controller/ScholixControllerV1.java b/apps/scholexplorer-api/src/main/java/eu/dnetlib/scholix/api/controller/ScholixControllerV1.java index e5f57af9..050fc086 100644 --- a/apps/scholexplorer-api/src/main/java/eu/dnetlib/scholix/api/controller/ScholixControllerV1.java +++ b/apps/scholexplorer-api/src/main/java/eu/dnetlib/scholix/api/controller/ScholixControllerV1.java @@ -5,6 +5,7 @@ import java.util.stream.Collectors; import javax.validation.constraints.NotNull; +import io.swagger.v3.oas.annotations.media.Schema; import org.apache.commons.lang3.tuple.Pair; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -21,7 +22,6 @@ import io.micrometer.core.annotation.Timed; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.enums.ParameterIn; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; @RestController @@ -36,7 +36,7 @@ public class ScholixControllerV1 extends AbstractDnetController { @GetMapping("/linksFromPublisher") @Timed(value = "scholix.v1.linksFromPublisher", description = "Time taken to return links on Version 1.0 of Scholix collected from a publisher") public List linksFromPublisher( - @Parameter(in = ParameterIn.QUERY, description = "Filter Scholix relationships collected from a publisher", schema = @Schema(), required = true) final String publisher, + @Parameter(in = ParameterIn.QUERY, description = "Filter Scholix relationships collected from a publisher", required = true) final String publisher, @Parameter(in = ParameterIn.QUERY, description = "The page number") @RequestParam(required = false) final Integer page) throws ScholixException { final int currentPage = page != null ? page : 0; @@ -51,7 +51,7 @@ public class ScholixControllerV1 extends AbstractDnetController { @GetMapping("/linksFromDatasource") @Timed(value = "scholix.v1.linksFromDatasource", description = "Time taken to return links on Version 1.0 of Scholix collected from a LinkProvider") public List linksFromDatasource( - @Parameter(in = ParameterIn.QUERY, description = "Filter Scholix relationships collected from a LinkProvider", schema = @Schema()) @NotNull final String datasource, + @Parameter(in = ParameterIn.QUERY, description = "Filter Scholix relationships collected from a LinkProvider") @NotNull final String datasource, @Parameter(in = ParameterIn.QUERY, description = "The page number") @RequestParam(required = false) final Integer page) throws ScholixException { final int currentPage = page != null ? page : 0; @@ -61,6 +61,8 @@ public class ScholixControllerV1 extends AbstractDnetController { return scholixData.stream().map(ScholixV1::fromScholix).collect(Collectors.toList()); } + + @Operation(summary = "Retrieve all scholix links from a persistent identifier", description = "The linksFromPid endpoint returns a list of scholix object related from a specific persistent identifier") @GetMapping("/linksFromPid") @Timed(value = "scholix.v1.linksFromPid", description = "Time taken to return links on Version 1.0 of Scholix related from a specific persistent identifier") diff --git a/apps/scholexplorer-api/src/main/resources/application.properties b/apps/scholexplorer-api/src/main/resources/application.properties index 7d221d89..ed836a81 100644 --- a/apps/scholexplorer-api/src/main/resources/application.properties +++ b/apps/scholexplorer-api/src/main/resources/application.properties @@ -22,8 +22,11 @@ management.metrics.distribution.percentiles.http.server.requests=0.5, 0.9, 0.95, -scholix.elastic.clusterNodes = 10.19.65.51:9200,10.19.65.52:9200,10.19.65.53:9200,10.19.65.54:9200 -#scholix.elastic.clusterNodes = localhost:9200 +#scholix.elastic.clusterNodes = 10.19.65.51:9200,10.19.65.52:9200,10.19.65.53:9200,10.19.65.54:9200 +scholix.elastic.clusterNodes = localhost:9200 scholix.elastic.indexName = dli_scholix scholix.elastic.socketTimeout = 60000 scholix.elastic.connectionTimeout= 60000 + + + diff --git a/pom.xml b/pom.xml index 80951f83..75e53115 100644 --- a/pom.xml +++ b/pom.xml @@ -446,7 +446,7 @@ UTF-8 3.6.0 1.8 - 2.11.33 + 2.12.2-SNAPSHOT 7.1.0 3.4.2 0.10.0