Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAMEL-20410: more fixes #13239

Merged
merged 11 commits into from
Feb 21, 2024
12 changes: 6 additions & 6 deletions components/camel-jq/src/main/docs/jq-language.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ include::partial$language-options.adoc[]

== Examples

For example, you can use JQ in a xref:manual::predicate.adoc[Predicate] with the xref:eips:choice-eip.adoc[Content Based Router] EIP.
For example, you can use JQ in a xref:manual::predicate.adoc[Predicate] with the xref:eips:choice-eip.adoc[Content-Based Router] EIP.

[source,java]
----
Expand All @@ -45,7 +45,7 @@ To enable camel-jackson POJO type conversion, refer to the Camel Jackson documen

By default, JQ uses the message body as the input source. However, you can also use a header as input by specifying the `headerName` option.

For example to count the number of books from a JSON document that was stored in a header named `books` you can do:
For example, to count the number of books from a JSON document that was stored in a header named `books` you can do:

[source,java]
----
Expand All @@ -61,9 +61,9 @@ NOTE: JQ comes with about a hundred built-in functions, and you can see many exa

The camel-jq adds the following functions:

* `header` - Allow to access the Message header in a JQ expression.
* `property` - Allow to access the Exchange property in a JQ expression.
* `constant` - Allow to use a constant value as-is in a JQ expression.
* `header`: allow accessing the Message header in a JQ expression.
* `property`: allow accessing the Exchange property in a JQ expression.
* `constant`: allow using a constant value as-is in a JQ expression.

For example, to set the property foo with the value from the Message header `MyHeader':

Expand Down Expand Up @@ -97,7 +97,7 @@ from("direct:start")

== Transforming a JSon message

For basic JSon transformation where you have a fixed structure you can represent with a combination of using
For basic JSon transformation where you have a fixed structure, you can represent with a combination of using
Camel simple and JQ language as:

[source]
Expand Down
7 changes: 3 additions & 4 deletions components/camel-jsch/src/main/docs/scp-component.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

*{component-header}*

The Camel-Jsch component supports the
The Camel Jsch component supports the
http://en.wikipedia.org/wiki/Secure_copy[SCP protocol] using the Client
API of the http://www.jcraft.com/jsch/[Jsch] project. Jsch is already
used in camel by the xref:ftp-component.adoc[FTP] component for the *sftp:*
Expand Down Expand Up @@ -60,10 +60,9 @@ include::partial$component-endpoint-options.adoc[]

== Limitations

Currently camel-jsch only supports a
Currently, camel-jsch only supports a
https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/Producer.html[Producer]
(i.e. copy files to another host).

(i.e., copy files to another host).


include::spring-boot:partial$starter.adoc[]
14 changes: 7 additions & 7 deletions components/camel-jslt/src/main/docs/jslt-component.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

*{component-header}*

The Jslt component allows you to process a JSON messages using an
The JSLT component allows you to process JSON messages using an
https://github.com/schibsted/jslt[JSLT] expression. This can be
ideal when doing JSON to JSON transformation or querying data.

Expand All @@ -40,7 +40,7 @@ jslt:specName[?options]

Where *specName* is the classpath-local URI of the specification to
invoke; or the complete URL of the remote specification
(eg: \file://folder/myfile.vm).
(e.g.: `\file://folder/myfile.vm`).


// component-configure options: START
Expand Down Expand Up @@ -68,12 +68,12 @@ Camel can supply exchange information as variables when applying a JSLT expressi
| name | value
| headers | The headers of the In message as a json object
| variables |The variables
| exchange.properties | The *Exchange* properties as a json object. _exchange_ is the name of the variable and _properties_ is the path to the exchange properties. Available if _allowContextMapAll_ option is true.
| exchange.properties | The *Exchange* properties as a json object. `exchange` is the name of the variable and `properties` is the path to the exchange properties. Available if `allowContextMapAll` option is true.
|===

All the values that cannot be converted to json with Jackson are denied and will not be available in the jslt expression.

For example, the header named "type" and the exchange property "instance" can be accessed like
For example, the header named `type` and the exchange property `instance` can be accessed like

[source,json]
--------------------------------------
Expand All @@ -85,15 +85,15 @@ For example, the header named "type" and the exchange property "instance" can be

== Samples

For example you could use something like
For example, you could use something like:

[source,java]
--------------------------------------
from("activemq:My.Queue").
to("jslt:com/acme/MyResponse.json");
--------------------------------------

And a file based resource:
And a file-based resource:

[source,java]
---------------------------------------------------------------
Expand All @@ -103,7 +103,7 @@ from("activemq:My.Queue").
---------------------------------------------------------------

You can also specify which JSLT expression the component should use
dynamically via a header, so for example:
dynamically via a header, so, for example:

[source,java]
---------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@

*{component-header}*

The JsonPatch component allows you to process a JSON messages using an
https://github.com/schibsted/jslt[JSLT] expression. This can be
ideal when doing JSON to JSON transformation or querying data.
The JsonPatch component allows you to process JSON messages using an
https://github.com/java-json-tools/json-patch[JSON Patch] (https://datatracker.ietf.org/doc/html/rfc6902[RFC 6902]).

