Skip to content

Commit

Permalink
feat: migration tkit.org (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrejpetras authored Feb 2, 2024
1 parent 0071b00 commit 4a93049
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 58 deletions.
17 changes: 0 additions & 17 deletions index.html

This file was deleted.

19 changes: 7 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.github.onecx</groupId>
<groupId>org.tkit.onecx</groupId>
<artifactId>onecx-quarkus3-parent</artifactId>
<version>0.25.0</version>
<version>0.31.0</version>
</parent>

<artifactId>onecx-announcement-bff</artifactId>
Expand Down Expand Up @@ -54,10 +54,7 @@
<groupId>org.tkit.quarkus.lib</groupId>
<artifactId>tkit-quarkus-rest</artifactId>
</dependency>
<dependency>
<groupId>org.tkit.quarkus.lib</groupId>
<artifactId>tkit-quarkus-jpa</artifactId>
</dependency>

<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
Expand All @@ -66,10 +63,7 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-validator</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-health</artifactId>
</dependency>

<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-opentelemetry</artifactId>
Expand All @@ -78,6 +72,7 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-micrometer-registry-prometheus</artifactId>
</dependency>

<!-- DEV -->
<dependency>
<groupId>io.quarkiverse.mockserver</groupId>
Expand Down Expand Up @@ -117,8 +112,8 @@
</goals>
<configuration>
<inputSpec>src/main/openapi/openapi-announcement-bff.yaml</inputSpec>
<apiPackage>gen.io.github.onecx.announcement.bff.rs.internal</apiPackage>
<modelPackage>gen.io.github.onecx.announcement.bff.rs.internal.model</modelPackage>
<apiPackage>gen.org.tkit.onecx.announcement.bff.rs.internal</apiPackage>
<modelPackage>gen.org.tkit.onecx.announcement.bff.rs.internal.model</modelPackage>
</configuration>
</execution>
</executions>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.onecx.announcement.bff.rs.controller;
package org.tkit.onecx.announcement.bff.rs.controller;

import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
Expand All @@ -10,15 +10,15 @@
import org.eclipse.microprofile.rest.client.inject.RestClient;
import org.jboss.resteasy.reactive.RestResponse;
import org.jboss.resteasy.reactive.server.ServerExceptionMapper;
import org.tkit.onecx.announcement.bff.rs.mappers.AnnouncementMapper;
import org.tkit.onecx.announcement.bff.rs.mappers.ExceptionMapper;
import org.tkit.onecx.announcement.bff.rs.mappers.ProblemDetailMapper;
import org.tkit.quarkus.log.cdi.LogService;

import gen.io.github.onecx.announcement.bff.clients.api.AnnouncementInternalApi;
import gen.io.github.onecx.announcement.bff.clients.model.*;
import gen.io.github.onecx.announcement.bff.rs.internal.AnnouncementInternalApiService;
import gen.io.github.onecx.announcement.bff.rs.internal.model.*;
import io.github.onecx.announcement.bff.rs.mappers.AnnouncementMapper;
import io.github.onecx.announcement.bff.rs.mappers.ExceptionMapper;
import io.github.onecx.announcement.bff.rs.mappers.ProblemDetailMapper;
import gen.org.tkit.onecx.announcement.bff.clients.api.AnnouncementInternalApi;
import gen.org.tkit.onecx.announcement.bff.clients.model.*;
import gen.org.tkit.onecx.announcement.bff.rs.internal.AnnouncementInternalApiService;
import gen.org.tkit.onecx.announcement.bff.rs.internal.model.*;

@ApplicationScoped
@Transactional(value = Transactional.TxType.NOT_SUPPORTED)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package io.github.onecx.announcement.bff.rs.mappers;
package org.tkit.onecx.announcement.bff.rs.mappers;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.tkit.quarkus.rs.mappers.OffsetDateTimeMapper;

import gen.io.github.onecx.announcement.bff.clients.model.*;
import gen.io.github.onecx.announcement.bff.rs.internal.model.*;
import gen.org.tkit.onecx.announcement.bff.clients.model.*;
import gen.org.tkit.onecx.announcement.bff.rs.internal.model.*;

@Mapper(uses = { OffsetDateTimeMapper.class })
public interface AnnouncementMapper {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.onecx.announcement.bff.rs.mappers;
package org.tkit.onecx.announcement.bff.rs.mappers;

import java.util.List;
import java.util.Map;
Expand All @@ -14,9 +14,9 @@
import org.mapstruct.Mapping;
import org.tkit.quarkus.rs.mappers.OffsetDateTimeMapper;

import gen.io.github.onecx.announcement.bff.rs.internal.model.ProblemDetailInvalidParamDTO;
import gen.io.github.onecx.announcement.bff.rs.internal.model.ProblemDetailParamDTO;
import gen.io.github.onecx.announcement.bff.rs.internal.model.ProblemDetailResponseDTO;
import gen.org.tkit.onecx.announcement.bff.rs.internal.model.ProblemDetailInvalidParamDTO;
import gen.org.tkit.onecx.announcement.bff.rs.internal.model.ProblemDetailParamDTO;
import gen.org.tkit.onecx.announcement.bff.rs.internal.model.ProblemDetailResponseDTO;

@Mapper(uses = { OffsetDateTimeMapper.class })
public interface ExceptionMapper {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package io.github.onecx.announcement.bff.rs.mappers;
package org.tkit.onecx.announcement.bff.rs.mappers;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.tkit.quarkus.rs.mappers.OffsetDateTimeMapper;

import gen.io.github.onecx.announcement.bff.clients.model.ProblemDetailResponse;
import gen.io.github.onecx.announcement.bff.rs.internal.model.ProblemDetailResponseDTO;
import gen.org.tkit.onecx.announcement.bff.clients.model.ProblemDetailResponse;
import gen.org.tkit.onecx.announcement.bff.rs.internal.model.ProblemDetailResponseDTO;

@Mapper(uses = { OffsetDateTimeMapper.class })
public interface ProblemDetailMapper {
Expand Down
20 changes: 14 additions & 6 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
# propagate the apm-principal-token from requests we receive
org.eclipse.microprofile.rest.client.propagateHeaders=apm-principal-token

# PROD
%prod.quarkus.rest-client.onecx_announcement_svc.url=http://onecx-announcement-svc:8080

# DEV
%dev.quarkus.rest-client.onecx_announcement_svc.url=http://onecx-announcement-svc

# BUILD
quarkus.openapi-generator.codegen.input-base-dir=target/tmp/openapi

quarkus.openapi-generator.codegen.spec.onecx_announcement_svc_yaml.config-key=onecx_announcement_svc
quarkus.openapi-generator.codegen.spec.onecx_announcement_svc_yaml.base-package=gen.io.github.onecx.announcement.bff.clients
quarkus.openapi-generator.codegen.spec.onecx_announcement_svc_yaml.base-package=gen.org.tkit.onecx.announcement.bff.clients
quarkus.openapi-generator.codegen.spec.onecx_announcement_svc_yaml.return-response=true
quarkus.openapi-generator.codegen.input-base-dir=target/tmp/openapi
quarkus.openapi-generator.codegen.spec.onecx_announcement_svc.additional-api-type-annotations=@org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders;

# DEV
%dev.quarkus.rest-client.onecx_announcement_svc.url=${quarkus.mockserver.endpoint}

# INTEGRATION TEST
quarkus.test.integration-test-profile=test
Expand All @@ -23,4 +28,7 @@ quarkus.test.integration-test-profile=test
%test.quarkus.mockserver.devservices.config-dir=/mockserver
%test.quarkus.rest-client.onecx_announcement_svc.url=${quarkus.mockserver.endpoint}

# PIPE CONFIG
# PIPE CONFIG



Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.onecx.announcement.bff.rs;
package org.tkit.onecx.announcement.bff.rs;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.onecx.announcement.bff.rs;
package org.tkit.onecx.announcement.bff.rs;

import static io.restassured.RestAssured.given;
import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON;
Expand All @@ -18,11 +18,11 @@
import org.mockserver.client.MockServerClient;
import org.mockserver.model.JsonBody;
import org.mockserver.model.MediaType;
import org.tkit.onecx.announcement.bff.rs.controller.AnnouncementRestController;
import org.tkit.quarkus.rs.mappers.OffsetDateTimeMapper;

import gen.io.github.onecx.announcement.bff.clients.model.*;
import gen.io.github.onecx.announcement.bff.rs.internal.model.*;
import io.github.onecx.announcement.bff.rs.controller.AnnouncementRestController;
import gen.org.tkit.onecx.announcement.bff.clients.model.*;
import gen.org.tkit.onecx.announcement.bff.rs.internal.model.*;
import io.quarkiverse.mockserver.test.InjectMockServerClient;
import io.quarkus.test.common.http.TestHTTPEndpoint;
import io.quarkus.test.junit.QuarkusTest;
Expand Down

0 comments on commit 4a93049

Please sign in to comment.