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 2020/09/04 12:34:15 UTC
[camel] 01/03: CAMEL-15478: api components include combo of
apiName/apiMethod in metadata json.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 3d86784bf577885ef8497782e06b1c1b3d37905b
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Sep 4 12:28:10 2020 +0200
CAMEL-15478: api components include combo of apiName/apiMethod in metadata json.
---
.../org/apache/camel/component/as2/as2.json | 2 +-
.../src/main/docs/as2-component.adoc | 6 +++---
.../apache/camel/component/as2/AS2Endpoint.java | 2 +-
.../org/apache/camel/component/box/box.json | 2 +-
.../src/main/docs/box-component.adoc | 6 +++---
.../apache/camel/component/box/BoxEndpoint.java | 2 +-
.../camel/component/braintree/braintree.json | 2 +-
.../src/main/docs/braintree-component.adoc | 6 +++---
.../component/braintree/BraintreeEndpoint.java | 2 +-
.../org/apache/camel/component/fhir/fhir.json | 2 +-
.../src/main/docs/fhir-component.adoc | 6 +++---
.../apache/camel/component/fhir/FhirEndpoint.java | 2 +-
.../component/google/calendar/google-calendar.json | 2 +-
.../src/main/docs/google-calendar-component.adoc | 6 +++---
.../docs/google-calendar-stream-component.adoc | 6 +++---
.../google/calendar/GoogleCalendarEndpoint.java | 2 +-
.../camel/component/google/drive/google-drive.json | 2 +-
.../src/main/docs/google-drive-component.adoc | 6 +++---
.../google/drive/GoogleDriveEndpoint.java | 2 +-
.../camel/component/google/mail/google-mail.json | 2 +-
.../src/main/docs/google-mail-component.adoc | 6 +++---
.../main/docs/google-mail-stream-component.adoc | 6 +++---
.../component/google/mail/GoogleMailEndpoint.java | 2 +-
.../component/google/sheets/google-sheets.json | 2 +-
.../src/main/docs/google-sheets-component.adoc | 6 +++---
.../main/docs/google-sheets-stream-component.adoc | 6 +++---
.../google/sheets/GoogleSheetsEndpoint.java | 3 ++-
.../apache/camel/component/olingo2/olingo2.json | 2 +-
.../src/main/docs/olingo2-component.adoc | 6 +++---
.../camel/component/olingo2/Olingo2Endpoint.java | 2 +-
.../apache/camel/component/olingo4/olingo4.json | 2 +-
.../src/main/docs/olingo4-component.adoc | 6 +++---
.../camel/component/olingo4/Olingo4Endpoint.java | 2 +-
.../org/apache/camel/component/twilio/twilio.json | 2 +-
.../src/main/docs/twilio-component.adoc | 6 +++---
.../camel/component/twilio/TwilioEndpoint.java | 2 +-
.../src/main/docs/zendesk-component.adoc | 6 +++---
.../src/generated/resources/metadata.json | 22 +++++++++++-----------
.../camel/catalog/impl/AbstractCamelCatalog.java | 10 ++++++----
.../java/org/apache/camel/util/StringHelper.java | 7 +++++++
.../org/apache/camel/util/StringHelperTest.java | 13 +++++++++++++
.../src/main/resources/endpoint-options.mvel | 6 +++---
42 files changed, 108 insertions(+), 85 deletions(-)
diff --git a/components/camel-as2/camel-as2-component/src/generated/resources/org/apache/camel/component/as2/as2.json b/components/camel-as2/camel-as2-component/src/generated/resources/org/apache/camel/component/as2/as2.json
index 8405395..79fe591 100644
--- a/components/camel-as2/camel-as2-component/src/generated/resources/org/apache/camel/component/as2/as2.json
+++ b/components/camel-as2/camel-as2-component/src/generated/resources/org/apache/camel/component/as2/as2.json
@@ -17,7 +17,7 @@
"syntax": "as2:apiName\/methodName",
"async": false,
"api": true,
- "apiPropertyQualifier": "apiName",
+ "apiPropertyQualifier": "apiName\/methodName",
"consumerOnly": false,
"producerOnly": false,
"lenientProperties": false
diff --git a/components/camel-as2/camel-as2-component/src/main/docs/as2-component.adoc b/components/camel-as2/camel-as2-component/src/main/docs/as2-component.adoc
index 0b2517b..272a557 100644
--- a/components/camel-as2/camel-as2-component/src/main/docs/as2-component.adoc
+++ b/components/camel-as2/camel-as2-component/src/main/docs/as2-component.adoc
@@ -146,14 +146,14 @@ with the following path and query parameters:
=== Query API Parameters (2 APIs):
-The AS2 endpoint is an API based component and has additional parameters based on which API method in use.
-The API method is located in the endpoint URI as the apiName path parameter:
+The AS2 endpoint is an API based component and has additional parameters based on which API name and method in use.
+The API name and method is located in the endpoint URI as the apiName/methodName path parameters:
----
as2:apiName/methodName
----
-The following lists each API method and its additional parameters.
+The following lists each API name and method and its additional parameters.
==== client
diff --git a/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Endpoint.java b/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Endpoint.java
index 7ee05b3..86f079f 100644
--- a/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Endpoint.java
+++ b/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Endpoint.java
@@ -51,7 +51,7 @@ import org.apache.http.entity.ContentType;
* Transfer data securely and reliably using the AS2 protocol (RFC4130).
*/
@UriEndpoint(scheme = "as2", firstVersion = "2.22.0", title = "AS2", syntax = "as2:apiName/methodName",
- apiPropertyQualifier = "apiName",
+ apiPropertyQualifier = "apiName/methodName",
category = { Category.FILE })
public class AS2Endpoint extends AbstractApiEndpoint<AS2ApiName, AS2Configuration> {
diff --git a/components/camel-box/camel-box-component/src/generated/resources/org/apache/camel/component/box/box.json b/components/camel-box/camel-box-component/src/generated/resources/org/apache/camel/component/box/box.json
index dc5b4d9..ef15b7c 100644
--- a/components/camel-box/camel-box-component/src/generated/resources/org/apache/camel/component/box/box.json
+++ b/components/camel-box/camel-box-component/src/generated/resources/org/apache/camel/component/box/box.json
@@ -17,7 +17,7 @@
"syntax": "box:apiName\/methodName",
"async": false,
"api": true,
- "apiPropertyQualifier": "apiName",
+ "apiPropertyQualifier": "apiName\/methodName",
"consumerOnly": false,
"producerOnly": false,
"lenientProperties": true
diff --git a/components/camel-box/camel-box-component/src/main/docs/box-component.adoc b/components/camel-box/camel-box-component/src/main/docs/box-component.adoc
index 8990f8b..d2ed8ab 100644
--- a/components/camel-box/camel-box-component/src/main/docs/box-component.adoc
+++ b/components/camel-box/camel-box-component/src/main/docs/box-component.adoc
@@ -156,14 +156,14 @@ with the following path and query parameters:
=== Query API Parameters (10 APIs):
-The Box endpoint is an API based component and has additional parameters based on which API method in use.
-The API method is located in the endpoint URI as the apiName path parameter:
+The Box endpoint is an API based component and has additional parameters based on which API name and method in use.
+The API name and method is located in the endpoint URI as the apiName/methodName path parameters:
----
box:apiName/methodName
----
-The following lists each API method and its additional parameters.
+The following lists each API name and method and its additional parameters.
==== collaborations
diff --git a/components/camel-box/camel-box-component/src/main/java/org/apache/camel/component/box/BoxEndpoint.java b/components/camel-box/camel-box-component/src/main/java/org/apache/camel/component/box/BoxEndpoint.java
index bee76d5..a27272a 100644
--- a/components/camel-box/camel-box-component/src/main/java/org/apache/camel/component/box/BoxEndpoint.java
+++ b/components/camel-box/camel-box-component/src/main/java/org/apache/camel/component/box/BoxEndpoint.java
@@ -48,7 +48,7 @@ import org.apache.camel.support.component.ApiMethodPropertiesHelper;
* Upload, download and manage files, folders, groups, collaborations, etc. on box.com.
*/
@UriEndpoint(firstVersion = "2.14.0", scheme = "box", title = "Box", syntax = "box:apiName/methodName",
- apiPropertyQualifier = "apiName",
+ apiPropertyQualifier = "apiName/methodName",
consumerPrefix = "consumer", category = { Category.CLOUD, Category.FILE, Category.API }, lenientProperties = true)
public class BoxEndpoint extends AbstractApiEndpoint<BoxApiName, BoxConfiguration> {
diff --git a/components/camel-braintree/src/generated/resources/org/apache/camel/component/braintree/braintree.json b/components/camel-braintree/src/generated/resources/org/apache/camel/component/braintree/braintree.json
index 8d137ea..cef49a9 100644
--- a/components/camel-braintree/src/generated/resources/org/apache/camel/component/braintree/braintree.json
+++ b/components/camel-braintree/src/generated/resources/org/apache/camel/component/braintree/braintree.json
@@ -17,7 +17,7 @@
"syntax": "braintree:apiName\/methodName",
"async": false,
"api": true,
- "apiPropertyQualifier": "apiName",
+ "apiPropertyQualifier": "apiName\/methodName",
"consumerOnly": false,
"producerOnly": false,
"lenientProperties": false
diff --git a/components/camel-braintree/src/main/docs/braintree-component.adoc b/components/camel-braintree/src/main/docs/braintree-component.adoc
index 4f437fc..4c8155c 100644
--- a/components/camel-braintree/src/main/docs/braintree-component.adoc
+++ b/components/camel-braintree/src/main/docs/braintree-component.adoc
@@ -129,14 +129,14 @@ with the following path and query parameters:
=== Query API Parameters (17 APIs):
-The Braintree endpoint is an API based component and has additional parameters based on which API method in use.
-The API method is located in the endpoint URI as the apiName path parameter:
+The Braintree endpoint is an API based component and has additional parameters based on which API name and method in use.
+The API name and method is located in the endpoint URI as the apiName/methodName path parameters:
----
braintree:apiName/methodName
----
-The following lists each API method and its additional parameters.
+The following lists each API name and method and its additional parameters.
==== addOn
diff --git a/components/camel-braintree/src/main/java/org/apache/camel/component/braintree/BraintreeEndpoint.java b/components/camel-braintree/src/main/java/org/apache/camel/component/braintree/BraintreeEndpoint.java
index 46d68cb..8b13244 100644
--- a/components/camel-braintree/src/main/java/org/apache/camel/component/braintree/BraintreeEndpoint.java
+++ b/components/camel-braintree/src/main/java/org/apache/camel/component/braintree/BraintreeEndpoint.java
@@ -39,7 +39,7 @@ import org.apache.camel.support.component.ApiMethodPropertiesHelper;
* Process payments using Braintree Payments.
*/
@UriEndpoint(firstVersion = "2.17.0", scheme = "braintree", title = "Braintree", syntax = "braintree:apiName/methodName",
- apiPropertyQualifier = "apiName",
+ apiPropertyQualifier = "apiName/methodName",
category = { Category.CLOUD, Category.PAYMENT })
public class BraintreeEndpoint extends AbstractApiEndpoint<BraintreeApiName, BraintreeConfiguration> {
diff --git a/components/camel-fhir/camel-fhir-component/src/generated/resources/org/apache/camel/component/fhir/fhir.json b/components/camel-fhir/camel-fhir-component/src/generated/resources/org/apache/camel/component/fhir/fhir.json
index 0f5fb82..9d97d5d 100644
--- a/components/camel-fhir/camel-fhir-component/src/generated/resources/org/apache/camel/component/fhir/fhir.json
+++ b/components/camel-fhir/camel-fhir-component/src/generated/resources/org/apache/camel/component/fhir/fhir.json
@@ -17,7 +17,7 @@
"syntax": "fhir:apiName\/methodName",
"async": false,
"api": true,
- "apiPropertyQualifier": "apiName",
+ "apiPropertyQualifier": "apiName\/methodName",
"consumerOnly": false,
"producerOnly": false,
"lenientProperties": false
diff --git a/components/camel-fhir/camel-fhir-component/src/main/docs/fhir-component.adoc b/components/camel-fhir/camel-fhir-component/src/main/docs/fhir-component.adoc
index d13a092..ad0c8bf 100644
--- a/components/camel-fhir/camel-fhir-component/src/main/docs/fhir-component.adoc
+++ b/components/camel-fhir/camel-fhir-component/src/main/docs/fhir-component.adoc
@@ -172,14 +172,14 @@ with the following path and query parameters:
=== Query API Parameters (13 APIs):
-The FHIR endpoint is an API based component and has additional parameters based on which API method in use.
-The API method is located in the endpoint URI as the apiName path parameter:
+The FHIR endpoint is an API based component and has additional parameters based on which API name and method in use.
+The API name and method is located in the endpoint URI as the apiName/methodName path parameters:
----
fhir:apiName/methodName
----
-The following lists each API method and its additional parameters.
+The following lists each API name and method and its additional parameters.
==== capabilities
diff --git a/components/camel-fhir/camel-fhir-component/src/main/java/org/apache/camel/component/fhir/FhirEndpoint.java b/components/camel-fhir/camel-fhir-component/src/main/java/org/apache/camel/component/fhir/FhirEndpoint.java
index 819a5e7..89f1839 100644
--- a/components/camel-fhir/camel-fhir-component/src/main/java/org/apache/camel/component/fhir/FhirEndpoint.java
+++ b/components/camel-fhir/camel-fhir-component/src/main/java/org/apache/camel/component/fhir/FhirEndpoint.java
@@ -52,7 +52,7 @@ import org.apache.camel.support.component.ApiMethodPropertiesHelper;
* Exchange information in the healthcare domain using the FHIR (Fast Healthcare Interoperability Resources) standard.
*/
@UriEndpoint(firstVersion = "2.23.0", scheme = "fhir", title = "FHIR", syntax = "fhir:apiName/methodName",
- apiPropertyQualifier = "apiName",
+ apiPropertyQualifier = "apiName/methodName",
category = { Category.API })
public class FhirEndpoint extends AbstractApiEndpoint<FhirApiName, FhirConfiguration> {
diff --git a/components/camel-google-calendar/src/generated/resources/org/apache/camel/component/google/calendar/google-calendar.json b/components/camel-google-calendar/src/generated/resources/org/apache/camel/component/google/calendar/google-calendar.json
index 2698775..852304e 100644
--- a/components/camel-google-calendar/src/generated/resources/org/apache/camel/component/google/calendar/google-calendar.json
+++ b/components/camel-google-calendar/src/generated/resources/org/apache/camel/component/google/calendar/google-calendar.json
@@ -17,7 +17,7 @@
"syntax": "google-calendar:apiName\/methodName",
"async": false,
"api": true,
- "apiPropertyQualifier": "apiName",
+ "apiPropertyQualifier": "apiName\/methodName",
"consumerOnly": false,
"producerOnly": false,
"lenientProperties": false
diff --git a/components/camel-google-calendar/src/main/docs/google-calendar-component.adoc b/components/camel-google-calendar/src/main/docs/google-calendar-component.adoc
index 21f2916..f7a5f18 100644
--- a/components/camel-google-calendar/src/main/docs/google-calendar-component.adoc
+++ b/components/camel-google-calendar/src/main/docs/google-calendar-component.adoc
@@ -143,14 +143,14 @@ with the following path and query parameters:
=== Query API Parameters (8 APIs):
-The Google Calendar endpoint is an API based component and has additional parameters based on which API method in use.
-The API method is located in the endpoint URI as the apiName path parameter:
+The Google Calendar endpoint is an API based component and has additional parameters based on which API name and method in use.
+The API name and method is located in the endpoint URI as the apiName/methodName path parameters:
----
google-calendar:apiName/methodName
----
-The following lists each API method and its additional parameters.
+The following lists each API name and method and its additional parameters.
==== acl
diff --git a/components/camel-google-calendar/src/main/docs/google-calendar-stream-component.adoc b/components/camel-google-calendar/src/main/docs/google-calendar-stream-component.adoc
index 1632199..b2cefbc 100644
--- a/components/camel-google-calendar/src/main/docs/google-calendar-stream-component.adoc
+++ b/components/camel-google-calendar/src/main/docs/google-calendar-stream-component.adoc
@@ -146,14 +146,14 @@ with the following path and query parameters:
=== Query API Parameters (8 APIs):
-The Google Calendar Stream endpoint is an API based component and has additional parameters based on which API method in use.
-The API method is located in the endpoint URI as the path parameter:
+The Google Calendar Stream endpoint is an API based component and has additional parameters based on which API name and method in use.
+The API name and method is located in the endpoint URI as the path parameters:
----
google-calendar-stream:index
----
-The following lists each API method and its additional parameters.
+The following lists each API name and method and its additional parameters.
==== acl
diff --git a/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarEndpoint.java b/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarEndpoint.java
index d24cfa3..d28cc74 100644
--- a/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarEndpoint.java
+++ b/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarEndpoint.java
@@ -37,7 +37,7 @@ import org.apache.camel.support.component.ApiMethodPropertiesHelper;
* Perform various operations on a Google Calendar.
*/
@UriEndpoint(firstVersion = "2.15.0", scheme = "google-calendar", title = "Google Calendar",
- syntax = "google-calendar:apiName/methodName", apiPropertyQualifier = "apiName",
+ syntax = "google-calendar:apiName/methodName", apiPropertyQualifier = "apiName/methodName",
consumerPrefix = "consumer", category = { Category.API, Category.CLOUD })
public class GoogleCalendarEndpoint extends AbstractApiEndpoint<GoogleCalendarApiName, GoogleCalendarConfiguration> {
diff --git a/components/camel-google-drive/src/generated/resources/org/apache/camel/component/google/drive/google-drive.json b/components/camel-google-drive/src/generated/resources/org/apache/camel/component/google/drive/google-drive.json
index 42e62dc..c5151b3 100644
--- a/components/camel-google-drive/src/generated/resources/org/apache/camel/component/google/drive/google-drive.json
+++ b/components/camel-google-drive/src/generated/resources/org/apache/camel/component/google/drive/google-drive.json
@@ -17,7 +17,7 @@
"syntax": "google-drive:apiName\/methodName",
"async": false,
"api": true,
- "apiPropertyQualifier": "apiName",
+ "apiPropertyQualifier": "apiName\/methodName",
"consumerOnly": false,
"producerOnly": false,
"lenientProperties": false
diff --git a/components/camel-google-drive/src/main/docs/google-drive-component.adoc b/components/camel-google-drive/src/main/docs/google-drive-component.adoc
index 7b71711..2f128ca 100644
--- a/components/camel-google-drive/src/main/docs/google-drive-component.adoc
+++ b/components/camel-google-drive/src/main/docs/google-drive-component.adoc
@@ -165,14 +165,14 @@ with the following path and query parameters:
=== Query API Parameters (13 APIs):
-The Google Drive endpoint is an API based component and has additional parameters based on which API method in use.
-The API method is located in the endpoint URI as the apiName path parameter:
+The Google Drive endpoint is an API based component and has additional parameters based on which API name and method in use.
+The API name and method is located in the endpoint URI as the apiName/methodName path parameters:
----
google-drive:apiName/methodName
----
-The following lists each API method and its additional parameters.
+The following lists each API name and method and its additional parameters.
==== drive-about
diff --git a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java
index 081facf..548d1bd 100644
--- a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java
+++ b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java
@@ -37,7 +37,7 @@ import org.apache.camel.support.component.ApiMethodPropertiesHelper;
* Manage files in Google Drive.
*/
@UriEndpoint(firstVersion = "2.14.0", scheme = "google-drive", title = "Google Drive",
- syntax = "google-drive:apiName/methodName", apiPropertyQualifier = "apiName",
+ syntax = "google-drive:apiName/methodName", apiPropertyQualifier = "apiName/methodName",
consumerPrefix = "consumer", category = { Category.FILE, Category.CLOUD, Category.API })
public class GoogleDriveEndpoint extends AbstractApiEndpoint<GoogleDriveApiName, GoogleDriveConfiguration> {
private Object apiProxy;
diff --git a/components/camel-google-mail/src/generated/resources/org/apache/camel/component/google/mail/google-mail.json b/components/camel-google-mail/src/generated/resources/org/apache/camel/component/google/mail/google-mail.json
index 1e07acb..8b0b627 100644
--- a/components/camel-google-mail/src/generated/resources/org/apache/camel/component/google/mail/google-mail.json
+++ b/components/camel-google-mail/src/generated/resources/org/apache/camel/component/google/mail/google-mail.json
@@ -17,7 +17,7 @@
"syntax": "google-mail:apiName\/methodName",
"async": false,
"api": true,
- "apiPropertyQualifier": "apiName",
+ "apiPropertyQualifier": "apiName\/methodName",
"consumerOnly": false,
"producerOnly": false,
"lenientProperties": false
diff --git a/components/camel-google-mail/src/main/docs/google-mail-component.adoc b/components/camel-google-mail/src/main/docs/google-mail-component.adoc
index bf531187..57af442 100644
--- a/components/camel-google-mail/src/main/docs/google-mail-component.adoc
+++ b/components/camel-google-mail/src/main/docs/google-mail-component.adoc
@@ -153,14 +153,14 @@ with the following path and query parameters:
=== Query API Parameters (7 APIs):
-The Google Mail endpoint is an API based component and has additional parameters based on which API method in use.
-The API method is located in the endpoint URI as the apiName path parameter:
+The Google Mail endpoint is an API based component and has additional parameters based on which API name and method in use.
+The API name and method is located in the endpoint URI as the apiName/methodName path parameters:
----
google-mail:apiName/methodName
----
-The following lists each API method and its additional parameters.
+The following lists each API name and method and its additional parameters.
==== attachments
diff --git a/components/camel-google-mail/src/main/docs/google-mail-stream-component.adoc b/components/camel-google-mail/src/main/docs/google-mail-stream-component.adoc
index 0382088..48c2701 100644
--- a/components/camel-google-mail/src/main/docs/google-mail-stream-component.adoc
+++ b/components/camel-google-mail/src/main/docs/google-mail-stream-component.adoc
@@ -140,14 +140,14 @@ with the following path and query parameters:
=== Query API Parameters (7 APIs):
-The Google Mail Stream endpoint is an API based component and has additional parameters based on which API method in use.
-The API method is located in the endpoint URI as the path parameter:
+The Google Mail Stream endpoint is an API based component and has additional parameters based on which API name and method in use.
+The API name and method is located in the endpoint URI as the path parameters:
----
google-mail-stream:index
----
-The following lists each API method and its additional parameters.
+The following lists each API name and method and its additional parameters.
==== attachments
diff --git a/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailEndpoint.java b/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailEndpoint.java
index 7b0ab4f..06aba18 100644
--- a/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailEndpoint.java
+++ b/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailEndpoint.java
@@ -41,7 +41,7 @@ import org.apache.camel.support.component.ApiMethodPropertiesHelper;
scheme = "google-mail",
title = "Google Mail",
syntax = "google-mail:apiName/methodName",
- apiPropertyQualifier = "apiName",
+ apiPropertyQualifier = "apiName/methodName",
consumerPrefix = "consumer",
category = { Category.CLOUD, Category.API, Category.MAIL })
public class GoogleMailEndpoint extends AbstractApiEndpoint<GoogleMailApiName, GoogleMailConfiguration> {
diff --git a/components/camel-google-sheets/src/generated/resources/org/apache/camel/component/google/sheets/google-sheets.json b/components/camel-google-sheets/src/generated/resources/org/apache/camel/component/google/sheets/google-sheets.json
index 571586e..34afbde 100644
--- a/components/camel-google-sheets/src/generated/resources/org/apache/camel/component/google/sheets/google-sheets.json
+++ b/components/camel-google-sheets/src/generated/resources/org/apache/camel/component/google/sheets/google-sheets.json
@@ -17,7 +17,7 @@
"syntax": "google-sheets:apiName\/methodName",
"async": false,
"api": true,
- "apiPropertyQualifier": "apiName",
+ "apiPropertyQualifier": "apiName\/methodName",
"consumerOnly": false,
"producerOnly": false,
"lenientProperties": false,
diff --git a/components/camel-google-sheets/src/main/docs/google-sheets-component.adoc b/components/camel-google-sheets/src/main/docs/google-sheets-component.adoc
index 29d3f58..2d3fa3c 100644
--- a/components/camel-google-sheets/src/main/docs/google-sheets-component.adoc
+++ b/components/camel-google-sheets/src/main/docs/google-sheets-component.adoc
@@ -149,14 +149,14 @@ with the following path and query parameters:
=== Query API Parameters (2 APIs):
-The Google Sheets endpoint is an API based component and has additional parameters based on which API method in use.
-The API method is located in the endpoint URI as the apiName path parameter:
+The Google Sheets endpoint is an API based component and has additional parameters based on which API name and method in use.
+The API name and method is located in the endpoint URI as the apiName/methodName path parameters:
----
google-sheets:apiName/methodName
----
-The following lists each API method and its additional parameters.
+The following lists each API name and method and its additional parameters.
==== data
diff --git a/components/camel-google-sheets/src/main/docs/google-sheets-stream-component.adoc b/components/camel-google-sheets/src/main/docs/google-sheets-stream-component.adoc
index 481c942..0cbbd91 100644
--- a/components/camel-google-sheets/src/main/docs/google-sheets-stream-component.adoc
+++ b/components/camel-google-sheets/src/main/docs/google-sheets-stream-component.adoc
@@ -150,14 +150,14 @@ with the following path and query parameters:
=== Query API Parameters (2 APIs):
-The Google Sheets Stream endpoint is an API based component and has additional parameters based on which API method in use.
-The API method is located in the endpoint URI as the path parameter:
+The Google Sheets Stream endpoint is an API based component and has additional parameters based on which API name and method in use.
+The API name and method is located in the endpoint URI as the path parameters:
----
google-sheets-stream:apiName
----
-The following lists each API method and its additional parameters.
+The following lists each API name and method and its additional parameters.
==== data
diff --git a/components/camel-google-sheets/src/main/java/org/apache/camel/component/google/sheets/GoogleSheetsEndpoint.java b/components/camel-google-sheets/src/main/java/org/apache/camel/component/google/sheets/GoogleSheetsEndpoint.java
index d79d688..a3b3c25 100644
--- a/components/camel-google-sheets/src/main/java/org/apache/camel/component/google/sheets/GoogleSheetsEndpoint.java
+++ b/components/camel-google-sheets/src/main/java/org/apache/camel/component/google/sheets/GoogleSheetsEndpoint.java
@@ -37,7 +37,8 @@ import org.apache.camel.support.component.ApiMethodPropertiesHelper;
* Manage spreadsheets in Google Sheets.
*/
@UriEndpoint(firstVersion = "2.23.0", scheme = "google-sheets", title = "Google Sheets",
- syntax = "google-sheets:apiName/methodName", apiPropertyQualifier = "apiName", consumerPrefix = "consumer",
+ syntax = "google-sheets:apiName/methodName", apiPropertyQualifier = "apiName/methodName",
+ consumerPrefix = "consumer",
category = { Category.API, Category.CLOUD, Category.SHEETS })
public class GoogleSheetsEndpoint extends AbstractApiEndpoint<GoogleSheetsApiName, GoogleSheetsConfiguration> {
diff --git a/components/camel-olingo2/camel-olingo2-component/src/generated/resources/org/apache/camel/component/olingo2/olingo2.json b/components/camel-olingo2/camel-olingo2-component/src/generated/resources/org/apache/camel/component/olingo2/olingo2.json
index a43d686..c74651f 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/generated/resources/org/apache/camel/component/olingo2/olingo2.json
+++ b/components/camel-olingo2/camel-olingo2-component/src/generated/resources/org/apache/camel/component/olingo2/olingo2.json
@@ -17,7 +17,7 @@
"syntax": "olingo2:apiName\/methodName",
"async": false,
"api": true,
- "apiPropertyQualifier": "apiName",
+ "apiPropertyQualifier": "apiName\/methodName",
"consumerOnly": false,
"producerOnly": false,
"lenientProperties": false
diff --git a/components/camel-olingo2/camel-olingo2-component/src/main/docs/olingo2-component.adoc b/components/camel-olingo2/camel-olingo2-component/src/main/docs/olingo2-component.adoc
index 188a97d..449ad3f 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/main/docs/olingo2-component.adoc
+++ b/components/camel-olingo2/camel-olingo2-component/src/main/docs/olingo2-component.adoc
@@ -154,14 +154,14 @@ with the following path and query parameters:
=== Query API Parameters (1 APIs):
-The Olingo2 endpoint is an API based component and has additional parameters based on which API method in use.
-The API method is located in the endpoint URI as the apiName path parameter:
+The Olingo2 endpoint is an API based component and has additional parameters based on which API name and method in use.
+The API name and method is located in the endpoint URI as the apiName/methodName path parameters:
----
olingo2:apiName/methodName
----
-The following lists each API method and its additional parameters.
+The following lists each API name and method and its additional parameters.
==== DEFAULT
diff --git a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Endpoint.java b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Endpoint.java
index 8edb4ef..bb9a609 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Endpoint.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Endpoint.java
@@ -45,7 +45,7 @@ import org.apache.camel.support.component.ApiMethodPropertiesHelper;
* Communicate with OData 2.0 services using Apache Olingo.
*/
@UriEndpoint(firstVersion = "2.14.0", scheme = "olingo2", title = "Olingo2", syntax = "olingo2:apiName/methodName",
- apiPropertyQualifier = "apiName",
+ apiPropertyQualifier = "apiName/methodName",
category = { Category.CLOUD })
public class Olingo2Endpoint extends AbstractApiEndpoint<Olingo2ApiName, Olingo2Configuration> {
diff --git a/components/camel-olingo4/camel-olingo4-component/src/generated/resources/org/apache/camel/component/olingo4/olingo4.json b/components/camel-olingo4/camel-olingo4-component/src/generated/resources/org/apache/camel/component/olingo4/olingo4.json
index 585bd7a..d84de19 100644
--- a/components/camel-olingo4/camel-olingo4-component/src/generated/resources/org/apache/camel/component/olingo4/olingo4.json
+++ b/components/camel-olingo4/camel-olingo4-component/src/generated/resources/org/apache/camel/component/olingo4/olingo4.json
@@ -17,7 +17,7 @@
"syntax": "olingo4:apiName\/methodName",
"async": false,
"api": true,
- "apiPropertyQualifier": "apiName",
+ "apiPropertyQualifier": "apiName\/methodName",
"consumerOnly": false,
"producerOnly": false,
"lenientProperties": false
diff --git a/components/camel-olingo4/camel-olingo4-component/src/main/docs/olingo4-component.adoc b/components/camel-olingo4/camel-olingo4-component/src/main/docs/olingo4-component.adoc
index c2d0e36..245eec8 100644
--- a/components/camel-olingo4/camel-olingo4-component/src/main/docs/olingo4-component.adoc
+++ b/components/camel-olingo4/camel-olingo4-component/src/main/docs/olingo4-component.adoc
@@ -151,14 +151,14 @@ with the following path and query parameters:
=== Query API Parameters (1 APIs):
-The Olingo4 endpoint is an API based component and has additional parameters based on which API method in use.
-The API method is located in the endpoint URI as the apiName path parameter:
+The Olingo4 endpoint is an API based component and has additional parameters based on which API name and method in use.
+The API name and method is located in the endpoint URI as the apiName/methodName path parameters:
----
olingo4:apiName/methodName
----
-The following lists each API method and its additional parameters.
+The following lists each API name and method and its additional parameters.
==== DEFAULT
diff --git a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java
index 18314fb..803650d 100644
--- a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java
+++ b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java
@@ -45,7 +45,7 @@ import org.apache.camel.support.component.ApiMethodPropertiesHelper;
* Communicate with OData 4.0 services using Apache Olingo OData API.
*/
@UriEndpoint(firstVersion = "2.19.0", scheme = "olingo4", title = "Olingo4", syntax = "olingo4:apiName/methodName",
- apiPropertyQualifier = "apiName",
+ apiPropertyQualifier = "apiName/methodName",
category = { Category.CLOUD })
public class Olingo4Endpoint extends AbstractApiEndpoint<Olingo4ApiName, Olingo4Configuration> {
diff --git a/components/camel-twilio/src/generated/resources/org/apache/camel/component/twilio/twilio.json b/components/camel-twilio/src/generated/resources/org/apache/camel/component/twilio/twilio.json
index 39e3234..c50ae3f 100644
--- a/components/camel-twilio/src/generated/resources/org/apache/camel/component/twilio/twilio.json
+++ b/components/camel-twilio/src/generated/resources/org/apache/camel/component/twilio/twilio.json
@@ -17,7 +17,7 @@
"syntax": "twilio:apiName\/methodName",
"async": false,
"api": true,
- "apiPropertyQualifier": "apiName",
+ "apiPropertyQualifier": "apiName\/methodName",
"consumerOnly": false,
"producerOnly": false,
"lenientProperties": false
diff --git a/components/camel-twilio/src/main/docs/twilio-component.adoc b/components/camel-twilio/src/main/docs/twilio-component.adoc
index 6635c4f..972f433 100644
--- a/components/camel-twilio/src/main/docs/twilio-component.adoc
+++ b/components/camel-twilio/src/main/docs/twilio-component.adoc
@@ -104,14 +104,14 @@ with the following path and query parameters:
=== Query API Parameters (56 APIs):
-The Twilio endpoint is an API based component and has additional parameters based on which API method in use.
-The API method is located in the endpoint URI as the apiName path parameter:
+The Twilio endpoint is an API based component and has additional parameters based on which API name and method in use.
+The API name and method is located in the endpoint URI as the apiName/methodName path parameters:
----
twilio:apiName/methodName
----
-The following lists each API method and its additional parameters.
+The following lists each API name and method and its additional parameters.
==== account
diff --git a/components/camel-twilio/src/main/java/org/apache/camel/component/twilio/TwilioEndpoint.java b/components/camel-twilio/src/main/java/org/apache/camel/component/twilio/TwilioEndpoint.java
index 7dd161d..d4dfd23 100644
--- a/components/camel-twilio/src/main/java/org/apache/camel/component/twilio/TwilioEndpoint.java
+++ b/components/camel-twilio/src/main/java/org/apache/camel/component/twilio/TwilioEndpoint.java
@@ -43,7 +43,7 @@ import org.apache.camel.support.component.ApiMethodPropertiesHelper;
* Interact with Twilio REST APIs using Twilio Java SDK.
*/
@UriEndpoint(firstVersion = "2.20.0", scheme = "twilio", title = "Twilio", syntax = "twilio:apiName/methodName",
- apiPropertyQualifier = "apiName",
+ apiPropertyQualifier = "apiName/methodName",
category = { Category.API, Category.MESSAGING, Category.CLOUD })
public class TwilioEndpoint extends AbstractApiEndpoint<TwilioApiName, TwilioConfiguration> {
diff --git a/components/camel-zendesk/src/main/docs/zendesk-component.adoc b/components/camel-zendesk/src/main/docs/zendesk-component.adoc
index 33afe71..ac17613 100644
--- a/components/camel-zendesk/src/main/docs/zendesk-component.adoc
+++ b/components/camel-zendesk/src/main/docs/zendesk-component.adoc
@@ -110,14 +110,14 @@ with the following path and query parameters:
=== Query API Parameters (1 APIs):
-The Zendesk endpoint is an API based component and has additional parameters based on which API method in use.
-The API method is located in the endpoint URI as the methodName path parameter:
+The Zendesk endpoint is an API based component and has additional parameters based on which API name and method in use.
+The API name and method is located in the endpoint URI as the methodName path parameters:
----
zendesk:methodName
----
-The following lists each API method and its additional parameters.
+The following lists each API name and method and its additional parameters.
==== DEFAULT
diff --git a/core/camel-componentdsl/src/generated/resources/metadata.json b/core/camel-componentdsl/src/generated/resources/metadata.json
index 9779517..23e5970 100644
--- a/core/camel-componentdsl/src/generated/resources/metadata.json
+++ b/core/camel-componentdsl/src/generated/resources/metadata.json
@@ -180,7 +180,7 @@
"syntax": "as2:apiName\/methodName",
"async": false,
"api": true,
- "apiPropertyQualifier": "apiName",
+ "apiPropertyQualifier": "apiName\/methodName",
"consumerOnly": false,
"producerOnly": false,
"lenientProperties": false
@@ -1584,7 +1584,7 @@
"syntax": "box:apiName\/methodName",
"async": false,
"api": true,
- "apiPropertyQualifier": "apiName",
+ "apiPropertyQualifier": "apiName\/methodName",
"consumerOnly": false,
"producerOnly": false,
"lenientProperties": true
@@ -1607,7 +1607,7 @@
"syntax": "braintree:apiName\/methodName",
"async": false,
"api": true,
- "apiPropertyQualifier": "apiName",
+ "apiPropertyQualifier": "apiName\/methodName",
"consumerOnly": false,
"producerOnly": false,
"lenientProperties": false
@@ -2812,7 +2812,7 @@
"syntax": "fhir:apiName\/methodName",
"async": false,
"api": true,
- "apiPropertyQualifier": "apiName",
+ "apiPropertyQualifier": "apiName\/methodName",
"consumerOnly": false,
"producerOnly": false,
"lenientProperties": false
@@ -3161,7 +3161,7 @@
"syntax": "google-calendar:apiName\/methodName",
"async": false,
"api": true,
- "apiPropertyQualifier": "apiName",
+ "apiPropertyQualifier": "apiName\/methodName",
"consumerOnly": false,
"producerOnly": false,
"lenientProperties": false
@@ -3207,7 +3207,7 @@
"syntax": "google-drive:apiName\/methodName",
"async": false,
"api": true,
- "apiPropertyQualifier": "apiName",
+ "apiPropertyQualifier": "apiName\/methodName",
"consumerOnly": false,
"producerOnly": false,
"lenientProperties": false
@@ -3230,7 +3230,7 @@
"syntax": "google-mail:apiName\/methodName",
"async": false,
"api": true,
- "apiPropertyQualifier": "apiName",
+ "apiPropertyQualifier": "apiName\/methodName",
"consumerOnly": false,
"producerOnly": false,
"lenientProperties": false
@@ -3299,7 +3299,7 @@
"syntax": "google-sheets:apiName\/methodName",
"async": false,
"api": true,
- "apiPropertyQualifier": "apiName",
+ "apiPropertyQualifier": "apiName\/methodName",
"consumerOnly": false,
"producerOnly": false,
"lenientProperties": false
@@ -5748,7 +5748,7 @@
"syntax": "olingo2:apiName\/methodName",
"async": false,
"api": true,
- "apiPropertyQualifier": "apiName",
+ "apiPropertyQualifier": "apiName\/methodName",
"consumerOnly": false,
"producerOnly": false,
"lenientProperties": false
@@ -5771,7 +5771,7 @@
"syntax": "olingo4:apiName\/methodName",
"async": false,
"api": true,
- "apiPropertyQualifier": "apiName",
+ "apiPropertyQualifier": "apiName\/methodName",
"consumerOnly": false,
"producerOnly": false,
"lenientProperties": false
@@ -7585,7 +7585,7 @@
"syntax": "twilio:apiName\/methodName",
"async": false,
"api": true,
- "apiPropertyQualifier": "apiName",
+ "apiPropertyQualifier": "apiName\/methodName",
"consumerOnly": false,
"producerOnly": false,
"lenientProperties": false
diff --git a/core/camel-core-catalog/src/main/java/org/apache/camel/catalog/impl/AbstractCamelCatalog.java b/core/camel-core-catalog/src/main/java/org/apache/camel/catalog/impl/AbstractCamelCatalog.java
index 21d1b94..dc7027b 100644
--- a/core/camel-core-catalog/src/main/java/org/apache/camel/catalog/impl/AbstractCamelCatalog.java
+++ b/core/camel-core-catalog/src/main/java/org/apache/camel/catalog/impl/AbstractCamelCatalog.java
@@ -174,8 +174,9 @@ public abstract class AbstractCamelCatalog {
model.getEndpointPathOptions().forEach(o -> rows.put(o.getName(), o));
if (model.isApi()) {
- String qualifier = model.getApiPropertyQualifier();
- String key = properties.get(qualifier);
+ // TODO: combo of apiName/methodName
+ String[] qualifieres = StringHelper.splitWords(model.getApiPropertyQualifier());
+ String key = properties.get(qualifieres[0]);
Map<String, BaseOptionModel> apiProperties = extractApiProperties(model, key);
rows.putAll(apiProperties);
}
@@ -545,8 +546,9 @@ public abstract class AbstractCamelCatalog {
// is this an api component then there may be additional options
if (model.isApi()) {
- String qualifier = model.getApiPropertyQualifier();
- int pos = word.indexOf(qualifier);
+ // TODO: combo of apiName/methodName
+ String[] qualifieres = StringHelper.splitWords(model.getApiPropertyQualifier());
+ int pos = word.indexOf(qualifieres[0]);
if (pos != -1) {
String key = word2.size() > pos ? word2.get(pos) : null;
Map<String, BaseOptionModel> apiProperties = extractApiProperties(model, key);
diff --git a/core/camel-util/src/main/java/org/apache/camel/util/StringHelper.java b/core/camel-util/src/main/java/org/apache/camel/util/StringHelper.java
index 389a002..e90412b 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/StringHelper.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/StringHelper.java
@@ -892,4 +892,11 @@ public final class StringHelper {
return value;
}
+ /**
+ * Split the text on words, eg hello/world => becomes array with hello in index 0, and world in index 1.
+ */
+ public static String[] splitWords(String text) {
+ return text.split("[\\W]+");
+ }
+
}
diff --git a/core/camel-util/src/test/java/org/apache/camel/util/StringHelperTest.java b/core/camel-util/src/test/java/org/apache/camel/util/StringHelperTest.java
index cd07720..4c4a0d4 100644
--- a/core/camel-util/src/test/java/org/apache/camel/util/StringHelperTest.java
+++ b/core/camel-util/src/test/java/org/apache/camel/util/StringHelperTest.java
@@ -19,6 +19,7 @@ package org.apache.camel.util;
import org.junit.jupiter.api.Test;
import static org.apache.camel.util.StringHelper.camelCaseToDash;
+import static org.apache.camel.util.StringHelper.splitWords;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class StringHelperTest {
@@ -44,4 +45,16 @@ public class StringHelperTest {
assertEquals("use-mdc-logging", camelCaseToDash("UseMDCLogging"));
assertEquals("mdc-logging-keys-pattern", camelCaseToDash("MDCLoggingKeysPattern"));
}
+
+ @Test
+ public void testSplitWords() throws Exception {
+ String[] arr = splitWords("apiName/methodName");
+ assertEquals(2, arr.length);
+ assertEquals("apiName", arr[0]);
+ assertEquals("methodName", arr[1]);
+
+ arr = splitWords("hello");
+ assertEquals(1, arr.length);
+ assertEquals("hello", arr[0]);
+ }
}
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/resources/endpoint-options.mvel b/tooling/maven/camel-package-maven-plugin/src/main/resources/endpoint-options.mvel
index b5cedff..de19c24 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/resources/endpoint-options.mvel
+++ b/tooling/maven/camel-package-maven-plugin/src/main/resources/endpoint-options.mvel
@@ -34,14 +34,14 @@ The @{title} endpoint has no query parameters.
=== Query API Parameters (@{apiOptions.size()} APIs):
-The @{title} endpoint is an API based component and has additional parameters based on which API method in use.
-The API method is located in the endpoint URI as the @{apiPropertyQualifier} path parameter:
+The @{title} endpoint is an API based component and has additional parameters based on which API name and method in use.
+The API name and method is located in the endpoint URI as the @{apiPropertyQualifier} path parameters:
----
@{syntax}
----
-The following lists each API method and its additional parameters.
+The following lists each API name and method and its additional parameters.
@foreach{api : apiOptions.entrySet()}
==== @{api.key}