From 44f02d6d30509ad712fd420281fd531ecfb42ba6 Mon Sep 17 00:00:00 2001 From: JordenReuter <149687553+JordenReuter@users.noreply.github.com> Date: Wed, 8 May 2024 08:12:11 +0200 Subject: [PATCH] feat: added endpoints to mfes in shell response (#66) * feat: added endpoints to mfes in shell response * empty commit --- README.md | 2 +- .../onecx-product-store-svc-extensions.adoc | 26 +++++++++---------- .../external/v1/mappers/ProductMapperV1.java | 7 +++-- src/main/openapi/onecx-product-store-v1.yaml | 4 +++ .../ProductsRestControllerV1Test.java | 1 + 5 files changed, 22 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 1d2afee..994c6f0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # onecx-product-store-svc -OneCx product store service +OneCx product store service Rest interfaces: diff --git a/docs/modules/onecx-product-store-svc/pages/onecx-product-store-svc-extensions.adoc b/docs/modules/onecx-product-store-svc/pages/onecx-product-store-svc-extensions.adoc index 63e3c4e..7844886 100644 --- a/docs/modules/onecx-product-store-svc/pages/onecx-product-store-svc-extensions.adoc +++ b/docs/modules/onecx-product-store-svc/pages/onecx-product-store-svc-extensions.adoc @@ -48,79 +48,79 @@ h| Version | https://quarkus.io/guides/cdi-reference[Link] | https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-arc.adoc[Link] -| 3.9.3 +| 3.9.4 | quarkus-liquibase | https://quarkus.io/guides/liquibase[Link] | https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-liquibase.adoc[Link] -| 3.9.3 +| 3.9.4 | quarkus-smallrye-health | https://quarkus.io/guides/smallrye-health[Link] | https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-smallrye-health.adoc[Link] -| 3.9.3 +| 3.9.4 | quarkus-micrometer-registry-prometheus | https://quarkus.io/guides/telemetry-micrometer[Link] | https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-micrometer-registry-prometheus.adoc[Link] -| 3.9.3 +| 3.9.4 | quarkus-hibernate-orm | https://quarkus.io/guides/hibernate-orm[Link] | https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-hibernate-orm.adoc[Link] -| 3.9.3 +| 3.9.4 | quarkus-rest | https://quarkus.io/guides/rest[Link] | https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-rest.adoc[Link] -| 3.9.3 +| 3.9.4 | quarkus-rest-jackson | https://quarkus.io/guides/rest-json[Link] | -| 3.9.3 +| 3.9.4 | quarkus-jdbc-postgresql | https://quarkus.io/guides/datasource[Link] | https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-jdbc-postgresql.adoc[Link] -| 3.9.3 +| 3.9.4 | quarkus-smallrye-openapi | https://quarkus.io/guides/openapi-swaggerui[Link] | https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-smallrye-openapi.adoc[Link] -| 3.9.3 +| 3.9.4 | quarkus-hibernate-validator | https://quarkus.io/guides/validation[Link] | https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-hibernate-validator.adoc[Link] -| 3.9.3 +| 3.9.4 | quarkus-opentelemetry | https://quarkus.io/guides/opentelemetry[Link] | https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-opentelemetry.adoc[Link] -| 3.9.3 +| 3.9.4 | onecx-core | https://onecx.github.io/docs/onecx-quarkus/current/onecx-quarkus/onecx-core.html[Link] | -| 0.17.0 +| 0.18.0 | quarkus-container-image-docker | https://quarkus.io/guides/container-image[Link] | https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-container-image-docker.adoc[Link] -| 3.9.3 +| 3.9.4 diff --git a/src/main/java/org/tkit/onecx/product/store/rs/external/v1/mappers/ProductMapperV1.java b/src/main/java/org/tkit/onecx/product/store/rs/external/v1/mappers/ProductMapperV1.java index 02f345e..69933d9 100644 --- a/src/main/java/org/tkit/onecx/product/store/rs/external/v1/mappers/ProductMapperV1.java +++ b/src/main/java/org/tkit/onecx/product/store/rs/external/v1/mappers/ProductMapperV1.java @@ -9,10 +9,7 @@ import org.mapstruct.Mapping; import org.mapstruct.NullValueMappingStrategy; import org.tkit.onecx.product.store.domain.criteria.ProductSearchCriteria; -import org.tkit.onecx.product.store.domain.models.Microfrontend; -import org.tkit.onecx.product.store.domain.models.Microservice; -import org.tkit.onecx.product.store.domain.models.Product; -import org.tkit.onecx.product.store.domain.models.Slot; +import org.tkit.onecx.product.store.domain.models.*; import org.tkit.onecx.product.store.domain.wrapper.ProductLoadResultWrapper; import org.tkit.quarkus.jpa.daos.PageResult; import org.tkit.quarkus.rs.mappers.OffsetDateTimeMapper; @@ -108,5 +105,7 @@ default LoadProductItemDTOv1 createLoadProduct(Product product, Map createLoadProductMicrofrontends(List microfrontends); + @Mapping(target = "removeEndpointsItem", ignore = true) LoadProductMicrofrontendDTOv1 createLoadProductMicrofrontend(Microfrontend microfrontend); + } diff --git a/src/main/openapi/onecx-product-store-v1.yaml b/src/main/openapi/onecx-product-store-v1.yaml index 328c017..3a9e784 100644 --- a/src/main/openapi/onecx-product-store-v1.yaml +++ b/src/main/openapi/onecx-product-store-v1.yaml @@ -178,6 +178,10 @@ components: type: string type: $ref: "#/components/schemas/MicrofrontendType" + endpoints: + type: array + items: + $ref: '#/components/schemas/UIEndpoint' ProductItemLoadSearchCriteria: type: object properties: diff --git a/src/test/java/org/tkit/onecx/product/store/rs/external/v1/controllers/ProductsRestControllerV1Test.java b/src/test/java/org/tkit/onecx/product/store/rs/external/v1/controllers/ProductsRestControllerV1Test.java index 95b4353..2a03e4d 100644 --- a/src/test/java/org/tkit/onecx/product/store/rs/external/v1/controllers/ProductsRestControllerV1Test.java +++ b/src/test/java/org/tkit/onecx/product/store/rs/external/v1/controllers/ProductsRestControllerV1Test.java @@ -200,6 +200,7 @@ void loadProductsByNamesTest() { var p1 = data.getProducts().stream().filter(x -> "product1".equals(x.getName())).findFirst().orElse(null); assertThat(p1).isNotNull(); assertThat(p1.getMicrofrontends()).isNotNull().hasSize(2); + assertThat(p1.getMicrofrontends().get(0).getEndpoints()).hasSize(2); var p2 = data.getProducts().stream().filter(x -> "product2".equals(x.getName())).findFirst().orElse(null); assertThat(p2).isNotNull(); assertThat(p2.getMicrofrontends()).isNotNull().isEmpty();