Skip to content

CAMEL-23508: camel-elasticsearch-rest-client - align Exchange header constant names with Camel naming convention#23212

Merged
oscerd merged 1 commit into
apache:mainfrom
oscerd:fix/CAMEL-23508
May 14, 2026
Merged

CAMEL-23508: camel-elasticsearch-rest-client - align Exchange header constant names with Camel naming convention#23212
oscerd merged 1 commit into
apache:mainfrom
oscerd:fix/CAMEL-23508

Conversation

@oscerd
Copy link
Copy Markdown
Contributor

@oscerd oscerd commented May 14, 2026

Summary

Rename the string values of the ElasticSearchRestClientConstant Exchange
header constants to follow the CamelElasticsearch* prefix used by every
other component in the catalog (CamelSqlQuery, CamelMongoDbCriteria,
CamelCqlQuery, etc.). Java field names are unchanged - only the string
values change.

Constant Previous value New value
ID ID CamelElasticsearchId
SEARCH_QUERY SEARCH_QUERY CamelElasticsearchSearchQuery
INDEX_SETTINGS INDEX_SETTINGS CamelElasticsearchIndexSettings
INDEX_NAME INDEX_NAME CamelElasticsearchIndexName
OPERATION OPERATION CamelElasticsearchOperation

JIRA: https://issues.apache.org/jira/browse/CAMEL-23508

Changes

  • ElasticSearchRestClientConstant.java: rename the five header constant
    values to the CamelElasticsearch* prefix.
  • elasticsearch-rest-client-component.adoc: update narrative text and
    Java DSL examples to reference the new header names.
  • camel-4x-upgrade-guide-4_21.adoc: add a section documenting the
    rename, the affected constants, and the migration path for routes that
    set the header by literal string.
  • Regenerated downstream artifacts (component catalog mirror, component
    JSON metadata, endpoint DSL builder).

Routes that reference the constants symbolically
(ElasticSearchRestClientConstant.SEARCH_QUERY, etc.) continue to work
without changes. Routes that hard-code the literal "SEARCH_QUERY" (or
the other old values) need to switch to the new strings.

Test plan

  • mvn verify in components/camel-elasticsearch-rest-client -
    integration tests pass (2/2).
  • Full reactor mvn clean install -DskipTests from repo root -
    BUILD SUCCESS. All regen artifacts related to this change
    committed; unrelated stale regen (jbang configuration metadata)
    reverted.
  • CI green.

Claude Code (Opus 4.7) on behalf of @oscerd.

@oscerd oscerd requested review from davsclaus and gzurowski May 14, 2026 09:24
…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>
@github-actions
Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions
Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • catalog/camel-catalog
  • components/camel-elasticsearch-rest-client
  • docs
  • dsl/camel-endpointdsl
All tested modules (10 modules)
  • Camel :: Catalog :: Camel Catalog
  • Camel :: ElasticSearch Rest Client
  • Camel :: Endpoint DSL
  • Camel :: JBang :: MCP
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: Launcher :: Container
  • Camel :: YAML DSL :: Validator
  • Camel :: YAML DSL :: Validator Maven Plugin

⚙️ View full build and test results

@oscerd oscerd merged commit 81f3a62 into apache:main May 14, 2026
7 checks passed
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants