This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push:
new 24ea6a94bd Miscellaneous documentation tidy-ups
24ea6a94bd is described below
commit 24ea6a94bd584071346ee4b2c16ce1aeba47f0ff
Author: James Netherton <[email protected]>
AuthorDate: Mon Mar 3 08:30:31 2025 +0000
Miscellaneous documentation tidy-ups
---
.../pages/reference/extensions/aws2-lambda.adoc | 10 -----
.../ROOT/pages/reference/extensions/console.adoc | 6 +--
.../ROOT/pages/reference/extensions/core.adoc | 8 ++--
.../ROOT/pages/reference/extensions/crypto.adoc | 34 +++++++--------
.../reference/extensions/file-cluster-service.adoc | 16 ++++---
.../ROOT/pages/reference/extensions/gson.adoc | 25 ++++++++---
.../ROOT/pages/reference/extensions/hazelcast.adoc | 16 +++----
.../ROOT/pages/reference/extensions/jms.adoc | 15 ++++---
.../ROOT/pages/reference/extensions/jolokia.adoc | 34 +++++++--------
.../ROOT/pages/reference/extensions/jslt.adoc | 4 ++
.../ROOT/pages/reference/extensions/kamelet.adoc | 7 ++-
.../extensions/kubernetes-cluster-service.adoc | 8 ++--
.../pages/reference/extensions/langchain4j.adoc | 32 +++++++-------
.../ROOT/pages/reference/extensions/language.adoc | 2 +-
.../pages/reference/extensions/mongodb-gridfs.adoc | 7 ++-
.../ROOT/pages/reference/extensions/mongodb.adoc | 47 ++++++++++----------
.../pages/reference/extensions/openapi-java.adoc | 2 +-
.../pages/reference/extensions/rest-openapi.adoc | 13 +++---
.../core/runtime/src/main/doc/configuration.adoc | 8 ++--
.../component/console/CamelConsoleConfig.java | 6 +--
.../runtime/src/main/doc/configuration.adoc | 4 --
.../aws2/lambda/it/Aws2LambdaResource.java | 51 ----------------------
.../main/org/apache/lambda/it/Aws2LambdaIT.java | 24 ----------
.../main/org/apache/lambda/it/Aws2LambdaTest.java | 34 ---------------
.../crypto/runtime/src/main/doc/limitations.adoc | 2 -
extensions/crypto/runtime/src/main/doc/usage.adoc | 29 +++++++-----
.../runtime/src/main/doc/configuration.adoc | 16 ++++---
.../gson/runtime/src/main/doc/configuration.adoc | 23 ++++++++--
.../runtime/src/main/doc/configuration.adoc | 16 +++----
extensions/jms/runtime/src/main/doc/usage.adoc | 15 ++++---
.../jolokia/config/JolokiaBuildTimeConfig.java | 10 ++---
.../jolokia/config/JolokiaRuntimeConfig.java | 24 +++++-----
.../jslt/runtime/src/main/doc/configuration.adoc | 4 ++
.../component/kamelet/KameletConfiguration.java | 7 ++-
.../runtime/src/main/doc/configuration.adoc | 8 ++--
.../runtime/src/main/doc/configuration.adoc | 32 +++++++-------
.../language/runtime/src/main/doc/usage.adoc | 2 +-
.../runtime/src/main/doc/configuration.adoc | 7 ++-
.../runtime/src/main/doc/configuration.adoc | 47 ++++++++++----------
.../deployment/OpenApiJavaBuildTimeConfig.java | 2 +-
.../rest-openapi/runtime/src/main/doc/usage.adoc | 13 +++---
41 files changed, 308 insertions(+), 362 deletions(-)
diff --git a/docs/modules/ROOT/pages/reference/extensions/aws2-lambda.adoc
b/docs/modules/ROOT/pages/reference/extensions/aws2-lambda.adoc
index ec4cdab1c8..999e158754 100644
--- a/docs/modules/ROOT/pages/reference/extensions/aws2-lambda.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/aws2-lambda.adoc
@@ -50,13 +50,3 @@ endif::[]
This extension auto-enables SSL support in native mode. Hence you do not need
to add
`quarkus.ssl.native=true` to your `application.properties` yourself. See also
https://quarkus.io/guides/native-and-ssl[Quarkus SSL guide].
-
-[id="extensions-aws2-lambda-additional-camel-quarkus-configuration"]
-== Additional Camel Quarkus configuration
-
-[id="extensions-aws2-lambda-configuration-not-possible-to-leverage-quarkus-amazon-lambda-by-camel-aws2-lambda-extension"]
-=== Not possible to leverage quarkus-amazon-lambda by Camel aws2-lambda
extension
-
-Quarkus-amazon-lambda extension allows you to use Quarkus to build your AWS
Lambdas, whereas Camel component manages (deploy, undeploy, …) existing
functions.
-Therefore, it is not possible to use `quarkus-amazon-lambda` as a client for
Camel `aws2-lambda` extension.
-
diff --git a/docs/modules/ROOT/pages/reference/extensions/console.adoc
b/docs/modules/ROOT/pages/reference/extensions/console.adoc
index e1048266d7..a596139c08 100644
--- a/docs/modules/ROOT/pages/reference/extensions/console.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/console.adoc
@@ -102,15 +102,15 @@ Whether the Camel developer console is enabled.
a|icon:lock[title=Fixed at build time]
[[quarkus.camel.console.path]]`link:#quarkus.camel.console.path[quarkus.camel.console.path]`
-The context path under which the Camel developer console is deployed (default
/q/camel/dev-console).
+The context path under which the Camel developer console is deployed (default
`/q/camel/dev-console`).
| `string`
| `camel/dev-console`
a|icon:lock[title=Fixed at build time]
[[quarkus.camel.console.exposure-mode]]`link:#quarkus.camel.console.exposure-mode[quarkus.camel.console.exposure-mode]`
-The modes in which the Camel developer console is available. The default
{@code dev-test} enables the developer
+The modes in which the Camel developer console is available. The default
`dev-test` enables the developer
console only in dev mode and test modes.
-A value of {@code all} enables agent discovery in dev, test and prod modes.
Setting the value to {@code none} will
+A value of `all` enables agent discovery in dev, test and prod modes. Setting
the value to `none` will
not expose the developer console HTTP endpoint.
| `all`, `dev-test`, `none`
| `dev-test`
diff --git a/docs/modules/ROOT/pages/reference/extensions/core.adoc
b/docs/modules/ROOT/pages/reference/extensions/core.adoc
index 9b0b1d1d84..da26b4b83c 100644
--- a/docs/modules/ROOT/pages/reference/extensions/core.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/core.adoc
@@ -64,9 +64,9 @@ When using the OGNL notation from the simple language, the
`camel-quarkus-bean`
For instance, the simple expression below is accessing the `getAddress()`
method on the message body of type `Client`.
[source,java]
----
+----
simple("${body.address}")
----
+----
In such a situation, one should take an additional dependency on the
camel-quarkus-bean extension xref:{cq-camel-components}::bean-component.adoc[as
described here].
Note that in native mode, some classes may need to be registered for
reflection. In the example above, the `Client` class
@@ -85,9 +85,9 @@ It may be needed to register some classes for reflection
manually.
For instance, the simple expression below is dynamically resolving the type
`java.nio.ByteBuffer` at runtime:
[source,java]
----
+----
simple("${body} is 'java.nio.ByteBuffer'")
----
+----
As such, the class `java.nio.ByteBuffer` needs to be
link:https://quarkus.io/guides/writing-native-applications-tips#registering-for-reflection[registered
for reflection].
diff --git a/docs/modules/ROOT/pages/reference/extensions/crypto.adoc
b/docs/modules/ROOT/pages/reference/extensions/crypto.adoc
index 85141d708e..a545f490a2 100644
--- a/docs/modules/ROOT/pages/reference/extensions/crypto.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/crypto.adoc
@@ -50,17 +50,19 @@ endif::[]
[id="extensions-crypto-usage-security-provider"]
=== Security Provider
-Extension requires BouncyCastle provider and also utilizes the quarkus
security extension (see
https://quarkus.io/guides/security-customization#registering-security-providers[security
providers registration doc])
-If there is no `BC*` provider registered (by
`quarkus.security.security-providers` property).
-The `BC` provider is registered.
+This extension requires a BouncyCastle security provider to be
https://quarkus.io/guides/security-customization#registering-security-providers[registered]
and also utilizes the quarkus security extension.
+
+NOTE: If no BouncyCastle provider is registered via the
`quarkus.security.security-providers` configuration property, then a default
`BC` provider is registered automatically.
[id="extensions-crypto-usage-fips"]
=== FIPS
-When running the `crypto` extension on FIPS enabled system any FIPS-compliant
Java Security Provider (such as BCFIPS) has to be used.
+When running the `crypto` extension on a FIPS enabled system, a FIPS-compliant
Java Security Provider (such as `BCFIPS`) has to be used.
+
+In the case of `BCFIPS`, add dependencies `bc-fips` and `quarkus-security` to
your application.
-* In the case of BCFIPS, please add BCFIPS dependency and `quarkus-security`
(see the
https://quarkus.io/guides/security-customization#bouncy-castle-fips[guide] for
more information)
-```
+[source,xml]
+----
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bc-fips</artifactId>
@@ -69,22 +71,18 @@ When running the `crypto` extension on FIPS enabled system
any FIPS-compliant Ja
<groupId>io.quarkus</groupId>
<artifactId>quarkus-security</artifactId>
</dependency>
-```
-and register BCFIPS provider with following proprerty:
-```
-quarkus.security.security-providers=BCFIPS
-```
-* Alternatively, you can add different FIPS compliant provider. Make Sure that
the provider is registered.
-
-
-
-
+----
-[id="extensions-crypto-camel-quarkus-limitations"]
-== Camel Quarkus limitations
+Then register the `BCFIPS` security provider by adding the following
configuration to `application.properties`.
+[source,properties]
+----
+quarkus.security.security-providers=BCFIPS
+----
+Alternatively, you can add a different FIPS compliant provider and register it
via the `quarkus.security.security-providers` configuration property.
+Refer to the
https://quarkus.io/guides/security-customization#bouncy-castle-fips[Quarkus
Security guide] for more information.
[id="extensions-crypto-ssl-in-native-mode"]
diff --git
a/docs/modules/ROOT/pages/reference/extensions/file-cluster-service.adoc
b/docs/modules/ROOT/pages/reference/extensions/file-cluster-service.adoc
index e2c895e342..af08eb41d2 100644
--- a/docs/modules/ROOT/pages/reference/extensions/file-cluster-service.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/file-cluster-service.adoc
@@ -40,7 +40,6 @@ endif::[]
[id="extensions-file-cluster-service-additional-camel-quarkus-configuration"]
== Additional Camel Quarkus configuration
-
[id="extensions-file-cluster-service-configuration-having-only-a-single-consumer-in-a-cluster-consuming-from-a-given-endpoint"]
=== Having only a single consumer in a cluster consuming from a given endpoint
@@ -49,15 +48,18 @@ In such a setup, a single consumer will be active at a time
across the whole cam
For instance, having the route below deployed on multiple JVMs:
-```
-from("master:ns:timer:test?period=100").log("Timer invoked on a single JVM at
a time");
-```
+[source,java]
+----
+from("master:ns:timer:test?period=100")
+ .log("Timer invoked on a single JVM at a time");
+----
-It's possible to configure the file cluster service with a property like below:
+It's possible to configure the file cluster service with a property like below
in `application.properties`:
-```
+[source,properties]
+----
quarkus.camel.cluster.file.root =
target/cluster-folder-where-lock-file-will-be-held
-```
+----
As a result, a single consumer will be active across the `ns` camel master
namespace.
It means that, at a given time, only a single timer will generate exchanges
across all JVMs.
diff --git a/docs/modules/ROOT/pages/reference/extensions/gson.adoc
b/docs/modules/ROOT/pages/reference/extensions/gson.adoc
index a5024aef4c..8e392e9158 100644
--- a/docs/modules/ROOT/pages/reference/extensions/gson.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/gson.adoc
@@ -48,10 +48,25 @@ endif::[]
[id="extensions-gson-additional-camel-quarkus-configuration"]
== Additional Camel Quarkus configuration
-[id="extensions-gson-configuration-marshaling-unmarshaling-objects-in-native-mode"]
-=== Marshaling/Unmarshaling objects in native mode
+[id="extensions-gson-configuration-marshaling-unmarshalling-objects-in-native-mode"]
+=== Marshaling / Unmarshalling objects in native mode
-When marshaling/unmarshaling objects in native mode, all the serialized
classes need to be
link:https://quarkus.io/guides/writing-native-applications-tips#registering-for-reflection[registered
for reflection].
-As such, when using `GsonDataFormat.setUnmarshalType(...)`,
`GsonDataFormat.setUnmarshalTypeName(...)` and even
`GsonDataFormat.setUnmarshalGenericType(...)`, the unmarshal type as well as
sub field types should be registered for reflection.
-See a working example in this
link:https://github.com/apache/camel-quarkus/blob/main/integration-tests/dataformats-json/src/main/java/org/apache/camel/quarkus/component/dataformats/json/model/PojoA.java[integration
test].
+When marshaling / unmarshalling objects in native mode, their target types
must be
link:https://quarkus.io/guides/writing-native-applications-tips#registering-for-reflection[registered
for reflection].
+
+For example when using any of the following:
+
+* `GsonDataFormat.setUnmarshalType(MyPojo.class)`
+* `GsonDataFormat.setUnmarshalTypeName("org.acme.MyPojo")`
+* `GsonDataFormat.setUnmarshalGenericType(MyPojo.class)`
+
+`MyPojo.class` can be registered for reflection as follows.
+
+[source,java]
+----
+package org.acme.MyPojo;
+
+@RegisterForReflection
+public class MyPojo {
+}
+----
diff --git a/docs/modules/ROOT/pages/reference/extensions/hazelcast.adoc
b/docs/modules/ROOT/pages/reference/extensions/hazelcast.adoc
index af5312917f..75ac94e219 100644
--- a/docs/modules/ROOT/pages/reference/extensions/hazelcast.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/hazelcast.adoc
@@ -66,17 +66,13 @@ https://quarkus.io/guides/native-and-ssl[Quarkus SSL guide].
This extension leverages
https://github.com/hazelcast/quarkus-hazelcast-client[Hazelcast Client for
Quarkus]. The configuration of the HazelcastInstance is managed by the
extension. To configure Hazelcast Instance, check the
https://github.com/hazelcast/quarkus-hazelcast-client[Hazelcast Client for
Quarkus] guide.
-*Please note that the camel-quarkus-hazelcast component works only with the
client mode.*
+IMPORTANT: `camel-quarkus-hazelcast` works only in client mode.
-To use the Hazelcast instance in the camel-quarkus-hazelcast component, you
should configure the component with :
-
-* The HazelcastInstance initialized by the Hazelcast Client for Quarkus
-* The component mode as : "client"
-
-Example of configuration for HazelcastMap component:
+To use the `HazelcastInstance` bean in the Hazelcast component, you should
configure the component as follows.
[source,java]
----
+ <1>
@Inject
HazelcastInstance hazelcastInstance;
@@ -87,11 +83,13 @@ Example of configuration for HazelcastMap component:
HazelcastDefaultComponent hazelcastMap() {
final HazelcastMapComponent hazelcastComponent = new
HazelcastMapComponent();
hazelcastComponent.setHazelcastInstance(hazelcastInstance);
+ <2>
hazelcastComponent.setHazelcastMode(HazelcastConstants.HAZELCAST_CLIENT_MODE);
return getHazelcastComponent(hazelcastComponent);
}
----
+<1> The `HazelcastInstance` bean instance created by the `quarkus-hazelcast`
extension
+<2> The Hazelcast mode must be set to client mode
-You may want to check the
https://github.com/apache/camel-quarkus/tree/main/integration-tests/hazelcast[integration
test]
-in our source tree as an example.
+Some more examples can be found in the Camel Quarkus Hazelcast
https://github.com/apache/camel-quarkus/tree/main/integration-tests/hazelcast[integration
tests].
diff --git a/docs/modules/ROOT/pages/reference/extensions/jms.adoc
b/docs/modules/ROOT/pages/reference/extensions/jms.adoc
index 580b821ce4..337002b105 100644
--- a/docs/modules/ROOT/pages/reference/extensions/jms.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/jms.adoc
@@ -88,10 +88,11 @@ Currently, it can work with `quarkus-artemis-jms`,
`quarkus-qpid-jms` and `ibmmq
Pooling is enabled by default.
[NOTE]
====
-`clientID` and `durableSubscriptionName` are not supported in pooling
connections. If `setClientID` is called on a `reused` connection from the pool,
an `IllegalStateException` will be thrown. You will get some error messages
such like `Cause: setClientID can only be called directly after the connection
is created`
+`clientID` and `durableSubscriptionName` are not supported in pooled
connections. If `setClientID` is called on a reused connection from the pool,
an `IllegalStateException` will be thrown. You will get error messages like
`Cause: setClientID can only be called directly after the connection is
created`.
====
To enable XA, you need to add `quarkus-narayana-jta` extension:
+
[source,xml]
----
<dependency>
@@ -99,16 +100,19 @@ To enable XA, you need to add `quarkus-narayana-jta`
extension:
<artifactId>quarkus-narayana-jta</artifactId>
</dependency>
----
-and add the following configuration to your `application.properties`:
+
+Also add the following configuration to your `application.properties`:
+
[source,properties]
----
quarkus.pooled-jms.transaction=xa
quarkus.transaction-manager.enable-recovery=true
----
-XA support is only available with `quarkus-artemis-jms` and `ibmmq-client`.
Also We highly recommend to enable transaction recovery.
+XA support is only available with `quarkus-artemis-jms` and `ibmmq-client`. We
highly recommend to enable transaction recovery.
+
+Since there is no quarkus extension for `ibmmq-client`, you need to create a
custom `ConnectionFactory` and wrap it by yourself. Here is an example:
-Since there is no quarkus extension for `ibmmq-client` currently, you need to
create a custom `ConnectionFactory` and wrap it by yourself. Here is an example:
[source,java]
----
@Produces
@@ -133,7 +137,8 @@ public ConnectionFactory
createXAConnectionFactory(PooledJmsWrapper wrapper) {
[NOTE]
====
-If you use `ibmmq-client` to consume messages and enable XA, you need to
configure `TransactionManager` in the camel route like this:
+If you use `ibmmq-client` to consume messages and enable XA, you need to
configure a `TransactionManager` in the camel route like this:
+
[source,java]
----
@Inject
diff --git a/docs/modules/ROOT/pages/reference/extensions/jolokia.adoc
b/docs/modules/ROOT/pages/reference/extensions/jolokia.adoc
index a1534fed4a..f44127ebb4 100644
--- a/docs/modules/ROOT/pages/reference/extensions/jolokia.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/jolokia.adoc
@@ -198,18 +198,18 @@ The context path that the Jolokia agent is deployed under.
a|icon:lock[title=Fixed at build time]
[[quarkus.camel.jolokia.register-management-endpoint]]`link:#quarkus.camel.jolokia.register-management-endpoint[quarkus.camel.jolokia.register-management-endpoint]`
-Whether to register a Quarkus management endpoint for Jolokia (default
/q/jolokia).
+Whether to register a Quarkus management endpoint for Jolokia (default
`/q/jolokia`).
When enabled this activates a management endpoint which will be accessible on
a path relative to
-${quarkus.http.non-application-root-path}/${quarkus.camel.jolokia.server.path}.
+`${quarkus.http.non-application-root-path}/${quarkus.camel.jolokia.server.path}`.
If the management interface is enabled, the value will be resolved as a path
relative to
-${quarkus.management.root-path}/${quarkus.camel.jolokia.server.path}. Note
that for this feature to work you must
-have quarkus-vertx-http on the application classpath.
+`${quarkus.management.root-path}/${quarkus.camel.jolokia.server.path}`. Note
that for this feature to work you must
+have `quarkus-vertx-http` on the application classpath.
| `boolean`
| `true`
a|icon:lock[title=Fixed at build time]
[[quarkus.camel.jolokia.camel-restrictor-allowed-mbean-domains]]`link:#quarkus.camel.jolokia.camel-restrictor-allowed-mbean-domains[quarkus.camel.jolokia.camel-restrictor-allowed-mbean-domains]`
-Comma separated list of allowed MBean domains used by CamelJolokiaRestrictor.
+Comma separated list of allowed MBean domains used by `CamelJolokiaRestrictor`.
| List of `string`
| `org.apache.camel,java.lang,java.nio`
@@ -223,8 +223,8 @@ be added to the generated Kubernetes manifests within the
container spec ports d
a|
[[quarkus.camel.jolokia.server.auto-start]]`link:#quarkus.camel.jolokia.server.auto-start[quarkus.camel.jolokia.server.auto-start]`
Whether the Jolokia agent HTTP server should be started automatically.
-When set to {@code false}, it is the user responsibility to start the server.
-This can be done via {@code @Inject CamelQuarkusJolokiaServer} and then
invoking the start() method.
+When set to `false`, it is the user responsibility to start the server.
+This can be done via `@Inject CamelQuarkusJolokiaServer` and then invoking the
`start()` method.
| `boolean`
| `true`
@@ -244,9 +244,9 @@ The port on which the Jolokia agent HTTP server should
listen on.
a|
[[quarkus.camel.jolokia.server.discovery-enabled-mode]]`link:#quarkus.camel.jolokia.server.discovery-enabled-mode[quarkus.camel.jolokia.server.discovery-enabled-mode]`
-The mode in which Jolokia agent discovery is enabled. The default {@code
dev-test}, enables discovery only in dev and
+The mode in which Jolokia agent discovery is enabled. The default `dev-test`,
enables discovery only in dev and
test modes.
-A value of {@code all} enables agent discovery in dev, test and prod modes.
Setting the value to {@code none} will
+A value of `all` enables agent discovery in dev, test and prod modes. Setting
the value to `none` will
disable agent discovery in all modes.
| `all`, `dev-test`, `none`
| `dev-test`
@@ -273,8 +273,8 @@ The principal which must be given in a client certificate
to allow access to Jol
a|
[[quarkus.camel.jolokia.additional-properties.-additional-properties]]`link:#quarkus.camel.jolokia.additional-properties.-additional-properties[quarkus.camel.jolokia.additional-properties."additional-properties"]`
Arbitrary Jolokia configuration options. These are described at the
-<a href="https://jolokia.org/reference/html/manual/agents.html">Jolokia
documentation</a>.
-Options can be configured like {@code
quarkus.camel.jolokia.additional-properties."debug"=true}.
+https://jolokia.org/reference/html/manual/agents.html[Jolokia documentation].
+Options can be configured like
`quarkus.camel.jolokia.additional-properties."debug"=true`.
| `Map<String,String>`
|
@@ -282,12 +282,12 @@ a|
[[quarkus.camel.jolokia.register-camel-restrictor]]`link:#quarkus.camel.jolok
When {@code true}, a Jolokia restrictor is registered that limits MBean read,
write and operation execution to the
following MBean domains.
-<ul>
-<li>org.apache.camel</li>
-<li>java.lang</li>
-<li>java.nio</li>
-</ul>
-Note that this option has no effect if
quarkus.camel.jolokia.additional-properties."restrictorClass" is set.
+
+* org.apache.camel
+* java.lang
+* java.nio
+
+Note that this option has no effect if
`quarkus.camel.jolokia.additional-properties."restrictorClass"` is set.
| `boolean`
| `true`
|===
diff --git a/docs/modules/ROOT/pages/reference/extensions/jslt.adoc
b/docs/modules/ROOT/pages/reference/extensions/jslt.adoc
index 742aeb6ad2..7245446208 100644
--- a/docs/modules/ROOT/pages/reference/extensions/jslt.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/jslt.adoc
@@ -80,6 +80,8 @@ More information about selecting resources for inclusion in
the native executabl
=== Using JSLT functions in native mode
When using JSLT functions from camel-quarkus in native mode, the classes
hosting the functions would need to be
link:https://quarkus.io/guides/writing-native-applications-tips#registering-for-reflection[registered
for reflection]. When registering the target function is not possible, one may
end up writing a stub as below.
+
+[source,java]
----
@RegisterForReflection
public class MathFunctionStub {
@@ -90,6 +92,8 @@ public class MathFunctionStub {
----
The target function `Math.pow(...)` is now accessible through the
`MathFunctionStub` class that could be registered in the component as below:
+
+[source,java]
----
@Named
JsltComponent jsltWithFunction() throws ClassNotFoundException {
diff --git a/docs/modules/ROOT/pages/reference/extensions/kamelet.adoc
b/docs/modules/ROOT/pages/reference/extensions/kamelet.adoc
index 9841473f07..9d48da5297 100644
--- a/docs/modules/ROOT/pages/reference/extensions/kamelet.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/kamelet.adoc
@@ -79,11 +79,10 @@ It's advised to name files containing your custom Kamelet
definitions with the e
a|icon:lock[title=Fixed at build time]
[[quarkus.camel.kamelet.identifiers]]`link:#quarkus.camel.kamelet.identifiers[quarkus.camel.kamelet.identifiers]`
Optional comma separated list of kamelet identifiers to configure for native
mode support.
-A kamelet identifier is the Kamelet file name without the .kamelet.yaml suffix.
-<p>
-The default value '*' will result in all discovered Kamelet definition files
being included into the native image.
+A kamelet identifier is the Kamelet file name without the `.kamelet.yaml`
suffix.
+
+The default value `*` will result in all discovered Kamelet definition files
being included into the native image.
Note that this configuration option is only relevant when producing a native
application.
-</p>
| List of `string`
| `*`
|===
diff --git
a/docs/modules/ROOT/pages/reference/extensions/kubernetes-cluster-service.adoc
b/docs/modules/ROOT/pages/reference/extensions/kubernetes-cluster-service.adoc
index 37eb2f63a6..2b024ae79f 100644
---
a/docs/modules/ROOT/pages/reference/extensions/kubernetes-cluster-service.adoc
+++
b/docs/modules/ROOT/pages/reference/extensions/kubernetes-cluster-service.adoc
@@ -52,9 +52,11 @@ In such a setup, a single consumer will be active at a time
across the whole cam
For instance, having the route below deployed on multiple pods:
-```
-from("master:ns:timer:test?period=100").log("Timer invoked on a single pod at
a time");
-```
+[source,java]
+----
+from("master:ns:timer:test?period=100")
+ .log("Timer invoked on a single pod at a time");
+----
As a result, a single consumer will be active across the `ns` camel master
namespace.
It means that, at a given time, only a single timer will generate exchanges
across the whole cluster.
diff --git a/docs/modules/ROOT/pages/reference/extensions/langchain4j.adoc
b/docs/modules/ROOT/pages/reference/extensions/langchain4j.adoc
index c333864201..94c5258d7d 100644
--- a/docs/modules/ROOT/pages/reference/extensions/langchain4j.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/langchain4j.adoc
@@ -66,20 +66,20 @@ As such, one might need to import the
`quarkus-langchain4j-bom` before other rel
[id="extensions-langchain4j-configuration-using-camel-annotations-from-langchain4j-ai-service-method-parameters"]
=== Using camel annotations from LangChain4j AI service method parameters
-The `camel-quarkus-langchain4j` extension make it possible to use camel
parameter binding annotations with LangChain4j AI services.
+The `camel-quarkus-langchain4j` extension makes it possible to use camel
parameter binding annotations with LangChain4j AI services.
-Let's see an example below:
+For example:
-```
+[source,java]
+----
@RegisterAiService
@ApplicationScoped
public interface CustomAiService {
-
@UserMessage("An LLM prompt that can use the method parameter
{myHeaderInjectedIntoPrompt}.")
@Handler
String invokeLlm(@Header("myHeaderName") String
myHeaderInjectedIntoPrompt);
}
-```
+----
You can find more details about Camel Parameter Binding annotations in the
xref:manual::parameter-binding-annotations.adoc[manual].
@@ -90,26 +90,27 @@ With the `camel-quarkus-langchain4j` extension, the AI
services are resolvable b
For instance, let's define an AI service below:
-```
+[source,java]
+----
@ApplicationScoped
@RegisterAiService
public interface MyAiService {
-
@UserMessage("My Prompt")
@Handler
String chat(String question);
}
-```
+----
The AI service could then be invoked from a Camel route like this:
-```
+[source,java]
+----
@Override
public void configure() {
from("...")
.bean(MyAiService.class);
}
-```
+----
[id="extensions-langchain4j-configuration-resolving-ai-services-by-bean-name"]
=== Resolving AI services by bean name
@@ -118,25 +119,26 @@ The AI services are also resolvable by bean name when
called from a `bean` state
For instance, let's define an AI service below:
-```
+[source,java]
+----
@ApplicationScoped
@Named("aiServiceResolvedByName")
@RegisterAiService
public interface AiServiceResolvedByName {
-
@UserMessage("My prompt")
@Handler
String chatByName(String input);
}
-```
+----
The AI service could then be invoked from a Camel route as below:
-```
+[source,java]
+----
@Override
public void configure() {
from("...")
.bean("aiServiceResolvedByName");
}
-```
+----
diff --git a/docs/modules/ROOT/pages/reference/extensions/language.adoc
b/docs/modules/ROOT/pages/reference/extensions/language.adoc
index e23bb0bb12..70c98edfb5 100644
--- a/docs/modules/ROOT/pages/reference/extensions/language.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/language.adoc
@@ -66,7 +66,7 @@ To use any other language, you must add the corresponding
dependency. Consult th
When loading scripts from the classpath in native mode, the path to the script
file must be specified in the `quarkus.native.resources.includes` property of
the `application.properties` file. For example:
-[source]
+[source,properties]
----
quarkus.native.resources.includes=script.txt
----
diff --git a/docs/modules/ROOT/pages/reference/extensions/mongodb-gridfs.adoc
b/docs/modules/ROOT/pages/reference/extensions/mongodb-gridfs.adoc
index 8e4b7fb7fe..a3a2afc629 100644
--- a/docs/modules/ROOT/pages/reference/extensions/mongodb-gridfs.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/mongodb-gridfs.adoc
@@ -54,6 +54,9 @@ via the Quarkus MongoDB Client
https://quarkus.io/guides/mongodb#configuration-r
The Camel Quarkus MongoDB extension automatically registers a MongoDB client
bean named `camelMongoClient`. This can be referenced in the mongodb endpoint
URI
`connectionBean` path parameter. For example:
- from("direct:start")
- .to("mongodb-gridfs:camelMongoClient?database=test&operation=listAll")
+[source,java]
+----
+from("direct:start")
+ .to("mongodb-gridfs:camelMongoClient?database=test&operation=listAll");
+----
diff --git a/docs/modules/ROOT/pages/reference/extensions/mongodb.adoc
b/docs/modules/ROOT/pages/reference/extensions/mongodb.adoc
index 08e325b81f..5a54e2a56f 100644
--- a/docs/modules/ROOT/pages/reference/extensions/mongodb.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/mongodb.adoc
@@ -54,34 +54,37 @@ via the Quarkus MongoDB Client
https://quarkus.io/guides/mongodb#configuration-r
The Camel Quarkus MongoDB extension automatically registers a MongoDB client
bean named `camelMongoClient`. This can be referenced in the mongodb endpoint
URI
`connectionBean` path parameter. For example:
- from("direct:start")
+[source,java]
+----
+from("direct:start")
.to("mongodb:camelMongoClient?database=myDb&collection=myCollection&operation=findAll")
+----
If your application needs to work with multiple MongoDB servers, you can
create a "named" client and reference in your route by injecting a client and
the related configuration as explained in the
https://quarkus.io/guides/mongodb#named-mongo-client-injection[Quarkus MongoDB
extension client injection]. For example:
-....
-//application.properties
+[source,properties]
+----
quarkus.mongodb.mongoClient1.connection-string =
mongodb://root:example@localhost:27017/
-....
-....
-//Routes.java
-
- @ApplicationScoped
- public class Routes extends RouteBuilder {
- @Inject
- @MongoClientName("mongoClient1")
- MongoClient mongoClient1;
-
- @Override
- public void configure() throws Exception {
- from("direct:defaultServer")
-
.to("mongodb:camelMongoClient?database=myDb&collection=myCollection&operation=findAll")
-
- from("direct:otherServer")
-
.to("mongodb:mongoClient1?database=myOtherDb&collection=myOtherCollection&operation=findAll");
- }
+----
+
+[source,java]
+----
+@ApplicationScoped
+public class Routes extends RouteBuilder {
+ @Inject
+ @MongoClientName("mongoClient1")
+ MongoClient mongoClient1;
+
+ @Override
+ public void configure() throws Exception {
+ from("direct:defaultServer")
+
.to("mongodb:camelMongoClient?database=myDb&collection=myCollection&operation=findAll");
+
+ from("direct:otherServer")
+
.to("mongodb:mongoClient1?database=myOtherDb&collection=myOtherCollection&operation=findAll");
}
-....
+}
+----
Note that when using named clients, the "default" `camelMongoClient` bean will
still be produced. Refer to the Quarkus documentation on
https://quarkus.io/guides/mongodb#multiple-mongodb-clients[Multiple MongoDB
Clients] for more information.
diff --git a/docs/modules/ROOT/pages/reference/extensions/openapi-java.adoc
b/docs/modules/ROOT/pages/reference/extensions/openapi-java.adoc
index 1bce974cd2..c75a468c06 100644
--- a/docs/modules/ROOT/pages/reference/extensions/openapi-java.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/openapi-java.adoc
@@ -78,7 +78,7 @@ Also, it can not use CDI injection in the RouteBuilder
`configure()` since we ge
a|icon:lock[title=Fixed at build time]
[[quarkus.camel.openapi.expose.enabled]]`link:#quarkus.camel.openapi.expose.enabled[quarkus.camel.openapi.expose.enabled]`
When set to true, Camel REST DSL OpenAPI specifications are exposed under the
Quarkus OpenAPI HTTP endpoint
-(/q/openapi). This requires quarkus-smallrye-openapi to be added to your
application.
+(`/q/openapi`). This requires `quarkus-smallrye-openapi` to be added to your
application.
| `boolean`
| `false`
|===
diff --git a/docs/modules/ROOT/pages/reference/extensions/rest-openapi.adoc
b/docs/modules/ROOT/pages/reference/extensions/rest-openapi.adoc
index b765754c52..ef625b3abc 100644
--- a/docs/modules/ROOT/pages/reference/extensions/rest-openapi.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/rest-openapi.adoc
@@ -78,7 +78,8 @@ quarkus.native.resources.includes=openapi.json
[id="extensions-rest-openapi-usage-contract-first-development"]
=== Contract First Development
-The model classes generation has been integrated with the
`quarkus-maven-plugin`. So there's no need to use the
`swagger-codegen-maven-plugin`, instead put your contract files in
`src/main/openapi` with a `.json` suffix. And add the `generate-code` goal to
the `quarkus-maven-plugin` like:
+
+Model class generation has been integrated into the `quarkus-maven-plugin`. So
there's no need to use the `swagger-codegen-maven-plugin`. Instead, put your
contract files in `src/main/openapi` with a `.json` or `.yaml` suffix then
ensure the `generate-code` goal is configured on the `quarkus-maven-plugin`:
[source,xml]
----
@@ -95,15 +96,16 @@ The model classes generation has been integrated with the
`quarkus-maven-plugin`
</plugin>
----
-It requires a specific package name for the model classes by using the
`quarkus.camel.openapi.codegen.model-package` property of the
`application.properties` file. For example:
+You can customize the package name of the generated classes by adding
configuration property `quarkus.camel.openapi.codegen.model-package` to
`application.properties` file.
[source,properties]
----
quarkus.camel.openapi.codegen.model-package=org.acme
----
-This package name should be added in `camel.rest.bindingPackageScan` as well.
-The contract files in `src/main/openapi` needs to be added in the classpath
since they could be used in Camel Rest DSL. So you can add `src/main/openapi`
in `pom.xml`
+In addition, you should also add this package to configuration property
`camel.rest.bindingPackageScan`.
+
+The contract files in `src/main/openapi` need to be added in the classpath,
since they could be used in the Camel Rest DSL. For example, to do this with
Maven:
[source,xml]
----
@@ -119,7 +121,7 @@ The contract files in `src/main/openapi` needs to be added
in the classpath sinc
</build>
----
-When running in the native mode, the contract files must be specified the
`quarkus.native.resources.include` like
+When running in the native mode, the contract files must be added to the
native image via the `quarkus.native.resources.include` configuration property.
[source,properties]
----
@@ -127,7 +129,6 @@ quarkus.native.resources.includes=contract.json
----
-
[id="extensions-rest-openapi-additional-camel-quarkus-configuration"]
== Additional Camel Quarkus configuration
diff --git a/extensions-core/core/runtime/src/main/doc/configuration.adoc
b/extensions-core/core/runtime/src/main/doc/configuration.adoc
index 68827731fd..5cceb95354 100644
--- a/extensions-core/core/runtime/src/main/doc/configuration.adoc
+++ b/extensions-core/core/runtime/src/main/doc/configuration.adoc
@@ -5,9 +5,9 @@ When using the OGNL notation from the simple language, the
`camel-quarkus-bean`
For instance, the simple expression below is accessing the `getAddress()`
method on the message body of type `Client`.
[source,java]
----
+----
simple("${body.address}")
----
+----
In such a situation, one should take an additional dependency on the
camel-quarkus-bean extension xref:{cq-camel-components}::bean-component.adoc[as
described here].
Note that in native mode, some classes may need to be registered for
reflection. In the example above, the `Client` class
@@ -25,9 +25,9 @@ It may be needed to register some classes for reflection
manually.
For instance, the simple expression below is dynamically resolving the type
`java.nio.ByteBuffer` at runtime:
[source,java]
----
+----
simple("${body} is 'java.nio.ByteBuffer'")
----
+----
As such, the class `java.nio.ByteBuffer` needs to be
link:https://quarkus.io/guides/writing-native-applications-tips#registering-for-reflection[registered
for reflection].
diff --git
a/extensions-jvm/console/runtime/src/main/java/org/apache/camel/quarkus/component/console/CamelConsoleConfig.java
b/extensions-jvm/console/runtime/src/main/java/org/apache/camel/quarkus/component/console/CamelConsoleConfig.java
index 89e3234805..81a00ce24f 100644
---
a/extensions-jvm/console/runtime/src/main/java/org/apache/camel/quarkus/component/console/CamelConsoleConfig.java
+++
b/extensions-jvm/console/runtime/src/main/java/org/apache/camel/quarkus/component/console/CamelConsoleConfig.java
@@ -31,15 +31,15 @@ public interface CamelConsoleConfig {
boolean enabled();
/**
- * The context path under which the Camel developer console is deployed
(default /q/camel/dev-console).
+ * The context path under which the Camel developer console is deployed
(default `/q/camel/dev-console`).
*/
@WithDefault("camel/dev-console")
String path();
/**
- * The modes in which the Camel developer console is available. The
default {@code dev-test} enables the developer
+ * The modes in which the Camel developer console is available. The
default `dev-test` enables the developer
* console only in dev mode and test modes.
- * A value of {@code all} enables agent discovery in dev, test and prod
modes. Setting the value to {@code none} will
+ * A value of `all` enables agent discovery in dev, test and prod modes.
Setting the value to `none` will
* not expose the developer console HTTP endpoint.
*/
@WithDefault("DEV_TEST")
diff --git a/extensions/aws2-lambda/runtime/src/main/doc/configuration.adoc
b/extensions/aws2-lambda/runtime/src/main/doc/configuration.adoc
deleted file mode 100644
index d516e7fb16..0000000000
--- a/extensions/aws2-lambda/runtime/src/main/doc/configuration.adoc
+++ /dev/null
@@ -1,4 +0,0 @@
-=== Not possible to leverage quarkus-amazon-lambda by Camel aws2-lambda
extension
-
-Quarkus-amazon-lambda extension allows you to use Quarkus to build your AWS
Lambdas, whereas Camel component manages (deploy, undeploy, …) existing
functions.
-Therefore, it is not possible to use `quarkus-amazon-lambda` as a client for
Camel `aws2-lambda` extension.
\ No newline at end of file
diff --git
a/extensions/aws2-lambda/runtime/src/main/org/apache/camel/quarkus/component/aws2/lambda/it/Aws2LambdaResource.java
b/extensions/aws2-lambda/runtime/src/main/org/apache/camel/quarkus/component/aws2/lambda/it/Aws2LambdaResource.java
deleted file mode 100644
index 4e95c19954..0000000000
---
a/extensions/aws2-lambda/runtime/src/main/org/apache/camel/quarkus/component/aws2/lambda/it/Aws2LambdaResource.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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.
- */
-package org.apache.camel.quarkus.component.aws2.lambda.it;
-
-import jakarta.enterprise.context.ApplicationScoped;
-import jakarta.inject.Inject;
-import jakarta.ws.rs.GET;
-import jakarta.ws.rs.Path;
-import jakarta.ws.rs.Produces;
-import jakarta.ws.rs.core.MediaType;
-import jakarta.ws.rs.core.Response;
-
-import org.apache.camel.CamelContext;
-import org.jboss.logging.Logger;
-
-@Path("/aws2-lambda")
-@ApplicationScoped
-public class Aws2LambdaResource {
-
- private static final Logger LOG =
Logger.getLogger(Aws2LambdaResource.class);
-
- private static final String COMPONENT_AWS2_LAMBDA = "aws2-lambda";
- @Inject
- CamelContext context;
-
- @Path("/load/component/aws2-lambda")
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response loadComponentAws2Lambda() throws Exception {
- /* This is an autogenerated test */
- if (context.getComponent(COMPONENT_AWS2_LAMBDA) != null) {
- return Response.ok().build();
- }
- LOG.warnf("Could not load [%s] from the Camel context",
COMPONENT_AWS2_LAMBDA);
- return Response.status(500, COMPONENT_AWS2_LAMBDA + " could not be
loaded from the Camel context").build();
- }
-}
diff --git
a/extensions/aws2-lambda/runtime/src/main/org/apache/lambda/it/Aws2LambdaIT.java
b/extensions/aws2-lambda/runtime/src/main/org/apache/lambda/it/Aws2LambdaIT.java
deleted file mode 100644
index 43cffe71ff..0000000000
---
a/extensions/aws2-lambda/runtime/src/main/org/apache/lambda/it/Aws2LambdaIT.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.
- */
-package org.apache.camel.quarkus.component.aws2.lambda.it;
-
-import io.quarkus.test.junit.QuarkusIntegrationTest;
-
-@QuarkusIntegrationTest
-class Aws2LambdaIT extends Aws2LambdaTest {
-
-}
diff --git
a/extensions/aws2-lambda/runtime/src/main/org/apache/lambda/it/Aws2LambdaTest.java
b/extensions/aws2-lambda/runtime/src/main/org/apache/lambda/it/Aws2LambdaTest.java
deleted file mode 100644
index 3a53344bd3..0000000000
---
a/extensions/aws2-lambda/runtime/src/main/org/apache/lambda/it/Aws2LambdaTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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.
- */
-package org.apache.camel.quarkus.component.aws2.lambda.it;
-
-import io.quarkus.test.junit.QuarkusTest;
-import io.restassured.RestAssured;
-import org.junit.jupiter.api.Test;
-
-@QuarkusTest
-class Aws2LambdaTest {
-
- @Test
- public void loadComponentAws2Lambda() {
- /* A simple autogenerated test */
- RestAssured.get("/aws2-lambda/load/component/aws2-lambda")
- .then()
- .statusCode(200);
- }
-
-}
diff --git a/extensions/crypto/runtime/src/main/doc/limitations.adoc
b/extensions/crypto/runtime/src/main/doc/limitations.adoc
deleted file mode 100644
index 139597f9cb..0000000000
--- a/extensions/crypto/runtime/src/main/doc/limitations.adoc
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/extensions/crypto/runtime/src/main/doc/usage.adoc
b/extensions/crypto/runtime/src/main/doc/usage.adoc
index 00c6370614..d792f72151 100644
--- a/extensions/crypto/runtime/src/main/doc/usage.adoc
+++ b/extensions/crypto/runtime/src/main/doc/usage.adoc
@@ -1,15 +1,17 @@
=== Security Provider
-Extension requires BouncyCastle provider and also utilizes the quarkus
security extension (see
https://quarkus.io/guides/security-customization#registering-security-providers[security
providers registration doc])
-If there is no `BC*` provider registered (by
`quarkus.security.security-providers` property).
-The `BC` provider is registered.
+This extension requires a BouncyCastle security provider to be
https://quarkus.io/guides/security-customization#registering-security-providers[registered]
and also utilizes the quarkus security extension.
+
+NOTE: If no BouncyCastle provider is registered via the
`quarkus.security.security-providers` configuration property, then a default
`BC` provider is registered automatically.
=== FIPS
-When running the `crypto` extension on FIPS enabled system any FIPS-compliant
Java Security Provider (such as BCFIPS) has to be used.
+When running the `crypto` extension on a FIPS enabled system, a FIPS-compliant
Java Security Provider (such as `BCFIPS`) has to be used.
+
+In the case of `BCFIPS`, add dependencies `bc-fips` and `quarkus-security` to
your application.
-* In the case of BCFIPS, please add BCFIPS dependency and `quarkus-security`
(see the
https://quarkus.io/guides/security-customization#bouncy-castle-fips[guide] for
more information)
-```
+[source,xml]
+----
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bc-fips</artifactId>
@@ -18,12 +20,15 @@ When running the `crypto` extension on FIPS enabled system
any FIPS-compliant Ja
<groupId>io.quarkus</groupId>
<artifactId>quarkus-security</artifactId>
</dependency>
-```
-and register BCFIPS provider with following proprerty:
-```
-quarkus.security.security-providers=BCFIPS
-```
-* Alternatively, you can add different FIPS compliant provider. Make Sure that
the provider is registered.
+----
+Then register the `BCFIPS` security provider by adding the following
configuration to `application.properties`.
+
+[source,properties]
+----
+quarkus.security.security-providers=BCFIPS
+----
+Alternatively, you can add a different FIPS compliant provider and register it
via the `quarkus.security.security-providers` configuration property.
+Refer to the
https://quarkus.io/guides/security-customization#bouncy-castle-fips[Quarkus
Security guide] for more information.
diff --git
a/extensions/file-cluster-service/runtime/src/main/doc/configuration.adoc
b/extensions/file-cluster-service/runtime/src/main/doc/configuration.adoc
index 2c9e4d2f79..c91f928da8 100644
--- a/extensions/file-cluster-service/runtime/src/main/doc/configuration.adoc
+++ b/extensions/file-cluster-service/runtime/src/main/doc/configuration.adoc
@@ -1,4 +1,3 @@
-
=== Having only a single consumer in a cluster consuming from a given endpoint
When the same route is deployed on multiple JVMs, it could be interesting to
use this extension in conjunction with the
xref:reference/extensions/master.adoc[Master one].
@@ -6,15 +5,18 @@ In such a setup, a single consumer will be active at a time
across the whole cam
For instance, having the route below deployed on multiple JVMs:
-```
-from("master:ns:timer:test?period=100").log("Timer invoked on a single JVM at
a time");
-```
+[source,java]
+----
+from("master:ns:timer:test?period=100")
+ .log("Timer invoked on a single JVM at a time");
+----
-It's possible to configure the file cluster service with a property like below:
+It's possible to configure the file cluster service with a property like below
in `application.properties`:
-```
+[source,properties]
+----
quarkus.camel.cluster.file.root =
target/cluster-folder-where-lock-file-will-be-held
-```
+----
As a result, a single consumer will be active across the `ns` camel master
namespace.
It means that, at a given time, only a single timer will generate exchanges
across all JVMs.
diff --git a/extensions/gson/runtime/src/main/doc/configuration.adoc
b/extensions/gson/runtime/src/main/doc/configuration.adoc
index dcb5888b8e..e190b8b43c 100644
--- a/extensions/gson/runtime/src/main/doc/configuration.adoc
+++ b/extensions/gson/runtime/src/main/doc/configuration.adoc
@@ -1,5 +1,20 @@
-=== Marshaling/Unmarshaling objects in native mode
+=== Marshaling / Unmarshalling objects in native mode
-When marshaling/unmarshaling objects in native mode, all the serialized
classes need to be
link:https://quarkus.io/guides/writing-native-applications-tips#registering-for-reflection[registered
for reflection].
-As such, when using `GsonDataFormat.setUnmarshalType(...)`,
`GsonDataFormat.setUnmarshalTypeName(...)` and even
`GsonDataFormat.setUnmarshalGenericType(...)`, the unmarshal type as well as
sub field types should be registered for reflection.
-See a working example in this
link:https://github.com/apache/camel-quarkus/blob/main/integration-tests/dataformats-json/src/main/java/org/apache/camel/quarkus/component/dataformats/json/model/PojoA.java[integration
test].
\ No newline at end of file
+When marshaling / unmarshalling objects in native mode, their target types
must be
link:https://quarkus.io/guides/writing-native-applications-tips#registering-for-reflection[registered
for reflection].
+
+For example when using any of the following:
+
+* `GsonDataFormat.setUnmarshalType(MyPojo.class)`
+* `GsonDataFormat.setUnmarshalTypeName("org.acme.MyPojo")`
+* `GsonDataFormat.setUnmarshalGenericType(MyPojo.class)`
+
+`MyPojo.class` can be registered for reflection as follows.
+
+[source,java]
+----
+package org.acme.MyPojo;
+
+@RegisterForReflection
+public class MyPojo {
+}
+----
diff --git a/extensions/hazelcast/runtime/src/main/doc/configuration.adoc
b/extensions/hazelcast/runtime/src/main/doc/configuration.adoc
index d3b9463b46..29a10e828d 100644
--- a/extensions/hazelcast/runtime/src/main/doc/configuration.adoc
+++ b/extensions/hazelcast/runtime/src/main/doc/configuration.adoc
@@ -1,16 +1,12 @@
This extension leverages
https://github.com/hazelcast/quarkus-hazelcast-client[Hazelcast Client for
Quarkus]. The configuration of the HazelcastInstance is managed by the
extension. To configure Hazelcast Instance, check the
https://github.com/hazelcast/quarkus-hazelcast-client[Hazelcast Client for
Quarkus] guide.
-*Please note that the camel-quarkus-hazelcast component works only with the
client mode.*
+IMPORTANT: `camel-quarkus-hazelcast` works only in client mode.
-To use the Hazelcast instance in the camel-quarkus-hazelcast component, you
should configure the component with :
-
-* The HazelcastInstance initialized by the Hazelcast Client for Quarkus
-* The component mode as : "client"
-
-Example of configuration for HazelcastMap component:
+To use the `HazelcastInstance` bean in the Hazelcast component, you should
configure the component as follows.
[source,java]
----
+ <1>
@Inject
HazelcastInstance hazelcastInstance;
@@ -21,10 +17,12 @@ Example of configuration for HazelcastMap component:
HazelcastDefaultComponent hazelcastMap() {
final HazelcastMapComponent hazelcastComponent = new
HazelcastMapComponent();
hazelcastComponent.setHazelcastInstance(hazelcastInstance);
+ <2>
hazelcastComponent.setHazelcastMode(HazelcastConstants.HAZELCAST_CLIENT_MODE);
return getHazelcastComponent(hazelcastComponent);
}
----
+<1> The `HazelcastInstance` bean instance created by the `quarkus-hazelcast`
extension
+<2> The Hazelcast mode must be set to client mode
-You may want to check the
https://github.com/apache/camel-quarkus/tree/main/integration-tests/hazelcast[integration
test]
-in our source tree as an example.
\ No newline at end of file
+Some more examples can be found in the Camel Quarkus Hazelcast
https://github.com/apache/camel-quarkus/tree/main/integration-tests/hazelcast[integration
tests].
diff --git a/extensions/jms/runtime/src/main/doc/usage.adoc
b/extensions/jms/runtime/src/main/doc/usage.adoc
index 5e4592c15e..16f1e3602c 100644
--- a/extensions/jms/runtime/src/main/doc/usage.adoc
+++ b/extensions/jms/runtime/src/main/doc/usage.adoc
@@ -36,10 +36,11 @@ Currently, it can work with `quarkus-artemis-jms`,
`quarkus-qpid-jms` and `ibmmq
Pooling is enabled by default.
[NOTE]
====
-`clientID` and `durableSubscriptionName` are not supported in pooling
connections. If `setClientID` is called on a `reused` connection from the pool,
an `IllegalStateException` will be thrown. You will get some error messages
such like `Cause: setClientID can only be called directly after the connection
is created`
+`clientID` and `durableSubscriptionName` are not supported in pooled
connections. If `setClientID` is called on a reused connection from the pool,
an `IllegalStateException` will be thrown. You will get error messages like
`Cause: setClientID can only be called directly after the connection is
created`.
====
To enable XA, you need to add `quarkus-narayana-jta` extension:
+
[source,xml]
----
<dependency>
@@ -47,16 +48,19 @@ To enable XA, you need to add `quarkus-narayana-jta`
extension:
<artifactId>quarkus-narayana-jta</artifactId>
</dependency>
----
-and add the following configuration to your `application.properties`:
+
+Also add the following configuration to your `application.properties`:
+
[source,properties]
----
quarkus.pooled-jms.transaction=xa
quarkus.transaction-manager.enable-recovery=true
----
-XA support is only available with `quarkus-artemis-jms` and `ibmmq-client`.
Also We highly recommend to enable transaction recovery.
+XA support is only available with `quarkus-artemis-jms` and `ibmmq-client`. We
highly recommend to enable transaction recovery.
+
+Since there is no quarkus extension for `ibmmq-client`, you need to create a
custom `ConnectionFactory` and wrap it by yourself. Here is an example:
-Since there is no quarkus extension for `ibmmq-client` currently, you need to
create a custom `ConnectionFactory` and wrap it by yourself. Here is an example:
[source,java]
----
@Produces
@@ -81,7 +85,8 @@ public ConnectionFactory
createXAConnectionFactory(PooledJmsWrapper wrapper) {
[NOTE]
====
-If you use `ibmmq-client` to consume messages and enable XA, you need to
configure `TransactionManager` in the camel route like this:
+If you use `ibmmq-client` to consume messages and enable XA, you need to
configure a `TransactionManager` in the camel route like this:
+
[source,java]
----
@Inject
diff --git
a/extensions/jolokia/runtime/src/main/java/org/apache/camel/quarkus/jolokia/config/JolokiaBuildTimeConfig.java
b/extensions/jolokia/runtime/src/main/java/org/apache/camel/quarkus/jolokia/config/JolokiaBuildTimeConfig.java
index 97cd06cd55..c0d0141dcf 100644
---
a/extensions/jolokia/runtime/src/main/java/org/apache/camel/quarkus/jolokia/config/JolokiaBuildTimeConfig.java
+++
b/extensions/jolokia/runtime/src/main/java/org/apache/camel/quarkus/jolokia/config/JolokiaBuildTimeConfig.java
@@ -39,18 +39,18 @@ public interface JolokiaBuildTimeConfig {
String path();
/**
- * Whether to register a Quarkus management endpoint for Jolokia (default
/q/jolokia).
+ * Whether to register a Quarkus management endpoint for Jolokia (default
`/q/jolokia`).
* When enabled this activates a management endpoint which will be
accessible on a path relative to
- *
${quarkus.http.non-application-root-path}/${quarkus.camel.jolokia.server.path}.
+ *
`${quarkus.http.non-application-root-path}/${quarkus.camel.jolokia.server.path}`.
* If the management interface is enabled, the value will be resolved as a
path relative to
- * ${quarkus.management.root-path}/${quarkus.camel.jolokia.server.path}.
Note that for this feature to work you must
- * have quarkus-vertx-http on the application classpath.
+ * `${quarkus.management.root-path}/${quarkus.camel.jolokia.server.path}`.
Note that for this feature to work you must
+ * have `quarkus-vertx-http` on the application classpath.
*/
@WithDefault("true")
boolean registerManagementEndpoint();
/**
- * Comma separated list of allowed MBean domains used by
CamelJolokiaRestrictor.
+ * Comma separated list of allowed MBean domains used by
`CamelJolokiaRestrictor`.
*/
@WithDefault("org.apache.camel,java.lang,java.nio")
Set<String> camelRestrictorAllowedMbeanDomains();
diff --git
a/extensions/jolokia/runtime/src/main/java/org/apache/camel/quarkus/jolokia/config/JolokiaRuntimeConfig.java
b/extensions/jolokia/runtime/src/main/java/org/apache/camel/quarkus/jolokia/config/JolokiaRuntimeConfig.java
index d250d9e89e..fb6da0764d 100644
---
a/extensions/jolokia/runtime/src/main/java/org/apache/camel/quarkus/jolokia/config/JolokiaRuntimeConfig.java
+++
b/extensions/jolokia/runtime/src/main/java/org/apache/camel/quarkus/jolokia/config/JolokiaRuntimeConfig.java
@@ -40,20 +40,20 @@ public interface JolokiaRuntimeConfig {
/**
* Arbitrary Jolokia configuration options. These are described at the
- * <a href="https://jolokia.org/reference/html/manual/agents.html">Jolokia
documentation</a>.
- * Options can be configured like {@code
quarkus.camel.jolokia.additional-properties."debug"=true}.
+ * https://jolokia.org/reference/html/manual/agents.html[Jolokia
documentation].
+ * Options can be configured like
`quarkus.camel.jolokia.additional-properties."debug"=true`.
*/
Map<String, String> additionalProperties();
/**
* When {@code true}, a Jolokia restrictor is registered that limits MBean
read, write and operation execution to the
* following MBean domains.
- * <ul>
- * <li>org.apache.camel</li>
- * <li>java.lang</li>
- * <li>java.nio</li>
- * </ul>
- * Note that this option has no effect if
quarkus.camel.jolokia.additional-properties."restrictorClass" is set.
+ *
+ * * org.apache.camel
+ * * java.lang
+ * * java.nio
+ *
+ * Note that this option has no effect if
`quarkus.camel.jolokia.additional-properties."restrictorClass"` is set.
*/
@WithDefault("true")
boolean registerCamelRestrictor();
@@ -61,8 +61,8 @@ public interface JolokiaRuntimeConfig {
interface Server {
/**
* Whether the Jolokia agent HTTP server should be started
automatically.
- * When set to {@code false}, it is the user responsibility to start
the server.
- * This can be done via {@code @Inject CamelQuarkusJolokiaServer} and
then invoking the start() method.
+ * When set to `false`, it is the user responsibility to start the
server.
+ * This can be done via `@Inject CamelQuarkusJolokiaServer` and then
invoking the `start()` method.
*/
@WithDefault("true")
boolean autoStart();
@@ -81,9 +81,9 @@ public interface JolokiaRuntimeConfig {
int port();
/**
- * The mode in which Jolokia agent discovery is enabled. The default
{@code dev-test}, enables discovery only in dev and
+ * The mode in which Jolokia agent discovery is enabled. The default
`dev-test`, enables discovery only in dev and
* test modes.
- * A value of {@code all} enables agent discovery in dev, test and
prod modes. Setting the value to {@code none} will
+ * A value of `all` enables agent discovery in dev, test and prod
modes. Setting the value to `none` will
* disable agent discovery in all modes.
*/
@WithDefault("DEV_TEST")
diff --git a/extensions/jslt/runtime/src/main/doc/configuration.adoc
b/extensions/jslt/runtime/src/main/doc/configuration.adoc
index a02cca9392..17b1da55a3 100644
--- a/extensions/jslt/runtime/src/main/doc/configuration.adoc
+++ b/extensions/jslt/runtime/src/main/doc/configuration.adoc
@@ -23,6 +23,8 @@ More information about selecting resources for inclusion in
the native executabl
=== Using JSLT functions in native mode
When using JSLT functions from camel-quarkus in native mode, the classes
hosting the functions would need to be
link:https://quarkus.io/guides/writing-native-applications-tips#registering-for-reflection[registered
for reflection]. When registering the target function is not possible, one may
end up writing a stub as below.
+
+[source,java]
----
@RegisterForReflection
public class MathFunctionStub {
@@ -33,6 +35,8 @@ public class MathFunctionStub {
----
The target function `Math.pow(...)` is now accessible through the
`MathFunctionStub` class that could be registered in the component as below:
+
+[source,java]
----
@Named
JsltComponent jsltWithFunction() throws ClassNotFoundException {
diff --git
a/extensions/kamelet/runtime/src/main/java/org/apache/camel/quarkus/component/kamelet/KameletConfiguration.java
b/extensions/kamelet/runtime/src/main/java/org/apache/camel/quarkus/component/kamelet/KameletConfiguration.java
index 49ab55f133..d54f72531f 100644
---
a/extensions/kamelet/runtime/src/main/java/org/apache/camel/quarkus/component/kamelet/KameletConfiguration.java
+++
b/extensions/kamelet/runtime/src/main/java/org/apache/camel/quarkus/component/kamelet/KameletConfiguration.java
@@ -28,11 +28,10 @@ import io.smallrye.config.WithDefault;
public interface KameletConfiguration {
/**
* Optional comma separated list of kamelet identifiers to configure for
native mode support.
- * A kamelet identifier is the Kamelet file name without the .kamelet.yaml
suffix.
- * <p>
- * The default value '*' will result in all discovered Kamelet definition
files being included into the native image.
+ * A kamelet identifier is the Kamelet file name without the
`.kamelet.yaml` suffix.
+ *
+ * The default value `*` will result in all discovered Kamelet definition
files being included into the native image.
* Note that this configuration option is only relevant when producing a
native application.
- * </p>
*/
@WithDefault("*")
List<String> identifiers();
diff --git
a/extensions/kubernetes-cluster-service/runtime/src/main/doc/configuration.adoc
b/extensions/kubernetes-cluster-service/runtime/src/main/doc/configuration.adoc
index 2655415293..407c5e9d39 100644
---
a/extensions/kubernetes-cluster-service/runtime/src/main/doc/configuration.adoc
+++
b/extensions/kubernetes-cluster-service/runtime/src/main/doc/configuration.adoc
@@ -9,9 +9,11 @@ In such a setup, a single consumer will be active at a time
across the whole cam
For instance, having the route below deployed on multiple pods:
-```
-from("master:ns:timer:test?period=100").log("Timer invoked on a single pod at
a time");
-```
+[source,java]
+----
+from("master:ns:timer:test?period=100")
+ .log("Timer invoked on a single pod at a time");
+----
As a result, a single consumer will be active across the `ns` camel master
namespace.
It means that, at a given time, only a single timer will generate exchanges
across the whole cluster.
diff --git a/extensions/langchain4j/runtime/src/main/doc/configuration.adoc
b/extensions/langchain4j/runtime/src/main/doc/configuration.adoc
index 384884433d..d63695cf7e 100644
--- a/extensions/langchain4j/runtime/src/main/doc/configuration.adoc
+++ b/extensions/langchain4j/runtime/src/main/doc/configuration.adoc
@@ -1,19 +1,19 @@
=== Using camel annotations from LangChain4j AI service method parameters
-The `camel-quarkus-langchain4j` extension make it possible to use camel
parameter binding annotations with LangChain4j AI services.
+The `camel-quarkus-langchain4j` extension makes it possible to use camel
parameter binding annotations with LangChain4j AI services.
-Let's see an example below:
+For example:
-```
+[source,java]
+----
@RegisterAiService
@ApplicationScoped
public interface CustomAiService {
-
@UserMessage("An LLM prompt that can use the method parameter
{myHeaderInjectedIntoPrompt}.")
@Handler
String invokeLlm(@Header("myHeaderName") String
myHeaderInjectedIntoPrompt);
}
-```
+----
You can find more details about Camel Parameter Binding annotations in the
xref:manual::parameter-binding-annotations.adoc[manual].
@@ -23,26 +23,27 @@ With the `camel-quarkus-langchain4j` extension, the AI
services are resolvable b
For instance, let's define an AI service below:
-```
+[source,java]
+----
@ApplicationScoped
@RegisterAiService
public interface MyAiService {
-
@UserMessage("My Prompt")
@Handler
String chat(String question);
}
-```
+----
The AI service could then be invoked from a Camel route like this:
-```
+[source,java]
+----
@Override
public void configure() {
from("...")
.bean(MyAiService.class);
}
-```
+----
=== Resolving AI services by bean name
@@ -50,24 +51,25 @@ The AI services are also resolvable by bean name when
called from a `bean` state
For instance, let's define an AI service below:
-```
+[source,java]
+----
@ApplicationScoped
@Named("aiServiceResolvedByName")
@RegisterAiService
public interface AiServiceResolvedByName {
-
@UserMessage("My prompt")
@Handler
String chatByName(String input);
}
-```
+----
The AI service could then be invoked from a Camel route as below:
-```
+[source,java]
+----
@Override
public void configure() {
from("...")
.bean("aiServiceResolvedByName");
}
-```
+----
diff --git a/extensions/language/runtime/src/main/doc/usage.adoc
b/extensions/language/runtime/src/main/doc/usage.adoc
index dbabd81e1f..d8e5c32f8a 100644
--- a/extensions/language/runtime/src/main/doc/usage.adoc
+++ b/extensions/language/runtime/src/main/doc/usage.adoc
@@ -16,7 +16,7 @@ To use any other language, you must add the corresponding
dependency. Consult th
When loading scripts from the classpath in native mode, the path to the script
file must be specified in the `quarkus.native.resources.includes` property of
the `application.properties` file. For example:
-[source]
+[source,properties]
----
quarkus.native.resources.includes=script.txt
----
\ No newline at end of file
diff --git a/extensions/mongodb-gridfs/runtime/src/main/doc/configuration.adoc
b/extensions/mongodb-gridfs/runtime/src/main/doc/configuration.adoc
index 868c7b79a6..dc4f1a1d11 100644
--- a/extensions/mongodb-gridfs/runtime/src/main/doc/configuration.adoc
+++ b/extensions/mongodb-gridfs/runtime/src/main/doc/configuration.adoc
@@ -4,5 +4,8 @@ via the Quarkus MongoDB Client
https://quarkus.io/guides/mongodb#configuration-r
The Camel Quarkus MongoDB extension automatically registers a MongoDB client
bean named `camelMongoClient`. This can be referenced in the mongodb endpoint
URI
`connectionBean` path parameter. For example:
- from("direct:start")
- .to("mongodb-gridfs:camelMongoClient?database=test&operation=listAll")
+[source,java]
+----
+from("direct:start")
+ .to("mongodb-gridfs:camelMongoClient?database=test&operation=listAll");
+----
diff --git a/extensions/mongodb/runtime/src/main/doc/configuration.adoc
b/extensions/mongodb/runtime/src/main/doc/configuration.adoc
index 960f140cfb..d6fb38b186 100644
--- a/extensions/mongodb/runtime/src/main/doc/configuration.adoc
+++ b/extensions/mongodb/runtime/src/main/doc/configuration.adoc
@@ -4,33 +4,36 @@ via the Quarkus MongoDB Client
https://quarkus.io/guides/mongodb#configuration-r
The Camel Quarkus MongoDB extension automatically registers a MongoDB client
bean named `camelMongoClient`. This can be referenced in the mongodb endpoint
URI
`connectionBean` path parameter. For example:
- from("direct:start")
+[source,java]
+----
+from("direct:start")
.to("mongodb:camelMongoClient?database=myDb&collection=myCollection&operation=findAll")
+----
If your application needs to work with multiple MongoDB servers, you can
create a "named" client and reference in your route by injecting a client and
the related configuration as explained in the
https://quarkus.io/guides/mongodb#named-mongo-client-injection[Quarkus MongoDB
extension client injection]. For example:
-....
-//application.properties
+[source,properties]
+----
quarkus.mongodb.mongoClient1.connection-string =
mongodb://root:example@localhost:27017/
-....
-....
-//Routes.java
-
- @ApplicationScoped
- public class Routes extends RouteBuilder {
- @Inject
- @MongoClientName("mongoClient1")
- MongoClient mongoClient1;
-
- @Override
- public void configure() throws Exception {
- from("direct:defaultServer")
-
.to("mongodb:camelMongoClient?database=myDb&collection=myCollection&operation=findAll")
-
- from("direct:otherServer")
-
.to("mongodb:mongoClient1?database=myOtherDb&collection=myOtherCollection&operation=findAll");
- }
+----
+
+[source,java]
+----
+@ApplicationScoped
+public class Routes extends RouteBuilder {
+ @Inject
+ @MongoClientName("mongoClient1")
+ MongoClient mongoClient1;
+
+ @Override
+ public void configure() throws Exception {
+ from("direct:defaultServer")
+
.to("mongodb:camelMongoClient?database=myDb&collection=myCollection&operation=findAll");
+
+ from("direct:otherServer")
+
.to("mongodb:mongoClient1?database=myOtherDb&collection=myOtherCollection&operation=findAll");
}
-....
+}
+----
Note that when using named clients, the "default" `camelMongoClient` bean will
still be produced. Refer to the Quarkus documentation on
https://quarkus.io/guides/mongodb#multiple-mongodb-clients[Multiple MongoDB
Clients] for more information.
diff --git
a/extensions/openapi-java/deployment/src/main/java/org/apache/camel/quarkus/component/openapi/java/deployment/OpenApiJavaBuildTimeConfig.java
b/extensions/openapi-java/deployment/src/main/java/org/apache/camel/quarkus/component/openapi/java/deployment/OpenApiJavaBuildTimeConfig.java
index c8102288a1..7f571958dc 100644
---
a/extensions/openapi-java/deployment/src/main/java/org/apache/camel/quarkus/component/openapi/java/deployment/OpenApiJavaBuildTimeConfig.java
+++
b/extensions/openapi-java/deployment/src/main/java/org/apache/camel/quarkus/component/openapi/java/deployment/OpenApiJavaBuildTimeConfig.java
@@ -34,7 +34,7 @@ interface OpenApiJavaBuildTimeConfig {
interface Exposure {
/**
* When set to true, Camel REST DSL OpenAPI specifications are exposed
under the Quarkus OpenAPI HTTP endpoint
- * (/q/openapi). This requires quarkus-smallrye-openapi to be added to
your application.
+ * (`/q/openapi`). This requires `quarkus-smallrye-openapi` to be
added to your application.
*/
@WithDefault("false")
boolean enabled();
diff --git a/extensions/rest-openapi/runtime/src/main/doc/usage.adoc
b/extensions/rest-openapi/runtime/src/main/doc/usage.adoc
index 63e99a7566..8af4010934 100644
--- a/extensions/rest-openapi/runtime/src/main/doc/usage.adoc
+++ b/extensions/rest-openapi/runtime/src/main/doc/usage.adoc
@@ -27,7 +27,8 @@ quarkus.native.resources.includes=openapi.json
----
=== Contract First Development
-The model classes generation has been integrated with the
`quarkus-maven-plugin`. So there's no need to use the
`swagger-codegen-maven-plugin`, instead put your contract files in
`src/main/openapi` with a `.json` suffix. And add the `generate-code` goal to
the `quarkus-maven-plugin` like:
+
+Model class generation has been integrated into the `quarkus-maven-plugin`. So
there's no need to use the `swagger-codegen-maven-plugin`. Instead, put your
contract files in `src/main/openapi` with a `.json` or `.yaml` suffix then
ensure the `generate-code` goal is configured on the `quarkus-maven-plugin`:
[source,xml]
----
@@ -44,15 +45,16 @@ The model classes generation has been integrated with the
`quarkus-maven-plugin`
</plugin>
----
-It requires a specific package name for the model classes by using the
`quarkus.camel.openapi.codegen.model-package` property of the
`application.properties` file. For example:
+You can customize the package name of the generated classes by adding
configuration property `quarkus.camel.openapi.codegen.model-package` to
`application.properties` file.
[source,properties]
----
quarkus.camel.openapi.codegen.model-package=org.acme
----
-This package name should be added in `camel.rest.bindingPackageScan` as well.
-The contract files in `src/main/openapi` needs to be added in the classpath
since they could be used in Camel Rest DSL. So you can add `src/main/openapi`
in `pom.xml`
+In addition, you should also add this package to configuration property
`camel.rest.bindingPackageScan`.
+
+The contract files in `src/main/openapi` need to be added in the classpath,
since they could be used in the Camel Rest DSL. For example, to do this with
Maven:
[source,xml]
----
@@ -68,10 +70,9 @@ The contract files in `src/main/openapi` needs to be added
in the classpath sinc
</build>
----
-When running in the native mode, the contract files must be specified the
`quarkus.native.resources.include` like
+When running in the native mode, the contract files must be added to the
native image via the `quarkus.native.resources.include` configuration property.
[source,properties]
----
quarkus.native.resources.includes=contract.json
----
-