From 4d11758e1edbd3a9ac8d2b3fa8582e6230f665b2 Mon Sep 17 00:00:00 2001 From: Christoph Deppisch Date: Tue, 21 Jul 2026 08:37:28 +0200 Subject: [PATCH] fix(#12): Add Camel OpenAPI REST client example with Citrus server simulation --- .../camel-openapi-client/.dockerignore | 5 + .../.mvn/wrapper/maven-wrapper.properties | 4 + apache-camel/camel-openapi-client/README.md | 226 ++++++++++++++ apache-camel/camel-openapi-client/mvnw | 295 ++++++++++++++++++ apache-camel/camel-openapi-client/mvnw.cmd | 189 +++++++++++ apache-camel/camel-openapi-client/pom.xml | 190 +++++++++++ .../src/main/docker/Dockerfile.jvm | 100 ++++++ .../src/main/docker/Dockerfile.legacy-jar | 96 ++++++ .../src/main/docker/Dockerfile.native | 29 ++ .../src/main/docker/Dockerfile.native-micro | 32 ++ .../java/org/acme/PetstoreClientRoutes.java | 23 ++ .../src/main/resources/application.properties | 3 + .../src/main/resources/petstore-api.json | 284 +++++++++++++++++ .../java/org/acme/CitrusEndpointConfig.java | 40 +++ .../org/acme/PetstoreOpenApiClientTest.java | 194 ++++++++++++ .../org/acme/PetstoreOpenApiSpecTest.java | 162 ++++++++++ .../src/test/resources/application.properties | 1 + apache-camel/pom.xml | 1 + 18 files changed, 1874 insertions(+) create mode 100644 apache-camel/camel-openapi-client/.dockerignore create mode 100644 apache-camel/camel-openapi-client/.mvn/wrapper/maven-wrapper.properties create mode 100644 apache-camel/camel-openapi-client/README.md create mode 100755 apache-camel/camel-openapi-client/mvnw create mode 100755 apache-camel/camel-openapi-client/mvnw.cmd create mode 100644 apache-camel/camel-openapi-client/pom.xml create mode 100644 apache-camel/camel-openapi-client/src/main/docker/Dockerfile.jvm create mode 100644 apache-camel/camel-openapi-client/src/main/docker/Dockerfile.legacy-jar create mode 100644 apache-camel/camel-openapi-client/src/main/docker/Dockerfile.native create mode 100644 apache-camel/camel-openapi-client/src/main/docker/Dockerfile.native-micro create mode 100644 apache-camel/camel-openapi-client/src/main/java/org/acme/PetstoreClientRoutes.java create mode 100644 apache-camel/camel-openapi-client/src/main/resources/application.properties create mode 100644 apache-camel/camel-openapi-client/src/main/resources/petstore-api.json create mode 100644 apache-camel/camel-openapi-client/src/test/java/org/acme/CitrusEndpointConfig.java create mode 100644 apache-camel/camel-openapi-client/src/test/java/org/acme/PetstoreOpenApiClientTest.java create mode 100644 apache-camel/camel-openapi-client/src/test/java/org/acme/PetstoreOpenApiSpecTest.java create mode 100644 apache-camel/camel-openapi-client/src/test/resources/application.properties diff --git a/apache-camel/camel-openapi-client/.dockerignore b/apache-camel/camel-openapi-client/.dockerignore new file mode 100644 index 0000000..94810d0 --- /dev/null +++ b/apache-camel/camel-openapi-client/.dockerignore @@ -0,0 +1,5 @@ +* +!target/*-runner +!target/*-runner.jar +!target/lib/* +!target/quarkus-app/* \ No newline at end of file diff --git a/apache-camel/camel-openapi-client/.mvn/wrapper/maven-wrapper.properties b/apache-camel/camel-openapi-client/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 0000000..ce33c1c --- /dev/null +++ b/apache-camel/camel-openapi-client/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,4 @@ +wrapperVersion=3.3.4 +distributionType=only-script +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.15/apache-maven-3.9.15-bin.zip +distributionSha256Sum=b0d9292f06c5faded31ddcb6cb69099f316d6fea40a7778624b259bad9fed18a diff --git a/apache-camel/camel-openapi-client/README.md b/apache-camel/camel-openapi-client/README.md new file mode 100644 index 0000000..16f33ae --- /dev/null +++ b/apache-camel/camel-openapi-client/README.md @@ -0,0 +1,226 @@ +# OpenAPI Client Integration Testing with Citrus + +This example demonstrates how to test a Quarkus application that uses the **Apache Camel OpenAPI REST client** to call an external HTTP service, while **Citrus acts as the simulated HTTP server** using the same OpenAPI specification. + +This is the reverse of the `camel-openapi-server` example: there, Citrus is an OpenAPI client testing a Camel server. Here, Citrus is an OpenAPI server simulating the external service that the Camel client depends on. + +## What You'll Learn + +By the end of this guide, you'll understand: + +- How to implement an HTTP client in Camel using the `rest-openapi` component +- How Camel resolves path parameters and serialises request bodies from an OpenAPI spec +- How to share a single Citrus HTTP server endpoint across multiple test classes via `@CitrusConfiguration` +- How to stop the shared Citrus HTTP server after all tests using an `AfterSuite` action +- The difference between **explicit HTTP validation** (`PetstoreOpenApiClientTest`) and **OpenAPI spec-driven validation** (`PetstoreOpenApiSpecTest`) +- How to trigger Camel routes from a Citrus test using the Camel `send()` test action with `.fork(true)` + +## The Application Under Test + +The application is a Petstore API **client** built with Apache Camel and Quarkus. It exposes four internal Camel routes (triggered via `direct:` endpoints) that each invoke a specific Petstore API operation against a configurable external service URL. + +### Architecture + +The [`PetstoreClientRoutes`](src/main/java/org/acme/PetstoreClientRoutes.java) class defines the outbound routes: + +```java +from("direct:getPetById") + .to("rest-openapi:petstore-api.json#getPetById?host={{petstore.service.url}}"); + +from("direct:addPet") + .marshal().json() + .to("rest-openapi:petstore-api.json#addPet?host={{petstore.service.url}}"); + +from("direct:updatePet") + .marshal().json() + .to("rest-openapi:petstore-api.json#updatePet?host={{petstore.service.url}}"); + +from("direct:deletePet") + .to("rest-openapi:petstore-api.json#deletePet?host={{petstore.service.url}}"); +``` + +Key aspects: +- **`rest-openapi` component** reads `petstore-api.json` from the classpath and maps each operation ID to the correct HTTP method, path, and parameters +- **`{{petstore.service.url}}`** is a Camel property placeholder resolved from `application.properties` — the test profile overrides it to point to the Citrus-managed HTTP server +- **`marshal().json()`** serialises the Java `Map` body to JSON before POST/PUT requests are sent; the `camel-quarkus-jackson` extension provides the data format + +### Application Properties + +```properties +# src/main/resources/application.properties +petstore.service.url=http://petstore.prod-service.local +%test.petstore.service.url=http://localhost:18080 +``` + +The `%test.` prefix activates Quarkus's `test` profile, so the Citrus test server URL is injected automatically during tests without changing application code. + +## Shared Endpoint Configuration + +Both test classes share a single Citrus HTTP server instance, defined in [`CitrusEndpointConfig`](src/test/java/org/acme/CitrusEndpointConfig.java): + +```java +@CitrusConfiguration +public class CitrusEndpointConfig { + + HttpServer petstoreServer; + + @BindToRegistry + public HttpServer petstoreServer() { + if (petstoreServer == null) { + petstoreServer = new HttpServerBuilder() + .port(18080) + .autoStart(true) + .timeout(10000) + .build(); + } + return petstoreServer; + } + + @BindToRegistry + public AfterSuite afterSuiteActions() { + return afterSuite() + .actions(actions.stop(petstoreServer())) + .build(); + } +} +``` + +Key aspects: +- **Lazy singleton** — the server is created once and reused across both test classes, avoiding "Address already in use" errors +- **`AfterSuite` action** — the server is stopped after all test suites finish, which is the correct lifecycle hook for shared infrastructure +- Both tests reference the server with `@CitrusEndpoint HttpServer petstoreServer;` and `@CitrusConfiguration(classes = CitrusEndpointConfig.class)` + +## Triggering Camel Routes from Tests + +Both tests use the Citrus Camel `send()` action with `.fork(true)` instead of a raw `ProducerTemplate`: + +```java +runner.when( + camel().send() + .endpoint(CamelSupport.camel().endpoint(direct("getPetById")::getRawUri)) + .fork(true) + .message().header("petId", "${petId}") +); +``` + +- **`.fork(true)`** runs the Camel route invocation on a separate thread, which is required because the Camel HTTP producer blocks waiting for a response while the Citrus main thread must proceed to handle the incoming server request +- **`direct("getPetById")::getRawUri`** uses the Camel Endpoint DSL for a type-safe, IDE-friendly reference to the route's entry point + +## Two Test Styles + +The module contains two test classes that demonstrate different Citrus verification styles for the same four operations. + +### `PetstoreOpenApiClientTest` — Explicit HTTP Validation + +[`PetstoreOpenApiClientTest`](src/test/java/org/acme/PetstoreOpenApiClientTest.java) uses plain `http()` server actions to verify exact request paths, methods, bodies, and content types, and provides explicit simulated response bodies. + +```java +// Trigger the Camel route +runner.when( + camel().send() + .endpoint(CamelSupport.camel().endpoint(direct("getPetById")::getRawUri)) + .fork(true) + .message().header("petId", "${petId}") +); + +// Verify the exact incoming request +runner.then( + http() + .server(petstoreServer) + .receive() + .get("/pet/${petId}") + .message() +); + +// Send back an explicit simulated response +runner.then( + http() + .server(petstoreServer) + .send() + .response(HttpStatus.OK) + .message() + .body(new DefaultPayloadBuilder(newPet(1000, "hasso", "dog", 1L, "available"))) + .process(processor().camel().marshal().json()) +); +``` + +For POST and PUT, the `receive()` action also validates the request body and content type: + +```java +runner.then( + http() + .server(petstoreServer) + .receive() + .post("/pet") + .message() + .body(new ObjectMappingPayloadBuilder(petBody)) + .contentType("application/json;charset=UTF-8") +); +``` + +This style is suited for tests where you want to assert the exact wire format of the HTTP traffic — specific field values, headers, and response payloads. + +A custom `ObjectMapper` is registered via `@BindToRegistry` to control JSON serialisation behaviour (non-empty fields, enum-as-string, pretty-print) when building and matching request/response bodies. + +### `PetstoreOpenApiSpecTest` — OpenAPI Spec-Driven Validation + +[`PetstoreOpenApiSpecTest`](src/test/java/org/acme/PetstoreOpenApiSpecTest.java) uses Citrus's `openapi()` server actions, which automatically derive the expected request and a generated response from the OpenAPI specification. + +```java +runner.when( + camel().send() + .endpoint(CamelSupport.camel().endpoint(direct("getPetById")::getRawUri)) + .fork(true) + .message().header("petId", "${petId}") +); + +// Citrus validates the request against the OpenAPI spec +runner.then( + openapi().specification(petstoreApi) + .server(petstoreServer) + .receive("getPetById") +); + +// Citrus generates a spec-compliant response +runner.then( + openapi().specification(petstoreApi) + .server(petstoreServer) + .send("getPetById", HttpStatus.OK) +); +``` + +This style is suited for contract-compliance tests: you care that the Camel client sends a request that conforms to the spec, and you want realistic but schema-generated responses without crafting them manually. + +## Running the Tests + +```bash +cd apache-camel/camel-openapi-client +./mvnw verify +``` + +Expected output: +``` +[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0 +``` + +## Key Dependencies (pom.xml) + +- **camel-quarkus-rest** — Camel REST DSL support +- **camel-quarkus-platform-http** — HTTP transport +- **camel-quarkus-jackson** — JSON marshalling via `marshal().json()` +- **camel-quarkus-rest-openapi** — OpenAPI-driven REST client (`rest-openapi:` component) +- **camel-quarkus-http** — HTTP producer used by `rest-openapi` to make outbound calls +- **citrus-quarkus** — Citrus integration with the Quarkus test framework +- **citrus-camel** — Citrus Camel test actions (`camel().send()`) +- **citrus-http** — HTTP server support for Citrus (Jetty-based) +- **citrus-openapi** — OpenAPI specification-driven test actions (`openapi().server()`) +- **citrus-validation-json** — JSON request/response body validation +- **citrus-validation-text** — Plain-text validation context required for GET/DELETE (bodyless) operations + +## Related Resources + +- [Citrus Framework Documentation](https://citrusframework.org/citrus/reference/html/) +- [Apache Camel REST OpenAPI Component](https://camel.apache.org/components/latest/rest-openapi-component.html) +- [Quarkus Camel Extension](https://camel.apache.org/camel-quarkus/latest/) +- [OpenAPI Specification](https://swagger.io/specification/) +- [camel-openapi-server example](../camel-openapi-server/README.md) — the complementary server-side example diff --git a/apache-camel/camel-openapi-client/mvnw b/apache-camel/camel-openapi-client/mvnw new file mode 100755 index 0000000..bd8896b --- /dev/null +++ b/apache-camel/camel-openapi-client/mvnw @@ -0,0 +1,295 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Apache Maven Wrapper startup batch script, version 3.3.4 +# +# Optional ENV vars +# ----------------- +# JAVA_HOME - location of a JDK home dir, required when download maven via java source +# MVNW_REPOURL - repo url base for downloading maven distribution +# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven +# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output +# ---------------------------------------------------------------------------- + +set -euf +[ "${MVNW_VERBOSE-}" != debug ] || set -x + +# OS specific support. +native_path() { printf %s\\n "$1"; } +case "$(uname)" in +CYGWIN* | MINGW*) + [ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")" + native_path() { cygpath --path --windows "$1"; } + ;; +esac + +# set JAVACMD and JAVACCMD +set_java_home() { + # For Cygwin and MinGW, ensure paths are in Unix format before anything is touched + if [ -n "${JAVA_HOME-}" ]; then + if [ -x "$JAVA_HOME/jre/sh/java" ]; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACCMD="$JAVA_HOME/jre/sh/javac" + else + JAVACMD="$JAVA_HOME/bin/java" + JAVACCMD="$JAVA_HOME/bin/javac" + + if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then + echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2 + echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2 + return 1 + fi + fi + else + JAVACMD="$( + 'set' +e + 'unset' -f command 2>/dev/null + 'command' -v java + )" || : + JAVACCMD="$( + 'set' +e + 'unset' -f command 2>/dev/null + 'command' -v javac + )" || : + + if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then + echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2 + return 1 + fi + fi +} + +# hash string like Java String::hashCode +hash_string() { + str="${1:-}" h=0 + while [ -n "$str" ]; do + char="${str%"${str#?}"}" + h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296)) + str="${str#?}" + done + printf %x\\n $h +} + +verbose() { :; } +[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; } + +die() { + printf %s\\n "$1" >&2 + exit 1 +} + +trim() { + # MWRAPPER-139: + # Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds. + # Needed for removing poorly interpreted newline sequences when running in more + # exotic environments such as mingw bash on Windows. + printf "%s" "${1}" | tr -d '[:space:]' +} + +scriptDir="$(dirname "$0")" +scriptName="$(basename "$0")" + +# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties +while IFS="=" read -r key value; do + case "${key-}" in + distributionUrl) distributionUrl=$(trim "${value-}") ;; + distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; + esac +done <"$scriptDir/.mvn/wrapper/maven-wrapper.properties" +[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" + +case "${distributionUrl##*/}" in +maven-mvnd-*bin.*) + MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ + case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in + *AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;; + :Darwin*x86_64) distributionPlatform=darwin-amd64 ;; + :Darwin*arm64) distributionPlatform=darwin-aarch64 ;; + :Linux*x86_64*) distributionPlatform=linux-amd64 ;; + *) + echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2 + distributionPlatform=linux-amd64 + ;; + esac + distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" + ;; +maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; +*) MVN_CMD="mvn${scriptName#mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; +esac + +# apply MVNW_REPOURL and calculate MAVEN_HOME +# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ +[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}" +distributionUrlName="${distributionUrl##*/}" +distributionUrlNameMain="${distributionUrlName%.*}" +distributionUrlNameMain="${distributionUrlNameMain%-bin}" +MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}" +MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")" + +exec_maven() { + unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || : + exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD" +} + +if [ -d "$MAVEN_HOME" ]; then + verbose "found existing MAVEN_HOME at $MAVEN_HOME" + exec_maven "$@" +fi + +case "${distributionUrl-}" in +*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;; +*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;; +esac + +# prepare tmp dir +if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then + clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; } + trap clean HUP INT TERM EXIT +else + die "cannot create temp dir" +fi + +mkdir -p -- "${MAVEN_HOME%/*}" + +# Download and Install Apache Maven +verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." +verbose "Downloading from: $distributionUrl" +verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" + +# select .zip or .tar.gz +if ! command -v unzip >/dev/null; then + distributionUrl="${distributionUrl%.zip}.tar.gz" + distributionUrlName="${distributionUrl##*/}" +fi + +# verbose opt +__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR='' +[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v + +# normalize http auth +case "${MVNW_PASSWORD:+has-password}" in +'') MVNW_USERNAME='' MVNW_PASSWORD='' ;; +has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;; +esac + +if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then + verbose "Found wget ... using wget" + wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl" +elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then + verbose "Found curl ... using curl" + curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl" +elif set_java_home; then + verbose "Falling back to use Java to download" + javaSource="$TMP_DOWNLOAD_DIR/Downloader.java" + targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName" + cat >"$javaSource" <<-END + public class Downloader extends java.net.Authenticator + { + protected java.net.PasswordAuthentication getPasswordAuthentication() + { + return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() ); + } + public static void main( String[] args ) throws Exception + { + setDefault( new Downloader() ); + java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); + } + } + END + # For Cygwin/MinGW, switch paths to Windows format before running javac and java + verbose " - Compiling Downloader.java ..." + "$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java" + verbose " - Running Downloader.java ..." + "$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")" +fi + +# If specified, validate the SHA-256 sum of the Maven distribution zip file +if [ -n "${distributionSha256Sum-}" ]; then + distributionSha256Result=false + if [ "$MVN_CMD" = mvnd.sh ]; then + echo "Checksum validation is not supported for maven-mvnd." >&2 + echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 + exit 1 + elif command -v sha256sum >/dev/null; then + if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c - >/dev/null 2>&1; then + distributionSha256Result=true + fi + elif command -v shasum >/dev/null; then + if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then + distributionSha256Result=true + fi + else + echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2 + echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 + exit 1 + fi + if [ $distributionSha256Result = false ]; then + echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2 + echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2 + exit 1 + fi +fi + +# unzip and move +if command -v unzip >/dev/null; then + unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip" +else + tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" +fi + +# Find the actual extracted directory name (handles snapshots where filename != directory name) +actualDistributionDir="" + +# First try the expected directory name (for regular distributions) +if [ -d "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" ]; then + if [ -f "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/bin/$MVN_CMD" ]; then + actualDistributionDir="$distributionUrlNameMain" + fi +fi + +# If not found, search for any directory with the Maven executable (for snapshots) +if [ -z "$actualDistributionDir" ]; then + # enable globbing to iterate over items + set +f + for dir in "$TMP_DOWNLOAD_DIR"/*; do + if [ -d "$dir" ]; then + if [ -f "$dir/bin/$MVN_CMD" ]; then + actualDistributionDir="$(basename "$dir")" + break + fi + fi + done + set -f +fi + +if [ -z "$actualDistributionDir" ]; then + verbose "Contents of $TMP_DOWNLOAD_DIR:" + verbose "$(ls -la "$TMP_DOWNLOAD_DIR")" + die "Could not find Maven distribution directory in extracted archive" +fi + +verbose "Found extracted Maven distribution directory: $actualDistributionDir" +printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$actualDistributionDir/mvnw.url" +mv -- "$TMP_DOWNLOAD_DIR/$actualDistributionDir" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" + +clean || : +exec_maven "$@" diff --git a/apache-camel/camel-openapi-client/mvnw.cmd b/apache-camel/camel-openapi-client/mvnw.cmd new file mode 100755 index 0000000..5761d94 --- /dev/null +++ b/apache-camel/camel-openapi-client/mvnw.cmd @@ -0,0 +1,189 @@ +<# : batch portion +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Apache Maven Wrapper startup batch script, version 3.3.4 +@REM +@REM Optional ENV vars +@REM MVNW_REPOURL - repo url base for downloading maven distribution +@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven +@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output +@REM ---------------------------------------------------------------------------- + +@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0) +@SET __MVNW_CMD__= +@SET __MVNW_ERROR__= +@SET __MVNW_PSMODULEP_SAVE=%PSModulePath% +@SET PSModulePath= +@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @( + IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B) +) +@SET PSModulePath=%__MVNW_PSMODULEP_SAVE% +@SET __MVNW_PSMODULEP_SAVE= +@SET __MVNW_ARG0_NAME__= +@SET MVNW_USERNAME= +@SET MVNW_PASSWORD= +@IF NOT "%__MVNW_CMD__%"=="" ("%__MVNW_CMD__%" %*) +@echo Cannot start maven from wrapper >&2 && exit /b 1 +@GOTO :EOF +: end batch / begin powershell #> + +$ErrorActionPreference = "Stop" +if ($env:MVNW_VERBOSE -eq "true") { + $VerbosePreference = "Continue" +} + +# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties +$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl +if (!$distributionUrl) { + Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" +} + +switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { + "maven-mvnd-*" { + $USE_MVND = $true + $distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip" + $MVN_CMD = "mvnd.cmd" + break + } + default { + $USE_MVND = $false + $MVN_CMD = $script -replace '^mvnw','mvn' + break + } +} + +# apply MVNW_REPOURL and calculate MAVEN_HOME +# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ +if ($env:MVNW_REPOURL) { + $MVNW_REPO_PATTERN = if ($USE_MVND -eq $False) { "/org/apache/maven/" } else { "/maven/mvnd/" } + $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace "^.*$MVNW_REPO_PATTERN",'')" +} +$distributionUrlName = $distributionUrl -replace '^.*/','' +$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' + +$MAVEN_M2_PATH = "$HOME/.m2" +if ($env:MAVEN_USER_HOME) { + $MAVEN_M2_PATH = "$env:MAVEN_USER_HOME" +} + +if (-not (Test-Path -Path $MAVEN_M2_PATH)) { + New-Item -Path $MAVEN_M2_PATH -ItemType Directory | Out-Null +} + +$MAVEN_WRAPPER_DISTS = $null +if ((Get-Item $MAVEN_M2_PATH).Target[0] -eq $null) { + $MAVEN_WRAPPER_DISTS = "$MAVEN_M2_PATH/wrapper/dists" +} else { + $MAVEN_WRAPPER_DISTS = (Get-Item $MAVEN_M2_PATH).Target[0] + "/wrapper/dists" +} + +$MAVEN_HOME_PARENT = "$MAVEN_WRAPPER_DISTS/$distributionUrlNameMain" +$MAVEN_HOME_NAME = ([System.Security.Cryptography.SHA256]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' +$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" + +if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { + Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME" + Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" + exit $? +} + +if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) { + Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl" +} + +# prepare tmp dir +$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile +$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir" +$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null +trap { + if ($TMP_DOWNLOAD_DIR.Exists) { + try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } + catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } + } +} + +New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null + +# Download and Install Apache Maven +Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." +Write-Verbose "Downloading from: $distributionUrl" +Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" + +$webclient = New-Object System.Net.WebClient +if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) { + $webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD) +} +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 +$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null + +# If specified, validate the SHA-256 sum of the Maven distribution zip file +$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum +if ($distributionSha256Sum) { + if ($USE_MVND) { + Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." + } + Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash + if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) { + Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property." + } +} + +# unzip and move +Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null + +# Find the actual extracted directory name (handles snapshots where filename != directory name) +$actualDistributionDir = "" + +# First try the expected directory name (for regular distributions) +$expectedPath = Join-Path "$TMP_DOWNLOAD_DIR" "$distributionUrlNameMain" +$expectedMvnPath = Join-Path "$expectedPath" "bin/$MVN_CMD" +if ((Test-Path -Path $expectedPath -PathType Container) -and (Test-Path -Path $expectedMvnPath -PathType Leaf)) { + $actualDistributionDir = $distributionUrlNameMain +} + +# If not found, search for any directory with the Maven executable (for snapshots) +if (!$actualDistributionDir) { + Get-ChildItem -Path "$TMP_DOWNLOAD_DIR" -Directory | ForEach-Object { + $testPath = Join-Path $_.FullName "bin/$MVN_CMD" + if (Test-Path -Path $testPath -PathType Leaf) { + $actualDistributionDir = $_.Name + } + } +} + +if (!$actualDistributionDir) { + Write-Error "Could not find Maven distribution directory in extracted archive" +} + +Write-Verbose "Found extracted Maven distribution directory: $actualDistributionDir" +Rename-Item -Path "$TMP_DOWNLOAD_DIR/$actualDistributionDir" -NewName $MAVEN_HOME_NAME | Out-Null +try { + Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null +} catch { + if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) { + Write-Error "fail to move MAVEN_HOME" + } +} finally { + try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } + catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } +} + +Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" diff --git a/apache-camel/camel-openapi-client/pom.xml b/apache-camel/camel-openapi-client/pom.xml new file mode 100644 index 0000000..3c0658d --- /dev/null +++ b/apache-camel/camel-openapi-client/pom.xml @@ -0,0 +1,190 @@ + + + 4.0.0 + org.citrusframework.quarkus.examples + camel-openapi-client + 1.0.0-SNAPSHOT + Citrus Quarkus Examples :: Camel :: OpenAPI Client + quarkus + + + 3.15.0 + 21 + UTF-8 + UTF-8 + 5.0.0-M2 + quarkus-bom + io.quarkus.platform + 3.36.2 + 3.5.4 + + true + + + + + + ${quarkus.platform.group-id} + ${quarkus.platform.artifact-id} + ${quarkus.platform.version} + pom + import + + + ${quarkus.platform.group-id} + quarkus-camel-bom + ${quarkus.platform.version} + pom + import + + + + + + + org.apache.camel.quarkus + camel-quarkus-core + + + org.apache.camel.quarkus + camel-quarkus-rest + + + org.apache.camel.quarkus + camel-quarkus-platform-http + + + org.apache.camel.quarkus + camel-quarkus-jackson + + + org.apache.camel.quarkus + camel-quarkus-rest-openapi + + + org.apache.camel.quarkus + camel-quarkus-http + + + io.quarkus + quarkus-arc + + + io.quarkus + quarkus-junit + test + + + org.apache.camel.quarkus + camel-quarkus-junit + test + + + org.citrusframework + citrus-quarkus + ${citrus.version} + test + + + org.citrusframework + citrus-junit-jupiter + ${citrus.version} + test + + + org.citrusframework + citrus-camel + ${citrus.version} + test + + + org.citrusframework + citrus-http + ${citrus.version} + test + + + org.citrusframework + citrus-openapi + ${citrus.version} + test + + + org.citrusframework + citrus-validation-json + ${citrus.version} + test + + + org.citrusframework + citrus-validation-text + ${citrus.version} + test + + + + + + + ${quarkus.platform.group-id} + quarkus-maven-plugin + ${quarkus.platform.version} + true + + + maven-compiler-plugin + ${compiler-plugin.version} + + true + + + + maven-surefire-plugin + ${surefire-plugin.version} + + @{argLine} + + org.jboss.logmanager.LogManager + ${maven.home} + + + + + maven-failsafe-plugin + ${surefire-plugin.version} + + + + integration-test + verify + + + + + @{argLine} + + ${project.build.directory}/${project.build.finalName}-runner + org.jboss.logmanager.LogManager + ${maven.home} + + + + + + + + + native + + + native + + + + false + false + true + + + + diff --git a/apache-camel/camel-openapi-client/src/main/docker/Dockerfile.jvm b/apache-camel/camel-openapi-client/src/main/docker/Dockerfile.jvm new file mode 100644 index 0000000..703bc35 --- /dev/null +++ b/apache-camel/camel-openapi-client/src/main/docker/Dockerfile.jvm @@ -0,0 +1,100 @@ +#### +# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode +# +# Before building the container image run: +# +# ./mvnw package +# +# Then, build the image with: +# +# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/camel-openapi-client-jvm . +# +# Then run the container using: +# +# docker run -i --rm -p 8080:8080 quarkus/camel-openapi-server-jvm +# +# If you want to include the debug port into your docker image +# you will have to expose the debug port (default 5005 being the default) like this : EXPOSE 8080 5005. +# Additionally you will have to set -e JAVA_DEBUG=true and -e JAVA_DEBUG_PORT=*:5005 +# when running the container +# +# Then run the container using : +# +# docker run -i --rm -p 8080:8080 quarkus/camel-openapi-server-jvm +# +# This image uses the `run-java.sh` script to run the application. +# This scripts computes the command line to execute your Java application, and +# includes memory/GC tuning. +# You can configure the behavior using the following environment properties: +# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class") - Be aware that this will override +# the default JVM options, use `JAVA_OPTS_APPEND` to append options +# - JAVA_OPTS_APPEND: User specified Java options to be appended to generated options +# in JAVA_OPTS (example: "-Dsome.property=foo") +# - JAVA_MAX_MEM_RATIO: Is used when no `-Xmx` option is given in JAVA_OPTS. This is +# used to calculate a default maximal heap memory based on a containers restriction. +# If used in a container without any memory constraints for the container then this +# option has no effect. If there is a memory constraint then `-Xmx` is set to a ratio +# of the container available memory as set here. The default is `50` which means 50% +# of the available memory is used as an upper boundary. You can skip this mechanism by +# setting this value to `0` in which case no `-Xmx` option is added. +# - JAVA_INITIAL_MEM_RATIO: Is used when no `-Xms` option is given in JAVA_OPTS. This +# is used to calculate a default initial heap memory based on the maximum heap memory. +# If used in a container without any memory constraints for the container then this +# option has no effect. If there is a memory constraint then `-Xms` is set to a ratio +# of the `-Xmx` memory as set here. The default is `25` which means 25% of the `-Xmx` +# is used as the initial heap size. You can skip this mechanism by setting this value +# to `0` in which case no `-Xms` option is added (example: "25") +# - JAVA_MAX_INITIAL_MEM: Is used when no `-Xms` option is given in JAVA_OPTS. +# This is used to calculate the maximum value of the initial heap memory. If used in +# a container without any memory constraints for the container then this option has +# no effect. If there is a memory constraint then `-Xms` is limited to the value set +# here. The default is 4096MB which means the calculated value of `-Xms` never will +# be greater than 4096MB. The value of this variable is expressed in MB (example: "4096") +# - JAVA_DIAGNOSTICS: Set this to get some diagnostics information to standard output +# when things are happening. This option, if set to true, will set +# `-XX:+UnlockDiagnosticVMOptions`. Disabled by default (example: "true"). +# - JAVA_DEBUG: If set remote debugging will be switched on. Disabled by default (example: +# true"). +# - JAVA_DEBUG_PORT: Port used for remote debugging. Defaults to 5005 (example: "8787"). +# - CONTAINER_CORE_LIMIT: A calculated core limit as described in +# https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt. (example: "2") +# - CONTAINER_MAX_MEMORY: Memory limit given to the container (example: "1024"). +# - GC_MIN_HEAP_FREE_RATIO: Minimum percentage of heap free after GC to avoid expansion. +# (example: "20") +# - GC_MAX_HEAP_FREE_RATIO: Maximum percentage of heap free after GC to avoid shrinking. +# (example: "40") +# - GC_TIME_RATIO: Specifies the ratio of the time spent outside the garbage collection. +# (example: "4") +# - GC_ADAPTIVE_SIZE_POLICY_WEIGHT: The weighting given to the current GC time versus +# previous GC times. (example: "90") +# - GC_METASPACE_SIZE: The initial metaspace size. (example: "20") +# - GC_MAX_METASPACE_SIZE: The maximum metaspace size. (example: "100") +# - GC_CONTAINER_OPTIONS: Specify Java GC to use. The value of this variable should +# contain the necessary JRE command-line options to specify the required GC, which +# will override the default of `-XX:+UseParallelGC` (example: -XX:+UseG1GC). +# - HTTPS_PROXY: The location of the https proxy. (example: "myuser@127.0.0.1:8080") +# - HTTP_PROXY: The location of the http proxy. (example: "myuser@127.0.0.1:8080") +# - NO_PROXY: A comma separated lists of hosts, IP addresses or domains that can be +# accessed directly. (example: "foo.example.com,bar.example.com") +# +# You can find more information about the UBI base runtime images and their configuration here: +# https://rh-openjdk.github.io/redhat-openjdk-containers/ +### +FROM registry.access.redhat.com/ubi9/openjdk-21-runtime:1.24 + +ENV LANGUAGE='en_US:en' + + +# We make four distinct layers so if there are application changes the library layers can be re-used +COPY --chown=185 target/quarkus-app/lib/ /deployments/lib/ +COPY --chown=185 target/quarkus-app/*.jar /deployments/ +COPY --chown=185 target/quarkus-app/app/ /deployments/app/ +COPY --chown=185 target/quarkus-app/quarkus/ /deployments/quarkus/ + +EXPOSE 8080 +USER 185 +ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" +ENV JAVA_APP_JAR="/deployments/quarkus-run.jar" + +ENTRYPOINT [ "/opt/jboss/container/java/run/run-java.sh" ] + diff --git a/apache-camel/camel-openapi-client/src/main/docker/Dockerfile.legacy-jar b/apache-camel/camel-openapi-client/src/main/docker/Dockerfile.legacy-jar new file mode 100644 index 0000000..fa71cc6 --- /dev/null +++ b/apache-camel/camel-openapi-client/src/main/docker/Dockerfile.legacy-jar @@ -0,0 +1,96 @@ +#### +# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode +# +# Before building the container image run: +# +# ./mvnw package -Dquarkus.package.jar.type=legacy-jar +# +# Then, build the image with: +# +# docker build -f src/main/docker/Dockerfile.legacy-jar -t quarkus/camel-openapi-server-legacy-jar . +# +# Then run the container using: +# +# docker run -i --rm -p 8080:8080 quarkus/camel-openapi-server-legacy-jar +# +# If you want to include the debug port into your docker image +# you will have to expose the debug port (default 5005 being the default) like this : EXPOSE 8080 5005. +# Additionally you will have to set -e JAVA_DEBUG=true and -e JAVA_DEBUG_PORT=*:5005 +# when running the container +# +# Then run the container using : +# +# docker run -i --rm -p 8080:8080 quarkus/camel-openapi-server-legacy-jar +# +# This image uses the `run-java.sh` script to run the application. +# This scripts computes the command line to execute your Java application, and +# includes memory/GC tuning. +# You can configure the behavior using the following environment properties: +# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class") - Be aware that this will override +# the default JVM options, use `JAVA_OPTS_APPEND` to append options +# - JAVA_OPTS_APPEND: User specified Java options to be appended to generated options +# in JAVA_OPTS (example: "-Dsome.property=foo") +# - JAVA_MAX_MEM_RATIO: Is used when no `-Xmx` option is given in JAVA_OPTS. This is +# used to calculate a default maximal heap memory based on a containers restriction. +# If used in a container without any memory constraints for the container then this +# option has no effect. If there is a memory constraint then `-Xmx` is set to a ratio +# of the container available memory as set here. The default is `50` which means 50% +# of the available memory is used as an upper boundary. You can skip this mechanism by +# setting this value to `0` in which case no `-Xmx` option is added. +# - JAVA_INITIAL_MEM_RATIO: Is used when no `-Xms` option is given in JAVA_OPTS. This +# is used to calculate a default initial heap memory based on the maximum heap memory. +# If used in a container without any memory constraints for the container then this +# option has no effect. If there is a memory constraint then `-Xms` is set to a ratio +# of the `-Xmx` memory as set here. The default is `25` which means 25% of the `-Xmx` +# is used as the initial heap size. You can skip this mechanism by setting this value +# to `0` in which case no `-Xms` option is added (example: "25") +# - JAVA_MAX_INITIAL_MEM: Is used when no `-Xms` option is given in JAVA_OPTS. +# This is used to calculate the maximum value of the initial heap memory. If used in +# a container without any memory constraints for the container then this option has +# no effect. If there is a memory constraint then `-Xms` is limited to the value set +# here. The default is 4096MB which means the calculated value of `-Xms` never will +# be greater than 4096MB. The value of this variable is expressed in MB (example: "4096") +# - JAVA_DIAGNOSTICS: Set this to get some diagnostics information to standard output +# when things are happening. This option, if set to true, will set +# `-XX:+UnlockDiagnosticVMOptions`. Disabled by default (example: "true"). +# - JAVA_DEBUG: If set remote debugging will be switched on. Disabled by default (example: +# true"). +# - JAVA_DEBUG_PORT: Port used for remote debugging. Defaults to 5005 (example: "8787"). +# - CONTAINER_CORE_LIMIT: A calculated core limit as described in +# https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt. (example: "2") +# - CONTAINER_MAX_MEMORY: Memory limit given to the container (example: "1024"). +# - GC_MIN_HEAP_FREE_RATIO: Minimum percentage of heap free after GC to avoid expansion. +# (example: "20") +# - GC_MAX_HEAP_FREE_RATIO: Maximum percentage of heap free after GC to avoid shrinking. +# (example: "40") +# - GC_TIME_RATIO: Specifies the ratio of the time spent outside the garbage collection. +# (example: "4") +# - GC_ADAPTIVE_SIZE_POLICY_WEIGHT: The weighting given to the current GC time versus +# previous GC times. (example: "90") +# - GC_METASPACE_SIZE: The initial metaspace size. (example: "20") +# - GC_MAX_METASPACE_SIZE: The maximum metaspace size. (example: "100") +# - GC_CONTAINER_OPTIONS: Specify Java GC to use. The value of this variable should +# contain the necessary JRE command-line options to specify the required GC, which +# will override the default of `-XX:+UseParallelGC` (example: -XX:+UseG1GC). +# - HTTPS_PROXY: The location of the https proxy. (example: "myuser@127.0.0.1:8080") +# - HTTP_PROXY: The location of the http proxy. (example: "myuser@127.0.0.1:8080") +# - NO_PROXY: A comma separated lists of hosts, IP addresses or domains that can be +# accessed directly. (example: "foo.example.com,bar.example.com") +# +# You can find more information about the UBI base runtime images and their configuration here: +# https://rh-openjdk.github.io/redhat-openjdk-containers/ +### +FROM registry.access.redhat.com/ubi9/openjdk-21-runtime:1.24 + +ENV LANGUAGE='en_US:en' + + +COPY target/lib/* /deployments/lib/ +COPY target/*-runner.jar /deployments/quarkus-run.jar + +EXPOSE 8080 +USER 185 +ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" +ENV JAVA_APP_JAR="/deployments/quarkus-run.jar" + +ENTRYPOINT [ "/opt/jboss/container/java/run/run-java.sh" ] diff --git a/apache-camel/camel-openapi-client/src/main/docker/Dockerfile.native b/apache-camel/camel-openapi-client/src/main/docker/Dockerfile.native new file mode 100644 index 0000000..cee9601 --- /dev/null +++ b/apache-camel/camel-openapi-client/src/main/docker/Dockerfile.native @@ -0,0 +1,29 @@ +#### +# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode. +# +# Before building the container image run: +# +# ./mvnw package -Dnative +# +# Then, build the image with: +# +# docker build -f src/main/docker/Dockerfile.native -t quarkus/camel-openapi-server . +# +# Then run the container using: +# +# docker run -i --rm -p 8080:8080 quarkus/camel-openapi-server +# +# The ` registry.access.redhat.com/ubi9/ubi-minimal:9.7` base image is based on UBI 9. +# To use UBI 8, switch to `quay.io/ubi8/ubi-minimal:8.10`. +### +FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7 +WORKDIR /work/ +RUN chown 1001 /work \ + && chmod "g+rwX" /work \ + && chown 1001:root /work +COPY --chown=1001:root --chmod=0755 target/*-runner /work/application + +EXPOSE 8080 +USER 1001 + +ENTRYPOINT ["./application", "-Dquarkus.http.host=0.0.0.0"] diff --git a/apache-camel/camel-openapi-client/src/main/docker/Dockerfile.native-micro b/apache-camel/camel-openapi-client/src/main/docker/Dockerfile.native-micro new file mode 100644 index 0000000..f096fac --- /dev/null +++ b/apache-camel/camel-openapi-client/src/main/docker/Dockerfile.native-micro @@ -0,0 +1,32 @@ +#### +# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode. +# It uses a micro base image, tuned for Quarkus native executables. +# It reduces the size of the resulting container image. +# Check https://quarkus.io/guides/quarkus-runtime-base-image for further information about this image. +# +# Before building the container image run: +# +# ./mvnw package -Dnative +# +# Then, build the image with: +# +# docker build -f src/main/docker/Dockerfile.native-micro -t quarkus/camel-openapi-server . +# +# Then run the container using: +# +# docker run -i --rm -p 8080:8080 quarkus/camel-openapi-server +# +# The `quay.io/quarkus/ubi9-quarkus-micro-image:2.0` base image is based on UBI 9. +# To use UBI 8, switch to `quay.io/quarkus/quarkus-micro-image:2.0`. +### +FROM quay.io/quarkus/ubi9-quarkus-micro-image:2.0 +WORKDIR /work/ +RUN chown 1001 /work \ + && chmod "g+rwX" /work \ + && chown 1001:root /work +COPY --chown=1001:root --chmod=0755 target/*-runner /work/application + +EXPOSE 8080 +USER 1001 + +ENTRYPOINT ["./application", "-Dquarkus.http.host=0.0.0.0"] diff --git a/apache-camel/camel-openapi-client/src/main/java/org/acme/PetstoreClientRoutes.java b/apache-camel/camel-openapi-client/src/main/java/org/acme/PetstoreClientRoutes.java new file mode 100644 index 0000000..159d3df --- /dev/null +++ b/apache-camel/camel-openapi-client/src/main/java/org/acme/PetstoreClientRoutes.java @@ -0,0 +1,23 @@ +package org.acme; + +import org.apache.camel.builder.RouteBuilder; + +public class PetstoreClientRoutes extends RouteBuilder { + + @Override + public void configure() throws Exception { + from("direct:getPetById") + .to("rest-openapi:petstore-api.json#getPetById?host={{petstore.service.url}}"); + + from("direct:addPet") + .marshal().json() + .to("rest-openapi:petstore-api.json#addPet?host={{petstore.service.url}}"); + + from("direct:updatePet") + .marshal().json() + .to("rest-openapi:petstore-api.json#updatePet?host={{petstore.service.url}}"); + + from("direct:deletePet") + .to("rest-openapi:petstore-api.json#deletePet?host={{petstore.service.url}}"); + } +} diff --git a/apache-camel/camel-openapi-client/src/main/resources/application.properties b/apache-camel/camel-openapi-client/src/main/resources/application.properties new file mode 100644 index 0000000..b75e876 --- /dev/null +++ b/apache-camel/camel-openapi-client/src/main/resources/application.properties @@ -0,0 +1,3 @@ +# External Petstore service URL (Citrus HTTP server in tests) +petstore.service.url=http://petstore.prod-service.local +%test.petstore.service.url=http://localhost:18080 diff --git a/apache-camel/camel-openapi-client/src/main/resources/petstore-api.json b/apache-camel/camel-openapi-client/src/main/resources/petstore-api.json new file mode 100644 index 0000000..81dda5d --- /dev/null +++ b/apache-camel/camel-openapi-client/src/main/resources/petstore-api.json @@ -0,0 +1,284 @@ +{ + "openapi": "3.0.2", + "info": { + "title": "Swagger Petstore", + "version": "1.0.1", + "description": "This is a sample server Petstore server.", + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "servers": [ + { + "url": "http://localhost:8080" + } + ], + "paths": { + "/pet": { + "put": { + "requestBody": { + "description": "Pet object that needs to be added to the store", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + } + }, + "required": true + }, + "tags": [ + "pet" + ], + "responses": { + "204": { + "description": "No content" + }, + "400": { + "description": "Invalid ID supplied" + }, + "404": { + "description": "Pet not found" + }, + "405": { + "description": "Validation exception" + } + }, + "operationId": "updatePet", + "summary": "Update an existing pet", + "description": "" + }, + "post": { + "requestBody": { + "description": "Pet object that needs to be added to the store", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + } + }, + "required": true + }, + "tags": [ + "pet" + ], + "responses": { + "201": { + "description": "Created" + }, + "405": { + "description": "Invalid input" + } + }, + "operationId": "addPet", + "summary": "Add a new pet to the store", + "description": "" + } + }, + "/pet/{petId}": { + "get": { + "tags": [ + "pet" + ], + "parameters": [ + { + "name": "petId", + "description": "ID of pet to return", + "schema": { + "format": "int64", + "type": "integer" + }, + "in": "path", + "required": true + }, + { + "name": "verbose", + "description": "Output details", + "schema": { + "type": "boolean" + }, + "in": "query", + "required": false + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + } + }, + "description": "successful operation" + }, + "400": { + "description": "Invalid ID supplied" + }, + "404": { + "description": "Pet not found" + } + }, + "operationId": "getPetById", + "summary": "Find pet by ID", + "description": "Returns a single pet" + }, + "delete": { + "tags": [ + "pet" + ], + "parameters": [ + { + "name": "petId", + "description": "Pet id to delete", + "schema": { + "format": "int64", + "type": "integer" + }, + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "No content" + }, + "400": { + "description": "Invalid ID supplied" + }, + "404": { + "description": "Pet not found" + } + }, + "operationId": "deletePet", + "summary": "Deletes a pet", + "description": "" + } + } + }, + "components": { + "schemas": { + "Category": { + "type": "object", + "properties": { + "id": { + "format": "int64", + "type": "integer" + }, + "name": { + "type": "string" + } + }, + "xml": { + "name": "Category" + } + }, + "Tag": { + "type": "object", + "properties": { + "id": { + "format": "int64", + "type": "integer" + }, + "name": { + "type": "string" + } + }, + "xml": { + "name": "Tag" + } + }, + "Pet": { + "required": [ + "category", + "name", + "status" + ], + "type": "object", + "properties": { + "id": { + "format": "int64", + "type": "integer" + }, + "category": { + "$ref": "#/components/schemas/Category" + }, + "name": { + "type": "string", + "example": "doggie" + }, + "photoUrls": { + "type": "array", + "items": { + "type": "string" + }, + "xml": { + "name": "photoUrl", + "wrapped": true + } + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + }, + "xml": { + "name": "tag", + "wrapped": true + } + }, + "status": { + "description": "pet status in the store", + "enum": [ + "available", + "pending", + "sold" + ], + "type": "string" + } + }, + "xml": { + "name": "Pet" + } + }, + "ApiResponse": { + "type": "object", + "properties": { + "code": { + "format": "int32", + "type": "integer" + }, + "type": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + } + }, + "tags": [ + { + "name": "pet", + "description": "Everything about your Pets" + } + ] +} diff --git a/apache-camel/camel-openapi-client/src/test/java/org/acme/CitrusEndpointConfig.java b/apache-camel/camel-openapi-client/src/test/java/org/acme/CitrusEndpointConfig.java new file mode 100644 index 0000000..cbac3bb --- /dev/null +++ b/apache-camel/camel-openapi-client/src/test/java/org/acme/CitrusEndpointConfig.java @@ -0,0 +1,40 @@ +package org.acme; + +import org.citrusframework.DefaultTestActions; +import org.citrusframework.TestActions; +import org.citrusframework.annotations.CitrusConfiguration; +import org.citrusframework.container.AfterSuite; +import org.citrusframework.http.server.HttpServer; +import org.citrusframework.http.server.HttpServerBuilder; +import org.citrusframework.spi.BindToRegistry; + +import static org.citrusframework.container.SequenceAfterSuite.Builder.afterSuite; + +@CitrusConfiguration +public class CitrusEndpointConfig { + + private final TestActions actions = new DefaultTestActions(); + + HttpServer petstoreServer; + + @BindToRegistry + public HttpServer petstoreServer() { + if (petstoreServer == null) { + petstoreServer = new HttpServerBuilder() + .port(18080) + .autoStart(true) + .timeout(10000) + .build(); + } + + return petstoreServer; + } + + @BindToRegistry + public AfterSuite afterSuiteActions() { + return afterSuite() + .actions( + actions.stop(petstoreServer())) + .build(); + } +} diff --git a/apache-camel/camel-openapi-client/src/test/java/org/acme/PetstoreOpenApiClientTest.java b/apache-camel/camel-openapi-client/src/test/java/org/acme/PetstoreOpenApiClientTest.java new file mode 100644 index 0000000..d061af0 --- /dev/null +++ b/apache-camel/camel-openapi-client/src/test/java/org/acme/PetstoreOpenApiClientTest.java @@ -0,0 +1,194 @@ +package org.acme; + +import com.fasterxml.jackson.annotation.JsonInclude; +import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; +import org.apache.camel.CamelContext; +import org.apache.camel.Exchange; +import org.citrusframework.GherkinTestActionRunner; +import org.citrusframework.TestActionSupport; +import org.citrusframework.annotations.CitrusConfiguration; +import org.citrusframework.annotations.CitrusEndpoint; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.camel.dsl.CamelSupport; +import org.citrusframework.http.server.HttpServer; +import org.citrusframework.message.builder.DefaultPayloadBuilder; +import org.citrusframework.message.builder.ObjectMappingPayloadBuilder; +import org.citrusframework.quarkus.CitrusSupport; +import org.citrusframework.spi.BindToRegistry; +import org.junit.jupiter.api.Test; +import org.springframework.http.HttpStatus; +import tools.jackson.databind.DeserializationFeature; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.SerializationFeature; +import tools.jackson.databind.cfg.EnumFeature; +import tools.jackson.databind.json.JsonMapper; + +import java.util.HashMap; +import java.util.Map; + +import static org.apache.camel.builder.endpoint.StaticEndpointBuilders.direct; + +@QuarkusTest +@CitrusSupport +@CitrusConfiguration(classes = CitrusEndpointConfig.class) +class PetstoreOpenApiClientTest implements TestActionSupport { + + @CitrusEndpoint + HttpServer petstoreServer; + + @Inject + @BindToRegistry + CamelContext camelContext; + + @BindToRegistry + ObjectMapper objectMapper = JsonMapper.builder() + .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(EnumFeature.READ_ENUMS_USING_TO_STRING) + .enable(EnumFeature.WRITE_ENUMS_USING_TO_STRING) + .enable(SerializationFeature.INDENT_OUTPUT) + .changeDefaultPropertyInclusion(incl -> incl.withValueInclusion(JsonInclude.Include.NON_EMPTY)) + .changeDefaultPropertyInclusion(incl -> incl.withContentInclusion(JsonInclude.Include.NON_EMPTY)) + .build(); + + @CitrusResource + GherkinTestActionRunner runner; + + @Test + void shouldGetPetById() { + runner.given( + createVariables() + .variable("petId", "1000") + ); + + runner.when( + camel().send() + .endpoint(CamelSupport.camel().endpoint(direct("getPetById")::getRawUri)) + .fork(true) + .message().header("petId", "${petId}") + ); + + runner.then( + http() + .server(petstoreServer) + .receive() + .get("/pet/${petId}") + .message() + ); + + runner.then( + http() + .server(petstoreServer) + .send() + .response(HttpStatus.OK) + .message() + .body(new DefaultPayloadBuilder(newPet(1000, "hasso", "dog", 1L, "available"))) + .process(processor().camel().marshal().json()) + ); + } + + @Test + void shouldAddPet() { + Map petBody = newPet(0L, "hasso", "dog", 1L, "available"); + + runner.when( + camel().send() + .endpoint(CamelSupport.camel().endpoint(direct("addPet")::getRawUri)) + .fork(true) + .message() + .body(new DefaultPayloadBuilder(petBody)) + .header(Exchange.CONTENT_TYPE, "application/json") + ); + + runner.then( + http() + .server(petstoreServer) + .receive() + .post("/pet") + .message() + .body(new ObjectMappingPayloadBuilder(petBody)) + .contentType("application/json;charset=UTF-8") + ); + + runner.then( + http() + .server(petstoreServer) + .send() + .response(HttpStatus.CREATED) + ); + } + + @Test + void shouldUpdatePet() { + Map petBody = newPet(1001L, "fluffy", "cat", 2L, "sold"); + + runner.when( + camel().send() + .endpoint(CamelSupport.camel().endpoint(direct("updatePet")::getRawUri)) + .fork(true) + .message() + .body(new DefaultPayloadBuilder(petBody)) + .header(Exchange.CONTENT_TYPE, "application/json") + ); + + runner.then( + http() + .server(petstoreServer) + .receive() + .put("/pet") + .message() + .body(new ObjectMappingPayloadBuilder(petBody)) + .contentType("application/json;charset=UTF-8") + ); + + runner.then( + http() + .server(petstoreServer) + .send() + .response(HttpStatus.NO_CONTENT) + ); + } + + @Test + void shouldDeletePet() { + runner.given( + createVariables() + .variable("petId", "1000") + ); + + runner.when( + camel().send() + .endpoint(CamelSupport.camel().endpoint(direct("deletePet")::getRawUri)) + .fork(true) + .message().header("petId", "${petId}") + ); + + runner.then( + http() + .server(petstoreServer) + .receive() + .delete("/pet/${petId}") + ); + + runner.then( + http() + .server(petstoreServer) + .send() + .response(HttpStatus.NO_CONTENT) + ); + } + + private static Map newPet(long id, String name, String categoryName, + long categoryId, String status) { + Map category = new HashMap<>(); + category.put("id", categoryId); + category.put("name", categoryName); + + Map pet = new HashMap<>(); + pet.put("id", id); + pet.put("name", name); + pet.put("category", category); + pet.put("status", status); + return pet; + } +} diff --git a/apache-camel/camel-openapi-client/src/test/java/org/acme/PetstoreOpenApiSpecTest.java b/apache-camel/camel-openapi-client/src/test/java/org/acme/PetstoreOpenApiSpecTest.java new file mode 100644 index 0000000..8e808a9 --- /dev/null +++ b/apache-camel/camel-openapi-client/src/test/java/org/acme/PetstoreOpenApiSpecTest.java @@ -0,0 +1,162 @@ +package org.acme; + +import java.util.HashMap; +import java.util.Map; + +import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; +import org.apache.camel.CamelContext; +import org.apache.camel.Exchange; +import org.citrusframework.GherkinTestActionRunner; +import org.citrusframework.TestActionSupport; +import org.citrusframework.annotations.CitrusConfiguration; +import org.citrusframework.annotations.CitrusEndpoint; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.camel.dsl.CamelSupport; +import org.citrusframework.http.server.HttpServer; +import org.citrusframework.message.builder.DefaultPayloadBuilder; +import org.citrusframework.openapi.OpenApiSpecification; +import org.citrusframework.quarkus.CitrusSupport; +import org.citrusframework.spi.BindToRegistry; +import org.junit.jupiter.api.Test; +import org.springframework.http.HttpStatus; + +import static org.apache.camel.builder.endpoint.StaticEndpointBuilders.direct; + +@QuarkusTest +@CitrusSupport +@CitrusConfiguration(classes = CitrusEndpointConfig.class) +class PetstoreOpenApiSpecTest implements TestActionSupport { + + @CitrusEndpoint + HttpServer petstoreServer; + + @Inject + @BindToRegistry + CamelContext camelContext; + + @CitrusResource + GherkinTestActionRunner runner; + + OpenApiSpecification petstoreApi = OpenApiSpecification.from("classpath:petstore-api.json"); + + @Test + void shouldGetPetById() { + runner.given( + createVariables() + .variable("petId", "1000") + ); + + runner.when( + camel().send() + .endpoint(CamelSupport.camel().endpoint(direct("getPetById")::getRawUri)) + .fork(true) + .message().header("petId", "${petId}") + ); + + runner.then( + openapi().specification(petstoreApi) + .server(petstoreServer) + .receive("getPetById") + ); + + runner.then( + openapi().specification(petstoreApi) + .server(petstoreServer) + .send("getPetById", HttpStatus.OK) + ); + } + + @Test + void shouldAddPet() { + Map petBody = newPet(0L, "hasso", "dog", 1L, "available"); + + runner.when( + camel().send() + .endpoint(CamelSupport.camel().endpoint(direct("addPet")::getRawUri)) + .fork(true) + .message() + .body(new DefaultPayloadBuilder(petBody)) + .header(Exchange.CONTENT_TYPE, "application/json") + ); + + runner.then( + openapi().specification(petstoreApi) + .server(petstoreServer) + .receive("addPet") + ); + + runner.then( + openapi().specification(petstoreApi) + .server(petstoreServer) + .send("addPet", HttpStatus.CREATED) + ); + } + + @Test + void shouldUpdatePet() { + Map petBody = newPet(1000L, "fluffy", "cat", 2L, "sold"); + + runner.when( + camel().send() + .endpoint(CamelSupport.camel().endpoint(direct("updatePet")::getRawUri)) + .fork(true) + .message() + .body(new DefaultPayloadBuilder(petBody)) + .header(Exchange.CONTENT_TYPE, "application/json") + ); + + runner.then( + openapi().specification(petstoreApi) + .server(petstoreServer) + .receive("updatePet") + ); + + runner.then( + openapi().specification(petstoreApi) + .server(petstoreServer) + .send("updatePet", HttpStatus.NO_CONTENT) + ); + } + + @Test + void shouldDeletePet() { + runner.given( + createVariables() + .variable("petId", "1000") + ); + + runner.when( + camel().send() + .endpoint(CamelSupport.camel().endpoint(direct("deletePet")::getRawUri)) + .fork(true) + .message().header("petId", "${petId}") + ); + + runner.then( + openapi().specification(petstoreApi) + .server(petstoreServer) + .receive("deletePet") + ); + + runner.then( + openapi().specification(petstoreApi) + .server(petstoreServer) + .send("deletePet", HttpStatus.NO_CONTENT) + ); + } + + private static Map newPet(long id, String name, String categoryName, + long categoryId, String status) { + Map category = new HashMap<>(); + category.put("id", categoryId); + category.put("name", categoryName); + + Map pet = new HashMap<>(); + pet.put("id", id); + pet.put("name", name); + pet.put("category", category); + pet.put("status", status); + return pet; + } +} diff --git a/apache-camel/camel-openapi-client/src/test/resources/application.properties b/apache-camel/camel-openapi-client/src/test/resources/application.properties new file mode 100644 index 0000000..1127822 --- /dev/null +++ b/apache-camel/camel-openapi-client/src/test/resources/application.properties @@ -0,0 +1 @@ +quarkus.arc.ignored-split-packages=org.citrusframework.* diff --git a/apache-camel/pom.xml b/apache-camel/pom.xml index 4cbbaf3..f9d6f1d 100644 --- a/apache-camel/pom.xml +++ b/apache-camel/pom.xml @@ -19,6 +19,7 @@ camel-jms camel-kafka camel-mqtt + camel-openapi-client camel-openapi-server camel-postgresql camel-rest-dsl