Skip to content

Commit

Permalink
feat: added endpoints to mfes in shell response (#66)
Browse files Browse the repository at this point in the history
* feat: added endpoints to mfes in shell response

* empty commit
  • Loading branch information
JordenReuter authored May 8, 2024
1 parent f0096b3 commit 44f02d6
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# onecx-product-store-svc

OneCx product store service
OneCx product store service

Rest interfaces:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -108,5 +105,7 @@ default LoadProductItemDTOv1 createLoadProduct(Product product, Map<String, List
@IterableMapping(nullValueMappingStrategy = NullValueMappingStrategy.RETURN_DEFAULT)
List<LoadProductMicrofrontendDTOv1> createLoadProductMicrofrontends(List<Microfrontend> microfrontends);

@Mapping(target = "removeEndpointsItem", ignore = true)
LoadProductMicrofrontendDTOv1 createLoadProductMicrofrontend(Microfrontend microfrontend);

}
4 changes: 4 additions & 0 deletions src/main/openapi/onecx-product-store-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ components:
type: string
type:
$ref: "#/components/schemas/MicrofrontendType"
endpoints:
type: array
items:
$ref: '#/components/schemas/UIEndpoint'
ProductItemLoadSearchCriteria:
type: object
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 44f02d6

Please sign in to comment.