From 7394c6af00387e5c321727f5a49210a6dd1dbbaa Mon Sep 17 00:00:00 2001 From: Vladysl <45620393+Vladysl@users.noreply.github.com> Date: Wed, 29 Nov 2023 13:55:31 +0200 Subject: [PATCH] 1518 - Splitted Swagger UI into 2 pages for platform-api and ingestion-api (#1537) --- gradle/libs.versions.toml | 2 +- .../config/SwaggerUIConfiguration.java | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 odd-platform-api/src/main/java/org/opendatadiscovery/oddplatform/config/SwaggerUIConfiguration.java diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 77082f196..038ae545e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,7 +2,7 @@ spring-webflux = '6.0.9' reactor-extra = '3.5.1' micrometer-registry-prometheus = '1.9.0' -ingestion-contract-server = '0.1.28' +ingestion-contract-server = '0.1.32' oddrn-generator-java = '0.1.20' odd-integration-manifests = '0.0.6' apache-collections = '4.4' diff --git a/odd-platform-api/src/main/java/org/opendatadiscovery/oddplatform/config/SwaggerUIConfiguration.java b/odd-platform-api/src/main/java/org/opendatadiscovery/oddplatform/config/SwaggerUIConfiguration.java new file mode 100644 index 000000000..1cb2e971d --- /dev/null +++ b/odd-platform-api/src/main/java/org/opendatadiscovery/oddplatform/config/SwaggerUIConfiguration.java @@ -0,0 +1,23 @@ +package org.opendatadiscovery.oddplatform.config; + +import org.springdoc.core.models.GroupedOpenApi; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class SwaggerUIConfiguration { + + @Bean + public GroupedOpenApi platformOpenApi() { + final String[] paths = { "/api/**" }; + return GroupedOpenApi.builder().group("platform-api").pathsToMatch(paths) + .build(); + } + + @Bean + public GroupedOpenApi ingestionOpenApi() { + final String[] paths = { "/ingestion/**" }; + return GroupedOpenApi.builder().group("ingestion-api").pathsToMatch(paths) + .build(); + } +}