You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2022/06/27 17:55:31 UTC

[camel] branch main updated: Doc fixes for languages and dataformats (#7897)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 5e8edcfc797 Doc fixes for languages and dataformats (#7897)
5e8edcfc797 is described below

commit 5e8edcfc79738464a1943de94ea3ad4093bb3eb8
Author: Martin Muzikar <46...@users.noreply.github.com>
AuthorDate: Mon Jun 27 19:55:25 2022 +0200

    Doc fixes for languages and dataformats (#7897)
    
    * Fix formatting for file-language
    
    * UNIXify paths in File lang docs
    
    * Unify JSONPath capitalization in JSONPath lang doc
    
    * Fix typos in bindy doc
    
    * Fix outdated link and table sizing
    
    * Unify jackson-xml docs
    
    * Fix formatting in docs
---
 .../src/main/docs/bindy-dataformat.adoc            |  6 ++---
 .../camel-hl7/src/main/docs/hl7-dataformat.adoc    |  6 ++---
 .../src/main/docs/jacksonXml-dataformat.adoc       | 16 +++++------
 .../src/main/docs/jsonpath-language.adoc           |  8 +++---
 .../camel-soap/src/main/docs/soap-dataformat.adoc  | 12 ++++-----
 .../src/main/docs/zipFile-dataformat.adoc          |  2 +-
 .../modules/languages/pages/file-language.adoc     | 31 +++++++++++-----------
 7 files changed, 40 insertions(+), 41 deletions(-)

diff --git a/components/camel-bindy/src/main/docs/bindy-dataformat.adoc b/components/camel-bindy/src/main/docs/bindy-dataformat.adoc
index 00bb86e0f93..ab5edec275d 100644
--- a/components/camel-bindy/src/main/docs/bindy-dataformat.adoc
+++ b/components/camel-bindy/src/main/docs/bindy-dataformat.adoc
@@ -1234,7 +1234,7 @@ and how to use the annotation:
 
 [source,java]
 ----
-@Message(keyValuePairSeparator = "=", pairSeparator = "\u0001", type="FIX", version="4.1")
+@Message(keyValuePairSeparator = "=", pairSeparator = "\\u0001", type="FIX", version="4.1")
 public class Order {
 
 }
@@ -1296,7 +1296,7 @@ This parameter represents the key of the field in the message:
 
 [source,java]
 ----
-@Message(keyValuePairSeparator = "=", pairSeparator = "\u0001", type="FIX", version="4.1")
+@Message(keyValuePairSeparator = "=", pairSeparator = "\\u0001", type="FIX", version="4.1")
 public class Order {
 
     @Link Header header;
@@ -1677,7 +1677,7 @@ FormattingOptions:
 * String
 
 The DefaultFormatFactory can be overridden by providing an instance of
-FactoryRegistry in the registry in use (e.g. spring or JNDI).
+FactoryRegistry in the registry in use (e.g. Spring or JNDI).
 
 == Using the Java DSL
 
diff --git a/components/camel-hl7/src/main/docs/hl7-dataformat.adoc b/components/camel-hl7/src/main/docs/hl7-dataformat.adoc
index 3baa9596262..0d0f81656fa 100644
--- a/components/camel-hl7/src/main/docs/hl7-dataformat.adoc
+++ b/components/camel-hl7/src/main/docs/hl7-dataformat.adoc
@@ -12,7 +12,7 @@
 
 The HL7 component is used for working with the HL7 MLLP protocol and
 http://www.hl7.org/implement/standards/product_brief.cfm?product_id=185[HL7
-v2 messages] using the http://hl7api.sourceforge.net[HAPI library].
+v2 messages] using the https://hapifhir.github.io/hapi-hl7v2/[HAPI library].
 
 This component supports the following:
 
@@ -295,7 +295,7 @@ object:
 The unmarshal operation adds these fields from the MSH segment as
 headers on the Camel message:
 
-[width="100%",cols="10%,10%,80%",options="header",]
+[width="100%",cols="40%,20%,40%",options="header",]
 |===
 |Key |MSH field |Example
 
@@ -321,7 +321,7 @@ headers on the Camel message:
 
 |`CamelHL7VersionId` |`MSH-12` |`2.4`
 
-|`CamelHL7Context` |`` |`contains the
+|`CamelHL7Context` | |`contains the
 https://hapifhir.github.io/hapi-hl7v2/base/apidocs/ca/uhn/hl7v2/HapiContext.html[HapiContext]
 that was used to parse the message`
 
diff --git a/components/camel-jacksonxml/src/main/docs/jacksonXml-dataformat.adoc b/components/camel-jacksonxml/src/main/docs/jacksonXml-dataformat.adoc
index 4be9b42e628..f44f8ca5d8a 100644
--- a/components/camel-jacksonxml/src/main/docs/jacksonXml-dataformat.adoc
+++ b/components/camel-jacksonxml/src/main/docs/jacksonXml-dataformat.adoc
@@ -93,7 +93,7 @@ Note that the weight field is missing in the resulting XML:
 <pojo age="30" weight="70"/>
 ----------------------------
 
-== Include/Exclude fields using the `jsonView` attribute with `JacksonXML`DataFormat
+== Include/Exclude fields using the `jsonView` attribute with ``JacksonXML``DataFormat
 
 As an example of using this attribute you can instead of:
 
@@ -128,9 +128,9 @@ And the same in XML DSL:
 
 == Setting serialization include option
 
-If you want to marshal a pojo to XML, and the pojo has some fields with
+If you want to marshal a POJO to XML, and the POJO has some fields with
 null values. And you want to skip these null values, then you need to
-set either an annotation on the pojo, 
+set either an annotation on the POJO, 
 
 [source,java]
 ------------------------------
@@ -140,7 +140,7 @@ public class MyPojo {
 }
 ------------------------------
 
-But this requires you to include that annotation in your pojo source
+But this requires you to include that annotation in your POJO source
 code. You can also configure the Camel JacksonXMLDataFormat to set the
 include option, as shown below:
 
@@ -186,9 +186,9 @@ Or from XML DSL you configure this as
 </dataFormats>
 -------------------------------------------------------
 
-== Unmarshalling from XML to List<Map> or List<pojo>
+== Unmarshalling from XML to List<Map> or List<POJO>
 
-If you are using Jackson to unmarshal XML to a list of map/pojo, you can
+If you are using Jackson to unmarshal XML to a list of map/POJO, you can
 now specify this by setting `useList="true"` or use
 the `org.apache.camel.component.jacksonxml.ListJacksonXMLDataFormat`.
 For example with Java you can do as shown below:
@@ -199,7 +199,7 @@ JacksonXMLDataFormat format = new ListJacksonXMLDataFormat();
 // or
 JacksonXMLDataFormat format = new JacksonXMLDataFormat();
 format.useList();
-// and you can specify the pojo class type also
+// and you can specify the POJO class type also
 format.setUnmarshalType(MyPojo.class);
 -------------------------------------------------------------
 
@@ -213,7 +213,7 @@ using `useList` attribute as shown below:
 </dataFormats>
 --------------------------------------------
 
-And you can specify the pojo type also
+And you can specify the POJO type also
 
 [source,xml]
 -------------------------------------------------------------------------------
diff --git a/components/camel-jsonpath/src/main/docs/jsonpath-language.adoc b/components/camel-jsonpath/src/main/docs/jsonpath-language.adoc
index f4d59240a6e..9243f364659 100644
--- a/components/camel-jsonpath/src/main/docs/jsonpath-language.adoc
+++ b/components/camel-jsonpath/src/main/docs/jsonpath-language.adoc
@@ -108,7 +108,7 @@ See the https://github.com/json-path/JsonPath[JSONPath] project page for more sy
 
 == Supported message body types
 
-Camel JSonPath supports message body using the following types:
+Camel JSONPath supports message body using the following types:
 
 [width="100%",cols="3m,7",options="header"]
 |===
@@ -119,12 +119,12 @@ Camel JSonPath supports message body using the following types:
 | List | Message bodies as `java.util.List` types
 | POJO | *Optional* If Jackson is on the classpath, then camel-jsonpath
   is able to use Jackson to read the message body as POJO and convert to `java.util.Map`
-  which is supported by JSonPath. For example, you can add `camel-jackson` as dependency to include Jackson.
+  which is supported by JSONPath. For example, you can add `camel-jackson` as dependency to include Jackson.
 | InputStream | If none of the above types matches, then Camel will attempt to read the message body as a `java.io.InputStream`.
 |===
 
 If a message body is of unsupported type then an exception is thrown by default, however you
-can configure JSonPath to suppress exceptions (see below)
+can configure JSONPath to suppress exceptions (see below)
 
 
 == Suppressing exceptions
@@ -221,7 +221,7 @@ And in XML DSL:
 <jsonpath allowSimple="false">$.store.book[?(@.price &lt; 10)]</jsonpath>
 ----
 
-== JSonPath injection
+== JSONPath injection
 
 You can use xref:manual::bean-integration.adoc[Bean Integration] to invoke a
 method on a bean and use various languages such as JSONPath (via the `@JsonPath` annotation)
diff --git a/components/camel-soap/src/main/docs/soap-dataformat.adoc b/components/camel-soap/src/main/docs/soap-dataformat.adoc
index 0c4c6485b68..ea8c1e29f4f 100644
--- a/components/camel-soap/src/main/docs/soap-dataformat.adoc
+++ b/components/camel-soap/src/main/docs/soap-dataformat.adoc
@@ -131,11 +131,11 @@ Multi-part SOAP messages are supported by the ServiceInterfaceStrategy.
 The ServiceInterfaceStrategy must be initialized with a service
 interface definition that is annotated in accordance with JAX-WS 2.2 and
 meets the requirements of the Document Bare style. The target method
-must meet the following criteria, as per the JAX-WS specification: 1) it
-must have at most one `in` or `in/out` non-header parameter, 2) if it
-has a return type other than `void` it must have no `in/out` or `out`
-non-header parameters, 3) if it it has a return type of `void` it must
-have at most one `in/out` or `out` non-header parameter.
+must meet the following criteria, as per the JAX-WS specification: 
+1. it must have at most one `in` or `in/out` non-header parameter, 
+2. if it has a return type other than `void` it must have no `in/out` or `out`
+non-header parameters,
+3. if it it has a return type of `void` it must have at most one `in/out` or `out` non-header parameter.
 
 The ServiceInterfaceStrategy should be initialized with a boolean
 parameter that indicates whether the mapping strategy applies to the
@@ -153,7 +153,7 @@ JAX-WS specifies the use of a type-parameterized `javax.xml.ws.Holder`
 object for `In/Out` and `Out` parameters. You may use an instance of the
 parameterized-type directly. The camel-soap DataFormat marshals Holder
 values in accordance with the JAXB mapping for the class of the
-`Holder`'s value. No mapping is provided for `Holder` objects in an
+``Holder``'s value. No mapping is provided for `Holder` objects in an
 unmarshalled response.
 
 == Examples
diff --git a/components/camel-zipfile/src/main/docs/zipFile-dataformat.adoc b/components/camel-zipfile/src/main/docs/zipFile-dataformat.adoc
index 534328ed274..e47c1760de0 100644
--- a/components/camel-zipfile/src/main/docs/zipFile-dataformat.adoc
+++ b/components/camel-zipfile/src/main/docs/zipFile-dataformat.adoc
@@ -14,7 +14,7 @@ The Zip File Data Format is a message compression
 and de-compression format. Messages can be marshalled (compressed) to
 Zip files containing a single entry, and Zip files containing a single
 entry can be unmarshalled (decompressed) to the original file contents.
-This data format supports ZIP64, as long as Java 7 or later is being used].
+This data format supports ZIP64, as long as Java 7 or later is being used.
 
 == ZipFile Options
 
diff --git a/core/camel-core-languages/src/main/docs/modules/languages/pages/file-language.adoc b/core/camel-core-languages/src/main/docs/modules/languages/pages/file-language.adoc
index aed2a8869c8..39b9bea8fc1 100644
--- a/core/camel-core-languages/src/main/docs/modules/languages/pages/file-language.adoc
+++ b/core/camel-core-languages/src/main/docs/modules/languages/pages/file-language.adoc
@@ -15,7 +15,6 @@ The File Expression Language is an extension to the
 xref:simple-language.adoc[Simple] language, adding file related capabilities.
 These capabilities are related to common use cases working with file
 path and names. The goal is to allow expressions to be used with the
-
 xref:components::file-component.adoc[File] and xref:components::ftp-component.adoc[FTP]
 components for setting dynamic file patterns for both consumer and producer.
 
@@ -42,7 +41,7 @@ All the file tokens use the same expression name as the method on the
 supported by the current Exchange. For instance the xref:components::ftp-component.adoc[FTP]
 component supports some options, whereas the File component supports all of them.
 
-[width="100%",cols="10%,10%,10%,10%,10%,25%,25%",options="header",]
+[width="100%",cols="25%,10%,10%,10%,10%,10%,25%",options="header",]
 |===
 |Expression |Type |File Consumer |File Producer |FTP Consumer |FTP Producer |Description
 
@@ -100,19 +99,19 @@ language can also be used.
 === Relative paths
 
 We have a `java.io.File` handle for the file `hello.txt` in the
-following *relative* directory: `.\filelanguage\test`. And we configure
-our endpoint to use this starting directory `.\filelanguage`. The file
+following *relative* directory: `./filelanguage/test`. And we configure
+our endpoint to use this starting directory `./filelanguage`. The file
 tokens will return as:
 
 [width="100%",cols="50%,50%",options="header",]
 |===
 |Expression |Returns
 
-|file:name |test\hello.txt
+|file:name |test/hello.txt
 
 |file:name.ext |txt
 
-|file:name.noext |test\hello
+|file:name.noext |test/hello
 
 |file:onlyname |hello.txt
 
@@ -120,33 +119,33 @@ tokens will return as:
 
 |file:ext |txt
 
-|file:parent |filelanguage\test
+|file:parent |filelanguage/test
 
-|file:path |filelanguage\test\hello.txt
+|file:path |filelanguage/test/hello.txt
 
 |file:absolute |false
 
-|file:absolute.path |\workspace\camel\camel-core\target\filelanguage\test\hello.txt
+|file:absolute.path |/workspace/camel/camel-core/target/filelanguage/test/hello.txt
 |===
 
 === Absolute paths
 
 We have a `java.io.File` handle for the file `hello.txt` in the
 following *absolute* directory:
-`\workspace\camel\camel-core\target\filelanguage\test`. And we configure
+`/workspace/camel/camel-core/target/filelanguage/test`. And we configure
 out endpoint to use the absolute starting directory
-`\workspace\camel\camel-core\target\filelanguage`. The file tokens will
+`/workspace/camel/camel-core/target/filelanguage`. The file tokens will
 return as:
 
 [width="100%",cols="50%,50%",options="header",]
 |===
 |Expression |Returns
 
-|file:name |test\hello.txt 
+|file:name |test/hello.txt 
 
 |file:name.ext |txt
 
-|file:name.noext |test\hello
+|file:name.noext |test/hello
 
 |file:onlyname |hello.txt
 
@@ -154,13 +153,13 @@ return as:
 
 |file:ext |txt
 
-|file:parent |\workspace\camel\camel-core\target\filelanguage\test
+|file:parent |/workspace/camel/camel-core/target/filelanguage/test
 
-|file:path |\workspace\camel\camel-core\target\filelanguage\test\hello.txt
+|file:path |/workspace/camel/camel-core/target/filelanguage/test/hello.txt
 
 |file:absolute |true
 
-|file:absolute.path |\workspace\camel\camel-core\target\filelanguage\test\hello.txt
+|file:absolute.path |/workspace/camel/camel-core/target/filelanguage/test/hello.txt
 |===
 
 == Samples