From 193dccb38570ec103032b1166ffb2a85a8dcb02e Mon Sep 17 00:00:00 2001 From: vburlachenko Date: Wed, 29 Nov 2023 13:34:56 +0200 Subject: [PATCH 1/2] 1518 - Splitted Swagger UI into 2 pages for platform-api and ingestion api --- 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..9814152aa --- /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 apiOpenApi() { + 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(); + } +} From 474ccde713ff10114dfc25f05186c8f4dd84ef47 Mon Sep 17 00:00:00 2001 From: vburlachenko Date: Wed, 29 Nov 2023 13:46:47 +0200 Subject: [PATCH 2/2] 1518 - Splitted Swagger UI into 2 pages for platform-api and ingestion api --- .../oddplatform/config/SwaggerUIConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index 9814152aa..1cb2e971d 100644 --- 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 @@ -8,7 +8,7 @@ public class SwaggerUIConfiguration { @Bean - public GroupedOpenApi apiOpenApi() { + public GroupedOpenApi platformOpenApi() { final String[] paths = { "/api/**" }; return GroupedOpenApi.builder().group("platform-api").pathsToMatch(paths) .build();