CAMEL-23508: camel-elasticsearch-rest-client - align Exchange header constant names with Camel naming convention#23212
Merged
Merged
Conversation
Croway
approved these changes
May 14, 2026
davsclaus
approved these changes
May 14, 2026
…constant names with Camel naming convention Rename the string values of ElasticSearchRestClientConstant.ID, SEARCH_QUERY, INDEX_SETTINGS, INDEX_NAME and OPERATION to follow the CamelElasticsearch* prefix used across the rest of the component catalog. Java field names are unchanged. Update narrative and example references in the component .adoc, and add a 4.21 upgrade-guide entry documenting the change. Regenerated catalog and endpoint DSL artifacts. _Claude Code (Opus 4.7) on behalf of Andrea Cosentino_ Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
Contributor
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
Contributor
|
🧪 CI tested the following changed modules:
All tested modules (10 modules)
|
oscerd
added a commit
that referenced
this pull request
May 15, 2026
…constant names with Camel naming convention (#23244) Rename the Exchange header string values in ElasticSearchRestClientConstant from raw uppercase (ID, SEARCH_QUERY, INDEX_SETTINGS, INDEX_NAME, OPERATION) to the Camel naming convention (CamelElasticsearchId, CamelElasticsearchSearchQuery, CamelElasticsearchIndexSettings, CamelElasticsearchIndexName, CamelElasticsearchOperation). The Java field names are unchanged so routes referencing the constants symbolically continue to work. Routes using the literal string value must be updated. Adds an entry to the 4.21 upgrade guide and regenerates the affected component metadata, catalog, and endpoint DSL. Closes #23212
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rename the string values of the
ElasticSearchRestClientConstantExchangeheader constants to follow the
CamelElasticsearch*prefix used by everyother component in the catalog (
CamelSqlQuery,CamelMongoDbCriteria,CamelCqlQuery, etc.). Java field names are unchanged - only the stringvalues change.
IDIDCamelElasticsearchIdSEARCH_QUERYSEARCH_QUERYCamelElasticsearchSearchQueryINDEX_SETTINGSINDEX_SETTINGSCamelElasticsearchIndexSettingsINDEX_NAMEINDEX_NAMECamelElasticsearchIndexNameOPERATIONOPERATIONCamelElasticsearchOperationJIRA: https://issues.apache.org/jira/browse/CAMEL-23508
Changes
ElasticSearchRestClientConstant.java: rename the five header constantvalues to the
CamelElasticsearch*prefix.elasticsearch-rest-client-component.adoc: update narrative text andJava DSL examples to reference the new header names.
camel-4x-upgrade-guide-4_21.adoc: add a section documenting therename, the affected constants, and the migration path for routes that
set the header by literal string.
JSON metadata, endpoint DSL builder).
Routes that reference the constants symbolically
(
ElasticSearchRestClientConstant.SEARCH_QUERY, etc.) continue to workwithout changes. Routes that hard-code the literal
"SEARCH_QUERY"(orthe other old values) need to switch to the new strings.
Test plan
mvn verifyincomponents/camel-elasticsearch-rest-client-integration tests pass (2/2).
mvn clean install -DskipTestsfrom repo root -BUILD SUCCESS. All regen artifacts related to this change
committed; unrelated stale regen (jbang configuration metadata)
reverted.
Claude Code (Opus 4.7) on behalf of @oscerd.