This is an automated email from the ASF dual-hosted git repository. jiriondrusek pushed a commit to branch camel-main in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit f91f81c544a5ee17dee5a16cdb95517c879d959b Author: JiriOndrusek <ondrusek.j...@gmail.com> AuthorDate: Fri Mar 8 15:34:15 2024 +0100 Fixed latform http - inlining requires unique routes, partialy fixed openapi-java --- integration-tests/openapi-java/pom.xml | 4 ++++ .../component/openapijava/it/OpenApiRoutes.java | 28 +++++++++++----------- integration-tests/platform-http/pom.xml | 4 ++++ .../platform/http/it/PlatformHttpRouteBuilder.java | 6 ++--- 4 files changed, 25 insertions(+), 17 deletions(-) diff --git a/integration-tests/openapi-java/pom.xml b/integration-tests/openapi-java/pom.xml index e646f823c4..494797bcea 100644 --- a/integration-tests/openapi-java/pom.xml +++ b/integration-tests/openapi-java/pom.xml @@ -55,6 +55,10 @@ <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-rest</artifactId> </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-seda</artifactId> + </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-resteasy</artifactId> diff --git a/integration-tests/openapi-java/src/main/java/org/apache/camel/quarkus/component/openapijava/it/OpenApiRoutes.java b/integration-tests/openapi-java/src/main/java/org/apache/camel/quarkus/component/openapijava/it/OpenApiRoutes.java index 9b93b29959..e89d8554df 100644 --- a/integration-tests/openapi-java/src/main/java/org/apache/camel/quarkus/component/openapijava/it/OpenApiRoutes.java +++ b/integration-tests/openapi-java/src/main/java/org/apache/camel/quarkus/component/openapijava/it/OpenApiRoutes.java @@ -102,14 +102,14 @@ public class OpenApiRoutes extends RouteBuilder { .code("error") .message("Response Error") .endResponseMessage() - .to("direct:echoMethodPath") + .to("seda:echoMethodPath") .get("/security/scopes") .security("OAuth2", "scope1,scope2,scope3") - .to("direct:echoMethodPath") + .to("seda:echoMethodPath") .get("/security/api/key") - .to("direct:echoMethodPath") + .to("seda:echoMethodPath") .securityDefinitions() .apiKey("X-API-Key", "The API key") .withHeader("X-API-KEY") @@ -117,13 +117,13 @@ public class OpenApiRoutes extends RouteBuilder { .end() .get("/security/basic/auth") - .to("direct:echoMethodPath") + .to("seda:echoMethodPath") .securityDefinitions() .basicAuth("basicAuth", "Basic Authentication") .end() .get("/security/oauth2") - .to("direct:echoMethodPath") + .to("seda:echoMethodPath") .securityDefinitions() .oauth2("oauth2", "OAuth2 Authentication") .flow("implicit") @@ -137,19 +137,19 @@ public class OpenApiRoutes extends RouteBuilder { if (openApiVersion.startsWith("3")) { rest() .get("/security/bearer/token") - .to("direct:echoMethodPath") + .to("seda:echoMethodPath") .securityDefinitions() .bearerToken("bearerAuth", "Bearer Token Authentication") .end() .get("/security/mutual/tls") - .to("direct:echoMethodPath") + .to("seda:echoMethodPath") .securityDefinitions() .mutualTLS("mutualTLS") .end() .get("/security/openid") - .to("direct:echoMethodPath") + .to("seda:echoMethodPath") .securityDefinitions() .openIdConnect("openId", "https://secure.apache.org/fake/openid-configuration") .end() @@ -227,7 +227,7 @@ public class OpenApiRoutes extends RouteBuilder { .arrayType("password") .allowableValues("foo", "bar", "cheese") .endParam() - .to("direct:echoMethodPath"); + .to("seda:echoMethodPath"); rest("/form") .post("/oneOf") @@ -242,7 +242,7 @@ public class OpenApiRoutes extends RouteBuilder { .code(200).message("Ok") .endResponseMessage() - .to("direct:res"); + .to("seda:res"); rest("/form") .post("/allOf") @@ -257,7 +257,7 @@ public class OpenApiRoutes extends RouteBuilder { .code(200).message("Ok") .endResponseMessage() - .to("direct:res"); + .to("seda:res"); rest("/form") .post("/anyOf") @@ -272,17 +272,17 @@ public class OpenApiRoutes extends RouteBuilder { .code(200).message("Ok") .endResponseMessage() - .to("direct:res"); + .to("seda:res"); } from("direct:fruits") .setBody().constant(getFruits()) .marshal().json(); - from("direct:echoMethodPath") + from("seda:echoMethodPath") .setBody().simple("${header.CamelHttpMethod}: ${header.CamelHttpPath}"); - from("direct:res") + from("seda:res") .setBody(constant("{\"result\": \"Ok\"}")); } diff --git a/integration-tests/platform-http/pom.xml b/integration-tests/platform-http/pom.xml index ca9371a0aa..a0698e213f 100644 --- a/integration-tests/platform-http/pom.xml +++ b/integration-tests/platform-http/pom.xml @@ -47,6 +47,10 @@ <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-log</artifactId> </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-seda</artifactId> + </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-support-webhook</artifactId> diff --git a/integration-tests/platform-http/src/main/java/org/apache/camel/quarkus/component/platform/http/it/PlatformHttpRouteBuilder.java b/integration-tests/platform-http/src/main/java/org/apache/camel/quarkus/component/platform/http/it/PlatformHttpRouteBuilder.java index 4bf42966af..054430f640 100644 --- a/integration-tests/platform-http/src/main/java/org/apache/camel/quarkus/component/platform/http/it/PlatformHttpRouteBuilder.java +++ b/integration-tests/platform-http/src/main/java/org/apache/camel/quarkus/component/platform/http/it/PlatformHttpRouteBuilder.java @@ -47,12 +47,12 @@ public class PlatformHttpRouteBuilder extends RouteBuilder { rest() .get("/platform-http/rest-get") - .to("direct:echoMethodPath") + .to("seda:echoMethodPath") .post("/platform-http/rest-post") .consumes("text/plain").produces("text/plain") - .to("direct:echoMethodPath"); + .to("seda:echoMethodPath"); - from("direct:echoMethodPath") + from("seda:echoMethodPath") .setBody().simple("${header.CamelHttpMethod}: ${header.CamelHttpPath}"); from("direct:greet")