You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2023/02/27 11:31:20 UTC
[camel] 02/04: Camel-Dhis2: Fix website build
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 2ca93160037b372d72639e25008f9806d6b9e582
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Feb 27 11:47:06 2023 +0100
Camel-Dhis2: Fix website build
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
.../src/main/docs/dhis2-component.adoc | 133 ++-------------------
1 file changed, 8 insertions(+), 125 deletions(-)
diff --git a/components/camel-dhis2/camel-dhis2-component/src/main/docs/dhis2-component.adoc b/components/camel-dhis2/camel-dhis2-component/src/main/docs/dhis2-component.adoc
index 677c155a60b..c25cbb8bc5e 100644
--- a/components/camel-dhis2/camel-dhis2-component/src/main/docs/dhis2-component.adoc
+++ b/components/camel-dhis2/camel-dhis2-component/src/main/docs/dhis2-component.adoc
@@ -31,135 +31,18 @@ Maven users will need to add the following dependency to their `+pom.xml+`.
dhis2://operation/method[?options]
....
-== Configuring Options
+// component-configure options: START
-Camel components are configured on two separate levels:
+// component-configure options: END
-* component level
-* endpoint level
+// component options: START
+include::partial$component-configure-options.adoc[]
+include::partial$component-endpoint-options.adoc[]
+// component options: END
-=== Configuring Component Options
+// endpoint options: START
-The component level is the highest level which holds general and common configurations that are inherited by the endpoints. For example a component may have security settings, credentials for authentication, urls for network connection and so forth.
-
-Some components only have a few options, and others may have many. Because components typically have pre-configured defaults that are commonly used, then you may often only need to configure a few options on a component; or none at all.
-
-Configuring components can be done with the https://camel.apache.org/manual/component-dsl.html[Component DSL], in a configuration file (application.properties|yaml), or directly with Java
-code.
-
-=== Configuring Endpoint Options
-
-Where you find yourself configuring the most is on endpoints, as endpoints often have many options, which allows you to configure what you need the endpoint to do. The options are also categorized into whether the endpoint is used as consumer (from) or as a producer (to), or used for both.
-
-Configuring endpoints is most often done directly in the endpoint URI as path and query parameters. You can also use the https://camel.apache.org/manual/Endpoint-dsl.html[Endpoint DSL] as a type safe way of configuring endpoints.
-
-A good practice when configuring options is to use https://camel.apache.org/manual/using-propertyplaceholder.html[Property Placeholders], which allows to not hardcode urls, port numbers, sensitive information, and other settings. In other words placeholders allows to externalize the configuration from your code, and gives more flexibility and reuse.
-
-The following two sections lists all the options, firstly for the component followed by the endpoint.
-
-== Component Options
-
-The DHIS2 component supports the options listed below.
-
-[width="100%",cols="13%,58%,4%,25%",options="header",]
-|===
-| Naming | Description | Default | Type
-| baseApiUrl (common) | DHIS2 server base API URL | | String
-| username (common) | Username for use for basic authentication | | String
-| password (common) | Password for use for basic authentication | | String
-| client (advanced) | Dhis2Client is an expensive object to create. To avoid creating multiple instances, it can be set directly. | | org.hisp.dhis.integration.sdk.api.Dhis2Client
-|===
-
-== Endpoint Options
-
-The DHIS2 endpoint is configured using URI syntax:
-
-....
-dhis2:apiName/methodName
-....
-
-with the following path and query parameters:
-
-=== Path Parameters
-
-[width="100%",cols="13%,74%,5%,8%",options="header",]
-|===
-| Naming | Description |Default | Type
-| apiName (common) | *Required* What kind of operation to perform. Enum values: | | Dhis2ApiName
-| methodName (common) | *Required* What sub operation to use for the selected operation | | String
-|===
-
-=== Query Parameters
-
-[width="100%",cols="16%,46%,6%,32%",options="header",]
-|===
-| Naming | Description | Default | Type
-| baseApiUrl (common) | DHIS2 server base API URL | | String
-| inBody (common) | Sets the name of a parameter to be passed in the exchange In Body | | String
-| client (advanced) | To use the custom client | | org.hisp.dhis.integration.sdk.api.Dhis2Client
-| password (security) | Password to use for basic authentication | | String
-| username (security) | Username to use for basic authentication | | String
-|===
-
-== API Parameters
-
-The DHIS2 endpoint is an API-based component and has additional parameters based on which API name and API method is used. The API name and API method is located in the endpoint URI as the apiName/methodName path parameters:
-
-....
-dhis2:apiName/methodName
-....
-
-The API names as listed in the table below:
-
-[width="100%",cols="15%,5%,80%",options="header",]
-|===
-| API Name | Type | Description
-| get | Both | API for the get operation, which fetches a resource or a list resources from the server
-| post | Both | API for the create operation, which creates a new resource on the server
-| resourceTables | Both | API for resource and analytic operations
-|===
-
-Each API is documented in the following sections to come.
-
-=== API: get
-
-*Both producer and consumer are supported*
-
-The get API is defined in the syntax as follows:
-
-....
-dhis2:get/methodName?[parameters]
-....
-
-The method(s) is listed in the table below, followed by detailed syntax for each method. (API methods can have a shorthand alias name which can be used in the syntax instead of the name)
-
-[cols=",,",options="header",]
-|===
-| Method | Alias | Description
-| resource | | Retrieve a resource
-| collection | | Retrieve a list of resources
-|===
-
-==== METHOD resource
-
-Signatures:
-
-* java.io.InputStream resource(java.lang.String path, java.lang.String fields, java.lang.String filter, java.util.Map<String, Object> queryParams)
-
-The get/resource API method has the parameters listed in the table below:
-
-[cols=",,",options="header",]
-|===
-| Parameter | Description | Type
-| path | Resource URL path | String
-| fields | Comma-delimited list of fields to fetch | String
-| filter | Search criteria | String
-| queryParams | Custom query parameters | Map
-|===
-
-In addition to the parameters above, the get/resource API can also use any of the link:#query-parameters[Query Parameters].
-
-Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. The message header name must be of the format CamelDhis2.parameter. The inBody parameter overrides message header, i.e. the endpoint parameter inBody=myParameterNameHere would override a CamelDhis2.myParameterNameHere header.
+// endpoint options: END
===== Examples