From 93fe3c226e844e3fa87e822d5b020d849b6e6eac Mon Sep 17 00:00:00 2001
From: JordenReuter <149687553+JordenReuter@users.noreply.github.com>
Date: Thu, 11 Jul 2024 10:34:22 +0200
Subject: [PATCH] feat: update responses and parent (#67)
---
.../pages/onecx-product-store-bff-docs.adoc | 12 +++-
.../onecx-product-store-bff-extensions.adoc | 58 +++++++++----------
pom.xml | 2 +-
.../MicrofrontendsRestController.java | 5 +-
.../MicroservicesRestController.java | 4 +-
.../controllers/ProductsRestController.java | 5 +-
6 files changed, 45 insertions(+), 41 deletions(-)
diff --git a/docs/modules/onecx-product-store-bff/pages/onecx-product-store-bff-docs.adoc b/docs/modules/onecx-product-store-bff/pages/onecx-product-store-bff-docs.adoc
index f257eb5..1ebfd54 100644
--- a/docs/modules/onecx-product-store-bff/pages/onecx-product-store-bff-docs.adoc
+++ b/docs/modules/onecx-product-store-bff/pages/onecx-product-store-bff-docs.adoc
@@ -24,21 +24,24 @@ quarkus.openapi-generator.codegen.spec.onecx_product_store_internal_yaml.base-pa
quarkus.openapi-generator.codegen.spec.onecx_product_store_internal_yaml.return-response=true
quarkus.openapi-generator.codegen.spec.onecx_product_store_internal_yaml.additional-api-type-annotations=@org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders;
quarkus.openapi-generator.codegen.spec.onecx_product_store_internal_yaml.additional-model-type-annotations=@io.quarkus.runtime.annotations.RegisterForReflection;
+quarkus.openapi-generator.codegen.spec.onecx_product_store_internal_yaml.enable-security-generation=false
quarkus.openapi-generator.codegen.spec.onecx_image_internal_yaml.config-key=onecx_image_internal
quarkus.openapi-generator.codegen.spec.onecx_image_internal_yaml.base-package=gen.org.tkit.onecx.product.store.client
quarkus.openapi-generator.codegen.spec.onecx_image_internal_yaml.return-response=true
quarkus.openapi-generator.codegen.spec.onecx_image_internal_yaml.additional-api-type-annotations=@org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders;
quarkus.openapi-generator.codegen.spec.onecx_image_internal_yaml.type-mappings.File=byte[]
quarkus.openapi-generator.codegen.spec.onecx_image_internal_yaml.additional-model-type-annotations=@io.quarkus.runtime.annotations.RegisterForReflection;
+quarkus.openapi-generator.codegen.spec.onecx_image_internal_yaml.enable-security-generation=false
quarkus.openapi-generator.codegen.spec.onecx_workspace_svc_external_v1_yaml.config-key=onecx_workspace_svc_external_v1
quarkus.openapi-generator.codegen.spec.onecx_workspace_svc_external_v1_yaml.base-package=gen.org.tkit.onecx.workspace.client
quarkus.openapi-generator.codegen.spec.onecx_workspace_svc_external_v1_yaml.return-response=true
quarkus.openapi-generator.codegen.spec.onecx_workspace_svc_external_v1_yaml.additional-api-type-annotations=@org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders;
quarkus.openapi-generator.codegen.spec.onecx_workspace_svc_external_v1_yaml.additional-model-type-annotations=@io.quarkus.runtime.annotations.RegisterForReflection;
+quarkus.openapi-generator.codegen.spec.onecx_workspace_svc_external_v1_yaml.enable-security-generation=false
quarkus.openapi-generator.codegen.input-base-dir=target/tmp/openapi
-%prod.quarkus.rest-client.onecx_product_store_internal_yaml.providers=io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter
-%prod.quarkus.rest-client.onecx_image_internal_yaml.providers=io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter
-%prod.quarkus.rest-client.onecx_workspace_svc_external_v1_yaml.providers=io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter
+%prod.quarkus.rest-client.onecx_product_store_internal.providers=io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter
+%prod.quarkus.rest-client.onecx_image_internal.providers=io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter
+%prod.quarkus.rest-client.onecx_workspace_svc_external_v1.providers=io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter
%prod.quarkus.oidc-client.client-id=${quarkus.application.name}
----
====
@@ -93,5 +96,8 @@ app:
keycloak:
client:
enabled: true
+ spec:
+ kcConfig:
+ defaultClientScopes: [ ocx-ps:all, ocx-ws:read, ocx-pm:read ]
----
diff --git a/docs/modules/onecx-product-store-bff/pages/onecx-product-store-bff-extensions.adoc b/docs/modules/onecx-product-store-bff/pages/onecx-product-store-bff-extensions.adoc
index ba3d551..5835b91 100644
--- a/docs/modules/onecx-product-store-bff/pages/onecx-product-store-bff-extensions.adoc
+++ b/docs/modules/onecx-product-store-bff/pages/onecx-product-store-bff-extensions.adoc
@@ -12,37 +12,37 @@ h| Version
| https://quarkus.io/guides/rest[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-rest.adoc[Link]
-| 3.11.1
+| 3.12.2
| 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.11.1
+| 3.12.2
| quarkus-rest-jackson
| https://quarkus.io/guides/rest-json[Link]
|
-| 3.11.1
+| 3.12.2
| 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.11.1
+| 3.12.2
| 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.11.1
+| 3.12.2
| 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.11.1
+| 3.12.2
| quarkus-openapi-generator
@@ -54,92 +54,92 @@ h| Version
| https://quarkus.io/guides/rest-client[Link]
|
-| 3.11.1
+| 3.12.2
| tkit-quarkus-log-cdi
| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-cdi.html[Link]
-| https://github.com/1000kit/tkit-quarkus/blob/2.25.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-cdi.adoc[Link]
-| 2.25.0
+| https://github.com/1000kit/tkit-quarkus/blob/2.27.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-cdi.adoc[Link]
+| 2.27.0
| tkit-quarkus-log-rs
| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-rs.html[Link]
-| https://github.com/1000kit/tkit-quarkus/blob/2.25.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-rs.adoc[Link]
-| 2.25.0
+| https://github.com/1000kit/tkit-quarkus/blob/2.27.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-rs.adoc[Link]
+| 2.27.0
| tkit-quarkus-log-json
| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-json.html[Link]
-| https://github.com/1000kit/tkit-quarkus/blob/2.25.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-json.adoc[Link]
-| 2.25.0
+| https://github.com/1000kit/tkit-quarkus/blob/2.27.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-json.adoc[Link]
+| 2.27.0
| tkit-quarkus-rest
| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-rest.html[Link]
-| https://github.com/1000kit/tkit-quarkus/blob/2.25.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-rest.adoc[Link]
-| 2.25.0
+| https://github.com/1000kit/tkit-quarkus/blob/2.27.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-rest.adoc[Link]
+| 2.27.0
| tkit-quarkus-rest-context
| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-rest-context.html[Link]
-| https://github.com/1000kit/tkit-quarkus/blob/2.25.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-rest-context.adoc[Link]
-| 2.25.0
+| https://github.com/1000kit/tkit-quarkus/blob/2.27.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-rest-context.adoc[Link]
+| 2.27.0
| tkit-quarkus-jpa
| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-jpa.html[Link]
-| https://github.com/1000kit/tkit-quarkus/blob/2.25.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-jpa.adoc[Link]
-| 2.25.0
+| https://github.com/1000kit/tkit-quarkus/blob/2.27.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-jpa.adoc[Link]
+| 2.27.0
| 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.11.1
+| 3.12.2
| onecx-permissions
| https://onecx.github.io/docs/onecx-quarkus/current/onecx-quarkus/onecx-permissions.html[Link]
-| https://github.com/onecx/onecx-quarkus/blob/0.20.0/docs/modules/onecx-quarkus/pages/includes/onecx-permissions.adoc[Link]
-| 0.20.0
+| https://github.com/onecx/onecx-quarkus/blob/0.22.0/docs/modules/onecx-quarkus/pages/includes/onecx-permissions.adoc[Link]
+| 0.22.0
| quarkus-oidc
| https://quarkus.io/guides/security-oidc-bearer-token-authentication-tutorial[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-oidc.adoc[Link]
-| 3.11.1
+| 3.12.2
| tkit-quarkus-security
| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-security.html[Link]
-| https://github.com/1000kit/tkit-quarkus/blob/2.25.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-security.adoc[Link]
-| 2.25.0
+| https://github.com/1000kit/tkit-quarkus/blob/2.27.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-security.adoc[Link]
+| 2.27.0
| onecx-core
| https://onecx.github.io/docs/onecx-quarkus/current/onecx-quarkus/onecx-core.html[Link]
|
-| 0.20.0
+| 0.22.0
| quarkus-arc
| 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.11.1
+| 3.12.2
| 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.11.1
+| 3.12.2
| quarkus-rest-client-oidc-filter
|
|
-| 3.11.1
+| 3.12.2
|===kus-arc.adoc[Link]
diff --git a/pom.xml b/pom.xml
index 70d5362..f325303 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
org.tkit.onecx
onecx-quarkus3-parent
- 0.54.0
+ 0.56.0
onecx-product-store-bff
diff --git a/src/main/java/org/tkit/onecx/product/store/bff/rs/controllers/MicrofrontendsRestController.java b/src/main/java/org/tkit/onecx/product/store/bff/rs/controllers/MicrofrontendsRestController.java
index 7a187cb..acdf9f3 100644
--- a/src/main/java/org/tkit/onecx/product/store/bff/rs/controllers/MicrofrontendsRestController.java
+++ b/src/main/java/org/tkit/onecx/product/store/bff/rs/controllers/MicrofrontendsRestController.java
@@ -62,9 +62,8 @@ public Response createMicrofrontend(CreateMicrofrontendRequestDTO createMicrofro
@Override
public Response deleteMicrofrontend(String id) {
-
try (Response response = client.deleteMicrofrontend(id)) {
- return Response.fromResponse(response).build();
+ return Response.status(response.getStatus()).build();
}
}
@@ -92,7 +91,7 @@ public Response searchMicrofrontends(MfeAndMsSearchCriteriaDTO microfrontendSear
public Response updateMicrofrontend(String id, UpdateMicrofrontendRequestDTO updateMicrofrontendRequestDTO) {
try (Response response = client.updateMicrofrontend(id, mapper.mapUpdateMfe(updateMicrofrontendRequestDTO))) {
- return Response.fromResponse(response).build();
+ return Response.status(response.getStatus()).build();
} catch (WebApplicationException ex) {
return Response.status(ex.getResponse().getStatus())
.entity(problemDetailMapper.map(ex.getResponse().readEntity(ProblemDetailResponse.class))).build();
diff --git a/src/main/java/org/tkit/onecx/product/store/bff/rs/controllers/MicroservicesRestController.java b/src/main/java/org/tkit/onecx/product/store/bff/rs/controllers/MicroservicesRestController.java
index 00a9860..ddac89a 100644
--- a/src/main/java/org/tkit/onecx/product/store/bff/rs/controllers/MicroservicesRestController.java
+++ b/src/main/java/org/tkit/onecx/product/store/bff/rs/controllers/MicroservicesRestController.java
@@ -57,7 +57,7 @@ public Response createMicroservice(CreateMicroserviceRequestDTO createMicroservi
@Override
public Response deleteMicroservice(String id) {
try (Response response = client.deleteMicroservice(id)) {
- return Response.fromResponse(response).build();
+ return Response.status(response.getStatus()).build();
}
}
@@ -82,7 +82,7 @@ public Response searchMicroservice(MfeAndMsSearchCriteriaDTO microserviceSearchC
@Override
public Response updateMicroservice(String id, UpdateMicroserviceRequestDTO updateMicroserviceRequestDTO) {
try (Response response = client.updateMicroservice(id, mapper.mapUpdateMs(updateMicroserviceRequestDTO))) {
- return Response.fromResponse(response).build();
+ return Response.status(response.getStatus()).build();
} catch (WebApplicationException ex) {
return Response.status(ex.getResponse().getStatus())
.entity(problemDetailMapper.map(ex.getResponse().readEntity(ProblemDetailResponse.class))).build();
diff --git a/src/main/java/org/tkit/onecx/product/store/bff/rs/controllers/ProductsRestController.java b/src/main/java/org/tkit/onecx/product/store/bff/rs/controllers/ProductsRestController.java
index bc6cd88..13c6bce 100644
--- a/src/main/java/org/tkit/onecx/product/store/bff/rs/controllers/ProductsRestController.java
+++ b/src/main/java/org/tkit/onecx/product/store/bff/rs/controllers/ProductsRestController.java
@@ -92,9 +92,8 @@ public Response createProduct(CreateProductRequestDTO createProductRequestDTO) {
@Override
public Response deleteProduct(String id) {
-
try (Response response = client.deleteProduct(id)) {
- return Response.fromResponse(response).build();
+ return Response.status(response.getStatus()).build();
}
}
@@ -161,7 +160,7 @@ public Response searchProducts(ProductSearchCriteriaDTO productSearchCriteriaDTO
public Response updateProduct(String id, UpdateProductRequestDTO updateProductRequestDTO) {
try (Response response = client.updateProduct(id, mapper.mapUpdateProduct(updateProductRequestDTO))) {
- return Response.fromResponse(response).build();
+ return Response.status(response.getStatus()).build();
} catch (WebApplicationException ex) {
return Response.status(ex.getResponse().getStatus())
.entity(problemDetailMapper.map(ex.getResponse().readEntity(ProblemDetailResponse.class))).build();