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/01/17 18:50:20 UTC

[camel] branch main updated: Small documentation improvements (part 2) (#6767)

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 e0da78e  Small documentation improvements (part 2) (#6767)
e0da78e is described below

commit e0da78e4707baba8ed8e8bbd88eb07c524c140d8
Author: Nicolas Filotto <es...@users.noreply.github.com>
AuthorDate: Mon Jan 17 19:49:08 2022 +0100

    Small documentation improvements (part 2) (#6767)
---
 .../src/main/docs/camel-report-maven-plugin.adoc             |  2 +-
 docs/user-manual/modules/ROOT/pages/advice-with.adoc         | 10 +++++-----
 .../modules/ROOT/pages/camel-component-maven-plugin.adoc     |  6 +++---
 docs/user-manual/modules/ROOT/pages/clustering.adoc          |  4 ++--
 .../user-manual/modules/ROOT/pages/endpoint-annotations.adoc |  2 +-
 docs/user-manual/modules/ROOT/pages/notify-builder.adoc      | 12 +++++-------
 docs/user-manual/modules/ROOT/pages/rest-dsl.adoc            |  6 +++---
 .../apache/camel/maven/packaging/GenerateConfigurerMojo.java |  2 +-
 .../camel/maven/packaging/GenerateTestConfigurerMojo.java    |  2 +-
 9 files changed, 22 insertions(+), 24 deletions(-)

diff --git a/catalog/camel-report-maven-plugin/src/main/docs/camel-report-maven-plugin.adoc b/catalog/camel-report-maven-plugin/src/main/docs/camel-report-maven-plugin.adoc
index 8167e8f..7b456b9 100644
--- a/catalog/camel-report-maven-plugin/src/main/docs/camel-report-maven-plugin.adoc
+++ b/catalog/camel-report-maven-plugin/src/main/docs/camel-report-maven-plugin.adoc
@@ -168,7 +168,7 @@ You can pass in the options using `-D` style as shown:
 
 ----
 $cd myproject
-$mvn org.apache.camel:camel-report-maven-plugin:3.0.0:validate -DincludeTest=true
+$mvn org.apache.camel:camel-report-maven-plugin:3.0.0:validate -Dcamel.includeTest=true
 ----
 
 
diff --git a/docs/user-manual/modules/ROOT/pages/advice-with.adoc b/docs/user-manual/modules/ROOT/pages/advice-with.adoc
index da9582b..588bb89 100644
--- a/docs/user-manual/modules/ROOT/pages/advice-with.adoc
+++ b/docs/user-manual/modules/ROOT/pages/advice-with.adoc
@@ -139,9 +139,9 @@ After that we start Camel.
 
 === Logging before and after advicing routes
 
-When using `adviceWith` then Camel will automatic log, the before and after, of each adviced route, in XML format.
+When using `adviceWith` then Camel will automatically log, the before and after, of each adviced route, in XML format.
 
-However this requires to have `camel-xml-jaxb` as dependency, which you can add as test scoped if using Maven:
+However, this requires to have `camel-xml-jaxb` as dependency, which you can add as test scoped if using Maven:
 
 [source,xml]
 ----
@@ -379,14 +379,14 @@ weaveByToUri("direct:branch*").replace().to("mock:cheese");
 Notice the `weaveByToUri` method is using a wildcard (`*`) to match the two branches.
 
 TIP: You can also use `mockEndpoints` to auto mock instead of `weaveByToUri` in the example above.
-The `weave` methods has a lot more power to manipulate the route, such as message transformation, routing the message or much more.
+The `weave` methods have a lot more power to manipulate the route, such as message transformation, routing the message or much more.
 
 === weaveAddFirst and weaveAddLast
 
 The `weaveAddFirst` and `weaveAddLast` is a shorthand to easily add nodes to the route.
-These methods can only add to an existing routes. If you want to manipulate the route, then use the other `weave` methods as already covered.
+These methods can only add to an existing route. If you want to manipulate the route, then use the other `weave` methods as already covered.
 
-The `weaveAddFirst` methods adds in the beginning of the route, and `weaveAddLast` at the end.
+The `weaveAddFirst` method adds in the beginning of the route, and `weaveAddLast` at the end.
 Using them works the same as the other `weaveBy` methods, so see above for examples.
 
 === weave using node selection
diff --git a/docs/user-manual/modules/ROOT/pages/camel-component-maven-plugin.adoc b/docs/user-manual/modules/ROOT/pages/camel-component-maven-plugin.adoc
index c67ea85..777181d 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-component-maven-plugin.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-component-maven-plugin.adoc
@@ -6,16 +6,16 @@ Maven Plugin] allows third party component developers to generate all the necess
 
 == Goals Supported
 
-The following goals is supported:
+The following goal is supported:
 
 === generate
 
 This goal will generate the following metadata files and Java files:
 
 * Jandex index: it will generate a Jandex index for used Java annotations within the project which allows to more efficiency to search and load the annotations to generate other metadata as mentioned below.
-* Type Converter Loader: it will xref:type-converter.adoc[generate a loader for type converter] annotated with `@Converter(loader = true)` to allow faster way for Camel to load these converter.
+* Type Converter Loader: it will generate a loader for xref:type-converter.adoc[type converter] annotated with `@Converter(loader = true)` to allow faster way for Camel to load these converters.
 * SPIs: it will generate all Service Provider Interfaces (SPI) for the component. This allows Camel to auto-discover your component without adding it manually to the Camel context.
-* Configurers: it will generate all configurer Java classes from `@Configuer` annotated classes.
+* Configurers: it will generate all configurer Java classes from `@Configurer` annotated classes.
 * Endpoint Schema: it will generate the property configurers as well as schema JSONs extracted from the component's Endpoint and Component classes. This allows Camel to avoid reflections while configuring the properties, thus allows for better efficiency.
 * Prepare Component: it analyzes if the maven module contains Camel modules such as `components`, `dataformats`, `languages` and others. And for each of those generates extra descriptors and schema files for easier auto-discovery in Camel and tooling. 
 * Validate Component: it validates the Camel component if the meta-files for `components`, `dataformats`, `languages` and others, all contains the needed meta-data such as assigned labels, documentation for each option.
diff --git a/docs/user-manual/modules/ROOT/pages/clustering.adoc b/docs/user-manual/modules/ROOT/pages/clustering.adoc
index a0b3de9..abcecbb 100644
--- a/docs/user-manual/modules/ROOT/pages/clustering.adoc
+++ b/docs/user-manual/modules/ROOT/pages/clustering.adoc
@@ -126,7 +126,7 @@ context.addRoutes(new RouteBuilder {
 
 - *ClusteredRouteController*
 +
-This is an implementation of the _RouteController SPI_ that lets the camel context start then starts/stops the routes when the leadership is taken/lost. This is well integrated with spring-boot apps so assuming you have tour routes set-up like:
+This is an implementation of the _RouteController SPI_ that lets the camel context start then starts/stops the routes when the leadership is taken/lost. This is well integrated with spring-boot apps so assuming you have your routes set-up like:
 +
 [source,java]
 ----
@@ -162,7 +162,7 @@ camel.clustered.controller.routes[heartbeat].clustered = false
 
 - *Master Component*
 +
-The master component is similar to a _ClusteredRoutePolicy_ but it works on consumer level so it ensure the only a single endpoint in a cluster is consuming resources at any point in time. Set it up is very easy and all you need is to prefix singleton endpoints according to the master component syntax:
+The master component is similar to a _ClusteredRoutePolicy_ but it works on consumer level so it ensures the only a single endpoint in a cluster is consuming resources at any point in time. Set it up is very easy and all you need is to prefix singleton endpoints according to the master component syntax:
 +
 [source,text]
 ----
diff --git a/docs/user-manual/modules/ROOT/pages/endpoint-annotations.adoc b/docs/user-manual/modules/ROOT/pages/endpoint-annotations.adoc
index 4cbf6c6..c46b4fe 100644
--- a/docs/user-manual/modules/ROOT/pages/endpoint-annotations.adoc
+++ b/docs/user-manual/modules/ROOT/pages/endpoint-annotations.adoc
@@ -36,7 +36,7 @@ annotated with one or more `@UriParam` or `@UriParams` annotations
 For example see the `TimerEndpoint` from the `camel-timer` component and
 notice how it is using these annotations.
 
-Not only are the annotations useful for automatically generating the
+The annotations are not only useful for automatically generating the
 documentation; we can use them to refine the validation of the code
 during configuration and can be useful for tooling providers, so they
 can more easily introspect the configuration options.
diff --git a/docs/user-manual/modules/ROOT/pages/notify-builder.adoc b/docs/user-manual/modules/ROOT/pages/notify-builder.adoc
index f4ac6bd..2ad7942 100644
--- a/docs/user-manual/modules/ROOT/pages/notify-builder.adoc
+++ b/docs/user-manual/modules/ROOT/pages/notify-builder.adoc
@@ -137,7 +137,7 @@ NotifyBuilder notify = new NotifyBuilder(context)
 .create();
 ----
 
-Here, we just say that at least three message should be done received from any of myCoolRoutes (notice the wildcard matching).
+Here both 5 foo messages and 7 bar messages must be done. Notice the use of the and operator.
 
 [source,java]
 ----
@@ -147,7 +147,7 @@ NotifyBuilder notify = new NotifyBuilder(context)
     .create();
 ----
 
-Here both 5 foo messages and 7 bar messages must be done. Notice the use of the and operator.
+Here we expect to receive two messages whose body is Hello World then Bye World.
 
 [source,java]
 ----
@@ -156,7 +156,7 @@ NotifyBuilder notify = new NotifyBuilder(context)
     .create();
 ----
 
-Here we expect to receive two messages with Hello World and Bye World.
+Here we expect to receive a message which contains Camel in the body.
 
 [source,java]
 ----
@@ -167,12 +167,10 @@ NotifyBuilder notify = new NotifyBuilder(context)
 
 === Using mock endpoint for fine-grained expectations
 
-Here we want to match when we have received a message which contains Camel in the body.
-
 [source,java]
 ----
-// lets use a mock to set the expressions as it got many great assertions for that
-// notice we use mock:assert which does NOT exist in the route, its just a pseudo name
+// let's use a mock to set the expressions as it got many great assertions for that
+// notice we use mock:assert which does NOT exist in the route, it's just a pseudo name
 MockEndpoint mock = getMockEndpoint("mock:assert");
 mock.expectedBodiesReceivedInAnyOrder("Hello World", "Bye World", "Hi World");
 
diff --git a/docs/user-manual/modules/ROOT/pages/rest-dsl.adoc b/docs/user-manual/modules/ROOT/pages/rest-dsl.adoc
index 0934f52..28d2838 100644
--- a/docs/user-manual/modules/ROOT/pages/rest-dsl.adoc
+++ b/docs/user-manual/modules/ROOT/pages/rest-dsl.adoc
@@ -740,9 +740,9 @@ restConfiguration().component("jetty").host("localhost")
 The Rest DSL supports OpenAPI and Swagger by
 the `camel-openapi-java` and `camel-swagger-java` modules.
 
-You can define each parameter fine grained
+You can define each parameter fine-grained
 with details such as name, description, data type, parameter type and so
-on, using the <param>. For example to define the id path parameter you
+on, using the `param`. For example to define the id path parameter you
 can do as shown below:
 
 [source,xml]
@@ -790,7 +790,7 @@ And in Java DSL:
 
 The generated API documentation can be configured to include vendor extensions (https://swagger.io/specification/#specificationExtensions)
 which document the operations and definitions with additional information, such as class name of model classes, camel context id and route id's.
-This information can aid developers and during troubleshooting. However, at production usage you may wish to not have this turned
+This information can be very helpful for developers especially during troubleshooting. However, at production usage you may wish to not have this turned
 on to avoid leaking implementation details into your API docs.
 
 The vendor extension information is stored in the API documentation with keys starting with `x-`.
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/GenerateConfigurerMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/GenerateConfigurerMojo.java
index f3ca5fc..7b39360 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/GenerateConfigurerMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/GenerateConfigurerMojo.java
@@ -27,7 +27,7 @@ import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.plugins.annotations.ResolutionScope;
 
 /**
- * Generate configurer classes from @Configuer annotated classes for main sources.
+ * Generate configurer classes from @Configurer annotated classes for main sources.
  */
 @Mojo(name = "generate-configurer", threadSafe = true, defaultPhase = LifecyclePhase.PROCESS_CLASSES,
       requiresDependencyCollection = ResolutionScope.COMPILE,
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/GenerateTestConfigurerMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/GenerateTestConfigurerMojo.java
index 0994419..87f8333 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/GenerateTestConfigurerMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/GenerateTestConfigurerMojo.java
@@ -27,7 +27,7 @@ import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.plugins.annotations.ResolutionScope;
 
 /**
- * Generate configurer classes from @Configuer annotated classes for test sources.
+ * Generate configurer classes from @Configurer annotated classes for test sources.
  */
 @Mojo(name = "generate-test-configurer", threadSafe = true, defaultPhase = LifecyclePhase.PROCESS_CLASSES,
       requiresDependencyCollection = ResolutionScope.COMPILE,