Maven users will need to add the following dependency to
their `pom.xml` for this component:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*{component-header}*

The JSON Schema Validator component performs bean validation of the message body
against JSON Schemas v4, v6, v7, v2019-09 draft and and v2020-12(partial) using the NetworkNT JSON Schema library
against JSON Schemas v4, v6, v7, v2019-09 draft and v2020-12(partial) using the NetworkNT JSON Schema library
(https://github.com/networknt/json-schema-validator).

Maven users will need to add the following dependency to their `pom.xml`
Expand Down Expand Up @@ -59,7 +59,7 @@ include::partial$component-endpoint-options.adoc[]

== Example

Assuming we have the following JSON Schema
Assuming we have the following JSON Schema:

*myschema.json*

Expand Down Expand Up @@ -101,7 +101,7 @@ Assuming we have the following JSON Schema
}
----

we can validate incoming JSON with the following Camel route, where `myschema.json` is loaded from the classpath.
We can validate incoming JSON with the following Camel route, where `myschema.json` is loaded from the classpath.

[source,java]
----
Expand All @@ -112,7 +112,7 @@ from("direct:start")

If you use the default schema loader, it will try to determine the schema version from the $schema property and instruct the https://github.com/networknt[validator] appropriately. If it can't find (or doesn't recognize) the $schema property, it will assume your schema is version https://json-schema.org/specification-links.html#draft-2019-09-formerly-known-as-draft-8[2019-09].

If your schema is local to your application (e.g. a classpath location as opposed to URL), your schema can also contain $ref links to a relative subschema in the classpath. Per the JSON schema spec, your schema must not have an $id identifier property for this to work properly. See the https://github.com/apache/camel/blob/main/components/camel-json-validator/src/test/java/org/apache/camel/component/jsonvalidator/LocalRefSchemaTest.java[unit test] and https://github.com/apache/camel/blob/main/components/camel-json-validator/src/test/resources/org/apache/camel/component/jsonvalidator/Order.json[schema] for an example.
If your schema is local to your application (e.g. a classpath location as opposed to URL), your schema can also contain `$ref` links to a relative subschema in the classpath. Per the JSON schema spec, your schema must not have an $id identifier property for this to work properly. See the https://github.com/apache/camel/blob/main/components/camel-json-validator/src/test/java/org/apache/camel/component/jsonvalidator/LocalRefSchemaTest.java[unit test] and https://github.com/apache/camel/blob/main/components/camel-json-validator/src/test/resources/org/apache/camel/component/jsonvalidator/Order.json[schema] for an example.


include::spring-boot:partial$starter.adoc[]
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ include::partial$dataformat-options.adoc[]

== Dependencies

To use JsonAPI in your camel routes you need to add the dependency
To use JsonAPI in your Camel routes, you need to add the dependency
on *camel-jsonapi* which implements this data format.

If you use maven you could just add the following to your pom.xml,
substituting the version number for the latest & greatest release (see
the download page for the latest versions).
If you use Maven, you could add the following to your `pom.xml`,
substituting the version number for the latest & greatest release.

[source,xml]
----
Expand Down
6 changes: 3 additions & 3 deletions components/camel-jsonata/src/main/docs/jsonata-component.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jsonata:specName[?options]

Where *specName* is the classpath-local URI of the specification to
invoke; or the complete URL of the remote specification
(eg: \file://folder/myfile.vm).
(e.g.: `\file://folder/myfile.vm`).


// component-configure options: START
Expand All @@ -58,15 +58,15 @@ include::partial$component-endpoint-options.adoc[]

== Samples

For example you could use something like
For example, you could use something like:

[source,java]
--------------------------------------
from("activemq:My.Queue").
to("jsonata:com/acme/MyResponse.json");
--------------------------------------

And a file based resource:
And a file-based resource:

[source,java]
---------------------------------------------------------------
Expand Down
13 changes: 6 additions & 7 deletions components/camel-jsonb/src/main/docs/jsonb-dataformat.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

*Since Camel {since}*

JSON-B is a Data Format which uses the standard (javax) JSON-B library.
JSON-B is a Data Format that uses the standard (javax) JSON-B library.

[source,java]
-------------------------------
Expand All @@ -31,12 +31,11 @@ include::partial$dataformat-options.adoc[]

== Dependencies

To use JSON-B in your camel routes you need to add the dependency
on *camel-jsonb* which implements this data format.
To use JSON-B in your Camel routes, you need to add the dependency
on *camel-jsonb* that implements this data format.

If you use maven you could just add the following to your pom.xml,
substituting the version number for the latest & greatest release (see
the download page for the latest versions).
If you use Maven, you could add the following to your pom.xml,
substituting the version number for the latest & greatest release.

[source,xml]
----------------------------------------------------------
Expand All @@ -50,7 +49,7 @@ the download page for the latest versions).

You have to add a dependency on the *implementation* of a jsonb specification.

If you want to add the Johnzon implementation and you are using maven, just add following to your pom.xml
If you want to add the Johnzon implementation, and you are using maven, add following to your `pom.xml`:

[source,xml]
----------------------------------------------------------
Expand Down