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 63d5d2ca2a1e CAMEL-27036: camel-alibaba-sms - do not require region,
and document the operation header (#30257)
63d5d2ca2a1e is described below
commit 63d5d2ca2a1eea51ca79f7b4224f0b8b00fbfd3b
Author: Saravanakumar Selvaraj <[email protected]>
AuthorDate: Tue Nov 17 09:01:03 2026 +0000
CAMEL-27036: camel-alibaba-sms - do not require region, and document the
operation header (#30257)
…the operation header
region was marked as required, although either the region or the endpoint
is enough to create the client: createClient
throws "Region or endpoint is required" only when both are empty, and the
client of the SDK uses the endpoint when it is
set. The operation header was declared only in SMSProperties, which the
build does not read, so it was missing from the
header list of the component, and the seven texts on SMSProperties were not
used.
region is no longer required. SMSHeaders has OPERATION with the text of the
operation header of camel-alibaba-ots, and
SMSProperties keeps its constants without the unused annotations. The
component JSON, the catalog and the Endpoint DSL
are regenerated, and a new test of CamelCatalogTest covers the change.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
.../apache/camel/catalog/components/alibaba-sms.json | 15 ++++++++-------
.../org/apache/camel/catalog/CamelCatalogTest.java | 14 ++++++++++++++
.../camel/component/alibaba/sms/alibaba-sms.json | 15 ++++++++-------
.../camel/component/alibaba/sms/SMSEndpoint.java | 5 ++---
.../component/alibaba/sms/constants/SMSHeaders.java | 6 ++++++
.../alibaba/sms/constants/SMSProperties.java | 9 ---------
.../ROOT/pages/camel-4x-upgrade-guide-4_24.adoc | 7 +++++++
.../endpoint/dsl/SMSEndpointBuilderFactory.java | 19 ++++++++++++++++---
8 files changed, 61 insertions(+), 29 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/alibaba-sms.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/alibaba-sms.json
index d1ad2606e4f6..7ae9f059930d 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/alibaba-sms.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/alibaba-sms.json
@@ -30,12 +30,13 @@
"healthCheckProducerEnabled": { "index": 3, "kind": "property",
"displayName": "Health Check Producer Enabled", "group": "health", "label":
"health", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true,
"description": "Used for enabling or disabling all producer based health checks
from this component. Notice: Camel has by default disabled all producer based
health-checks. You can turn on producer [...]
},
"headers": {
- "CamelAlibabaSmsPhoneNumbers": { "index": 0, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The phone numbers of the recipients, which are separated by
commas. Short Message Service accepts at most 1000 phone numbers. This header
replaces the phoneNumbers option. If this header is not set, an exchange
property of the same name replaces the [...]
- "CamelAlibabaSmsSignName": { "index": 1, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The sign name of the SMS message. The value must be an approved
sign name. This header replaces the signName option. If this header is not set,
an exchange property of the same name replaces the signName option.",
"constantName": "org.apache.camel.compo [...]
- "CamelAlibabaSmsTemplateCode": { "index": 2, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The template code of the SMS message. The value must be the
code of an approved template. This header replaces the templateCode option. If
this header is not set, an exchange property of the same name replaces the
templateCode option.", "constantNam [...]
- "CamelAlibabaSmsTemplateParam": { "index": 3, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The template parameters of the SMS message as a JSON string.
The JSON string must provide a value for each variable of the template. This
header replaces the templateParam option. If this header is not set, an
exchange property of the same name rep [...]
- "CamelAlibabaSmsOutId": { "index": 4, "kind": "header", "displayName": "",
"group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The external transaction ID of the SMS message. This header
replaces the outId option. If this header is not set, an exchange property of
the same name replaces the outId option.", "constantName":
"org.apache.camel.component.alibaba.sms.constants.SMSHeader [...]
- "CamelAlibabaSmsRequestId": { "index": 5, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The request ID that Short Message Service returns in the
response to the operation. The producer sets it, unless the exchange fails.",
"constantName":
"org.apache.camel.component.alibaba.sms.constants.SMSHeaders#REQUEST_ID" }
+ "CamelAlibabaSmsOperation": { "index": 0, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The operation that the producer performs. This header replaces
the operation option. If this header is not set, an exchange property of the
same name replaces the operation option.", "constantName":
"org.apache.camel.component.alibaba.sms.constants.SMS [...]
+ "CamelAlibabaSmsPhoneNumbers": { "index": 1, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The phone numbers of the recipients, which are separated by
commas. Short Message Service accepts at most 1000 phone numbers. This header
replaces the phoneNumbers option. If this header is not set, an exchange
property of the same name replaces the [...]
+ "CamelAlibabaSmsSignName": { "index": 2, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The sign name of the SMS message. The value must be an approved
sign name. This header replaces the signName option. If this header is not set,
an exchange property of the same name replaces the signName option.",
"constantName": "org.apache.camel.compo [...]
+ "CamelAlibabaSmsTemplateCode": { "index": 3, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The template code of the SMS message. The value must be the
code of an approved template. This header replaces the templateCode option. If
this header is not set, an exchange property of the same name replaces the
templateCode option.", "constantNam [...]
+ "CamelAlibabaSmsTemplateParam": { "index": 4, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The template parameters of the SMS message as a JSON string.
The JSON string must provide a value for each variable of the template. This
header replaces the templateParam option. If this header is not set, an
exchange property of the same name rep [...]
+ "CamelAlibabaSmsOutId": { "index": 5, "kind": "header", "displayName": "",
"group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The external transaction ID of the SMS message. This header
replaces the outId option. If this header is not set, an exchange property of
the same name replaces the outId option.", "constantName":
"org.apache.camel.component.alibaba.sms.constants.SMSHeader [...]
+ "CamelAlibabaSmsRequestId": { "index": 6, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The request ID that Short Message Service returns in the
response to the operation. The producer sets it, unless the exchange fails.",
"constantName":
"org.apache.camel.component.alibaba.sms.constants.SMSHeaders#REQUEST_ID" }
},
"bodyTypes": {
"producerIn": { "carriers": [ "any" ], "description": "Not used: sendSms
takes the phone numbers, sign name, template code and template parameters from
options or headers, such as CamelAlibabaSmsTemplateParam" },
@@ -46,7 +47,7 @@
"endpoint": { "index": 1, "kind": "parameter", "displayName": "Endpoint",
"group": "producer", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "The endpoint of Short Message Service, which
is a host name without http:\/\/ or https:\/\/. The producer sends requests to
it over HTTPS. If not set, the region option determines the endpoint, and one
of the two is required. Not used wh [...]
"outId": { "index": 2, "kind": "parameter", "displayName": "Out Id",
"group": "producer", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "The external transaction ID of the SMS
message. The CamelAlibabaSmsOutId header replaces this option for a request
that the producer sends. If that header is not set, an exchange property of the
same name replaces this option. If none of the [...]
"phoneNumbers": { "index": 3, "kind": "parameter", "displayName": "Phone
Numbers", "group": "producer", "label": "", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": false, "description": "The phone numbers of the recipients,
which are separated by commas. Short Message Service accepts at most 1000 phone
numbers. The CamelAlibabaSmsPhoneNumbers header replaces this option for a
request that the producer sends. If [...]
- "region": { "index": 4, "kind": "parameter", "displayName": "Region",
"group": "producer", "label": "", "required": true, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "The region ID of Short Message Service, for
example cn-hangzhou. Only used when the endpoint option is not set, to
determine the endpoint of Short Message Service. Not used when the smsClient
option is set or autowired." },
+ "region": { "index": 4, "kind": "parameter", "displayName": "Region",
"group": "producer", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "The region ID of Short Message Service, for
example cn-hangzhou. Only used when the endpoint option is not set, to
determine the endpoint of Short Message Service. One of the two options is
required. Not used when the smsClient option is set [...]
"signName": { "index": 5, "kind": "parameter", "displayName": "Sign Name",
"group": "producer", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "The sign name of the SMS message. The value
must be an approved sign name. The CamelAlibabaSmsSignName header replaces this
option for a request that the producer sends. If that header is not set, an
exchange property of the same name r [...]
"templateCode": { "index": 6, "kind": "parameter", "displayName":
"Template Code", "group": "producer", "label": "", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": false, "description": "The template code of the SMS message.
The value must be the code of an approved template. The
CamelAlibabaSmsTemplateCode header replaces this option for a request that the
producer sends. If that header is not set, an exchange [...]
"templateParam": { "index": 7, "kind": "parameter", "displayName":
"Template Param", "group": "producer", "label": "", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": false, "description": "The template parameters of the SMS
message as a JSON string. The JSON string must provide a value for each
variable of the template. The CamelAlibabaSmsTemplateParam header replaces this
option for a request that the producer [...]
diff --git
a/catalog/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
b/catalog/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
index 15f261cb1e24..5da6a3a2c096 100644
---
a/catalog/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
+++
b/catalog/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
@@ -1718,6 +1718,20 @@ public class CamelCatalogTest {
assertEquals("-1",
result.getDefaultValues().get("maxMessagesPerTask"));
}
+ @Test
+ public void testValidateEndpointAlibabaSms() {
+ String uri = "alibaba-sms:sendSms?endpoint=dysmsapi.aliyuncs.com";
+ EndpointValidationResult result =
catalog.validateEndpointProperties(uri);
+ assertTrue(result.isSuccess(), result.summaryErrorMessage(false));
+
+ uri = "alibaba-sms:sendSms?region=cn-hangzhou";
+ result = catalog.validateEndpointProperties(uri);
+ assertTrue(result.isSuccess(), result.summaryErrorMessage(false));
+
+ ComponentModel model = catalog.componentModel("alibaba-sms");
+ assertTrue(model.getEndpointHeaders().stream().anyMatch(h ->
"CamelAlibabaSmsOperation".equals(h.getName())));
+ }
+
@Test
public void testValidateEndpointConsumerOnly() {
String uri = "file:inbox?bufferSize=4096&readLock=changed&delete=true";
diff --git
a/components/camel-alibaba/camel-alibaba-sms/src/generated/resources/META-INF/org/apache/camel/component/alibaba/sms/alibaba-sms.json
b/components/camel-alibaba/camel-alibaba-sms/src/generated/resources/META-INF/org/apache/camel/component/alibaba/sms/alibaba-sms.json
index d1ad2606e4f6..7ae9f059930d 100644
---
a/components/camel-alibaba/camel-alibaba-sms/src/generated/resources/META-INF/org/apache/camel/component/alibaba/sms/alibaba-sms.json
+++
b/components/camel-alibaba/camel-alibaba-sms/src/generated/resources/META-INF/org/apache/camel/component/alibaba/sms/alibaba-sms.json
@@ -30,12 +30,13 @@
"healthCheckProducerEnabled": { "index": 3, "kind": "property",
"displayName": "Health Check Producer Enabled", "group": "health", "label":
"health", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true,
"description": "Used for enabling or disabling all producer based health checks
from this component. Notice: Camel has by default disabled all producer based
health-checks. You can turn on producer [...]
},
"headers": {
- "CamelAlibabaSmsPhoneNumbers": { "index": 0, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The phone numbers of the recipients, which are separated by
commas. Short Message Service accepts at most 1000 phone numbers. This header
replaces the phoneNumbers option. If this header is not set, an exchange
property of the same name replaces the [...]
- "CamelAlibabaSmsSignName": { "index": 1, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The sign name of the SMS message. The value must be an approved
sign name. This header replaces the signName option. If this header is not set,
an exchange property of the same name replaces the signName option.",
"constantName": "org.apache.camel.compo [...]
- "CamelAlibabaSmsTemplateCode": { "index": 2, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The template code of the SMS message. The value must be the
code of an approved template. This header replaces the templateCode option. If
this header is not set, an exchange property of the same name replaces the
templateCode option.", "constantNam [...]
- "CamelAlibabaSmsTemplateParam": { "index": 3, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The template parameters of the SMS message as a JSON string.
The JSON string must provide a value for each variable of the template. This
header replaces the templateParam option. If this header is not set, an
exchange property of the same name rep [...]
- "CamelAlibabaSmsOutId": { "index": 4, "kind": "header", "displayName": "",
"group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The external transaction ID of the SMS message. This header
replaces the outId option. If this header is not set, an exchange property of
the same name replaces the outId option.", "constantName":
"org.apache.camel.component.alibaba.sms.constants.SMSHeader [...]
- "CamelAlibabaSmsRequestId": { "index": 5, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The request ID that Short Message Service returns in the
response to the operation. The producer sets it, unless the exchange fails.",
"constantName":
"org.apache.camel.component.alibaba.sms.constants.SMSHeaders#REQUEST_ID" }
+ "CamelAlibabaSmsOperation": { "index": 0, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The operation that the producer performs. This header replaces
the operation option. If this header is not set, an exchange property of the
same name replaces the operation option.", "constantName":
"org.apache.camel.component.alibaba.sms.constants.SMS [...]
+ "CamelAlibabaSmsPhoneNumbers": { "index": 1, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The phone numbers of the recipients, which are separated by
commas. Short Message Service accepts at most 1000 phone numbers. This header
replaces the phoneNumbers option. If this header is not set, an exchange
property of the same name replaces the [...]
+ "CamelAlibabaSmsSignName": { "index": 2, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The sign name of the SMS message. The value must be an approved
sign name. This header replaces the signName option. If this header is not set,
an exchange property of the same name replaces the signName option.",
"constantName": "org.apache.camel.compo [...]
+ "CamelAlibabaSmsTemplateCode": { "index": 3, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The template code of the SMS message. The value must be the
code of an approved template. This header replaces the templateCode option. If
this header is not set, an exchange property of the same name replaces the
templateCode option.", "constantNam [...]
+ "CamelAlibabaSmsTemplateParam": { "index": 4, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The template parameters of the SMS message as a JSON string.
The JSON string must provide a value for each variable of the template. This
header replaces the templateParam option. If this header is not set, an
exchange property of the same name rep [...]
+ "CamelAlibabaSmsOutId": { "index": 5, "kind": "header", "displayName": "",
"group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The external transaction ID of the SMS message. This header
replaces the outId option. If this header is not set, an exchange property of
the same name replaces the outId option.", "constantName":
"org.apache.camel.component.alibaba.sms.constants.SMSHeader [...]
+ "CamelAlibabaSmsRequestId": { "index": 6, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The request ID that Short Message Service returns in the
response to the operation. The producer sets it, unless the exchange fails.",
"constantName":
"org.apache.camel.component.alibaba.sms.constants.SMSHeaders#REQUEST_ID" }
},
"bodyTypes": {
"producerIn": { "carriers": [ "any" ], "description": "Not used: sendSms
takes the phone numbers, sign name, template code and template parameters from
options or headers, such as CamelAlibabaSmsTemplateParam" },
@@ -46,7 +47,7 @@
"endpoint": { "index": 1, "kind": "parameter", "displayName": "Endpoint",
"group": "producer", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "The endpoint of Short Message Service, which
is a host name without http:\/\/ or https:\/\/. The producer sends requests to
it over HTTPS. If not set, the region option determines the endpoint, and one
of the two is required. Not used wh [...]
"outId": { "index": 2, "kind": "parameter", "displayName": "Out Id",
"group": "producer", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "The external transaction ID of the SMS
message. The CamelAlibabaSmsOutId header replaces this option for a request
that the producer sends. If that header is not set, an exchange property of the
same name replaces this option. If none of the [...]
"phoneNumbers": { "index": 3, "kind": "parameter", "displayName": "Phone
Numbers", "group": "producer", "label": "", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": false, "description": "The phone numbers of the recipients,
which are separated by commas. Short Message Service accepts at most 1000 phone
numbers. The CamelAlibabaSmsPhoneNumbers header replaces this option for a
request that the producer sends. If [...]
- "region": { "index": 4, "kind": "parameter", "displayName": "Region",
"group": "producer", "label": "", "required": true, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "The region ID of Short Message Service, for
example cn-hangzhou. Only used when the endpoint option is not set, to
determine the endpoint of Short Message Service. Not used when the smsClient
option is set or autowired." },
+ "region": { "index": 4, "kind": "parameter", "displayName": "Region",
"group": "producer", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "The region ID of Short Message Service, for
example cn-hangzhou. Only used when the endpoint option is not set, to
determine the endpoint of Short Message Service. One of the two options is
required. Not used when the smsClient option is set [...]
"signName": { "index": 5, "kind": "parameter", "displayName": "Sign Name",
"group": "producer", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "The sign name of the SMS message. The value
must be an approved sign name. The CamelAlibabaSmsSignName header replaces this
option for a request that the producer sends. If that header is not set, an
exchange property of the same name r [...]
"templateCode": { "index": 6, "kind": "parameter", "displayName":
"Template Code", "group": "producer", "label": "", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": false, "description": "The template code of the SMS message.
The value must be the code of an approved template. The
CamelAlibabaSmsTemplateCode header replaces this option for a request that the
producer sends. If that header is not set, an exchange [...]
"templateParam": { "index": 7, "kind": "parameter", "displayName":
"Template Param", "group": "producer", "label": "", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": false, "description": "The template parameters of the SMS
message as a JSON string. The JSON string must provide a value for each
variable of the template. The CamelAlibabaSmsTemplateParam header replaces this
option for a request that the producer [...]
diff --git
a/components/camel-alibaba/camel-alibaba-sms/src/main/java/org/apache/camel/component/alibaba/sms/SMSEndpoint.java
b/components/camel-alibaba/camel-alibaba-sms/src/main/java/org/apache/camel/component/alibaba/sms/SMSEndpoint.java
index 81b5b15d2079..2ba2daca536a 100644
---
a/components/camel-alibaba/camel-alibaba-sms/src/main/java/org/apache/camel/component/alibaba/sms/SMSEndpoint.java
+++
b/components/camel-alibaba/camel-alibaba-sms/src/main/java/org/apache/camel/component/alibaba/sms/SMSEndpoint.java
@@ -55,10 +55,9 @@ public class SMSEndpoint extends DefaultEndpoint {
private String operation;
@UriParam(description = "The region ID of Short Message Service, for
example cn-hangzhou. Only used when the endpoint"
- + " option is not set, to determine the endpoint
of Short Message Service. Not used when the"
- + " smsClient option is set or autowired.",
+ + " option is not set, to determine the endpoint
of Short Message Service. One of the two options"
+ + " is required. Not used when the smsClient
option is set or autowired.",
displayName = "Region")
- @Metadata(required = true)
private String region;
@UriParam(description = "The endpoint of Short Message Service, which is a
host name without http:// or https://. The"
diff --git
a/components/camel-alibaba/camel-alibaba-sms/src/main/java/org/apache/camel/component/alibaba/sms/constants/SMSHeaders.java
b/components/camel-alibaba/camel-alibaba-sms/src/main/java/org/apache/camel/component/alibaba/sms/constants/SMSHeaders.java
index 3b338f4d1bc2..6771c4785ad5 100644
---
a/components/camel-alibaba/camel-alibaba-sms/src/main/java/org/apache/camel/component/alibaba/sms/constants/SMSHeaders.java
+++
b/components/camel-alibaba/camel-alibaba-sms/src/main/java/org/apache/camel/component/alibaba/sms/constants/SMSHeaders.java
@@ -20,6 +20,12 @@ import org.apache.camel.spi.Metadata;
public final class SMSHeaders {
+ @Metadata(label = "producer",
+ description = "The operation that the producer performs. This
header replaces the operation option. If this"
+ + " header is not set, an exchange property of the
same name replaces the operation option.",
+ javaType = "String")
+ public static final String OPERATION = SMSProperties.OPERATION;
+
@Metadata(label = "producer",
description = "The phone numbers of the recipients, which are
separated by commas. Short Message Service accepts"
+ " at most 1000 phone numbers. This header
replaces the phoneNumbers option. If this header is not"
diff --git
a/components/camel-alibaba/camel-alibaba-sms/src/main/java/org/apache/camel/component/alibaba/sms/constants/SMSProperties.java
b/components/camel-alibaba/camel-alibaba-sms/src/main/java/org/apache/camel/component/alibaba/sms/constants/SMSProperties.java
index d55cfb349f15..c03c927f325a 100644
---
a/components/camel-alibaba/camel-alibaba-sms/src/main/java/org/apache/camel/component/alibaba/sms/constants/SMSProperties.java
+++
b/components/camel-alibaba/camel-alibaba-sms/src/main/java/org/apache/camel/component/alibaba/sms/constants/SMSProperties.java
@@ -16,29 +16,20 @@
*/
package org.apache.camel.component.alibaba.sms.constants;
-import org.apache.camel.spi.Metadata;
-
public final class SMSProperties {
- @Metadata(label = "producer", description = "Operation to perform",
javaType = "String")
public static final String OPERATION = "CamelAlibabaSmsOperation";
- @Metadata(label = "producer", description = "Phone numbers to send SMS
to", javaType = "String")
public static final String PHONE_NUMBERS = "CamelAlibabaSmsPhoneNumbers";
- @Metadata(label = "producer", description = "SMS sign name", javaType =
"String")
public static final String SIGN_NAME = "CamelAlibabaSmsSignName";
- @Metadata(label = "producer", description = "SMS template code", javaType
= "String")
public static final String TEMPLATE_CODE = "CamelAlibabaSmsTemplateCode";
- @Metadata(label = "producer", description = "SMS template parameters as
JSON", javaType = "String")
public static final String TEMPLATE_PARAM = "CamelAlibabaSmsTemplateParam";
- @Metadata(label = "producer", description = "Out id for the SMS", javaType
= "String")
public static final String OUT_ID = "CamelAlibabaSmsOutId";
- @Metadata(label = "producer", description = "Request id returned by SMS
API", javaType = "String")
public static final String REQUEST_ID = "CamelAlibabaSmsRequestId";
private SMSProperties() {
diff --git
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
index ed04cb27562b..1597253f71b9 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
@@ -6175,6 +6175,13 @@ body.
A body that does not convert to bytes, such as a `Map` or a POJO, is no longer
encrypted as its `toString()`: it now
fails with an `InvalidPayloadException`. Marshal such a body first, for
example to JSON with `marshal().json()`.
+=== camel-alibaba-sms - region is no longer marked as required
+
+The `region` option of `alibaba-sms` is no longer marked as required. To
create the client, the Camel endpoint needs
+the `region` or the `endpoint` option. It needs neither when the `smsClient`
option is set or autowired. So the
+endpoint validation of the catalog no longer reports a URI without `region` as
missing a required option. The behavior
+of the component at runtime does not change.
+
=== camel-pqc - a configured KeyGenerator or KeyAgreement is used by one
exchange at a time
When Camel creates the instance itself, the KEM operations of the `pqc`
component (including the hybrid KEM
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SMSEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SMSEndpointBuilderFactory.java
index 297d3f62f8a7..a04f4216f08e 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SMSEndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SMSEndpointBuilderFactory.java
@@ -102,12 +102,11 @@ public interface SMSEndpointBuilderFactory {
/**
* The region ID of Short Message Service, for example cn-hangzhou.
Only
* used when the endpoint option is not set, to determine the endpoint
- * of Short Message Service. Not used when the smsClient option is set
- * or autowired.
+ * of Short Message Service. One of the two options is required. Not
+ * used when the smsClient option is set or autowired.
*
* The option is a: <code>java.lang.String</code> type.
*
- * Required: true
* Group: producer
*
* @param region the value to set
@@ -419,6 +418,20 @@ public interface SMSEndpointBuilderFactory {
*/
public static final SMSHeaderNameBuilder INSTANCE = new
SMSHeaderNameBuilder();
+ /**
+ * The operation that the producer performs. This header replaces the
+ * operation option. If this header is not set, an exchange property of
+ * the same name replaces the operation option.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AlibabaSmsOperation}.
+ */
+ public String alibabaSmsOperation() {
+ return "CamelAlibabaSmsOperation";
+ }
/**
* The phone numbers of the recipients, which are separated by commas.
* Short Message Service accepts at most 1000 phone numbers. This
header