Skip to content

[backport camel-4.18.x] CAMEL-23578: camel-web3j - align Exchange header constant names with Camel naming convention#23501

Open
oscerd wants to merge 1 commit into
apache:camel-4.18.xfrom
oscerd:backport/23435-to-camel-4.18.x
Open

[backport camel-4.18.x] CAMEL-23578: camel-web3j - align Exchange header constant names with Camel naming convention#23501
oscerd wants to merge 1 commit into
apache:camel-4.18.xfrom
oscerd:backport/23435-to-camel-4.18.x

Conversation

@oscerd
Copy link
Copy Markdown
Contributor

@oscerd oscerd commented May 25, 2026

Backport of #23435 to camel-4.18.x

Cherry-pick of squash-merge commit 860b33fb32e from #23435 (CAMEL-23578: camel-web3j - align Exchange header constant names with Camel naming convention).

Backport adjustments

  • Component sources, generated files (catalog/endpoint DSL), and tests auto-merged cleanly from the original commit.
  • The upgrade-guide hunk in the original PR targeted camel-4x-upgrade-guide-4_21.adoc, which only lives on main. The equivalent entry has been added to camel-4x-upgrade-guide-4_18.adoc in the 4.18.3 section as === camel-web3j - potential breaking change, matching the convention used by the merged camel-jira backport already present there.
  • Full-reactor sanity build (mvn clean install -DskipTests) passed locally in ~9m.

Part of the CAMEL-23577 header-naming-convention sweep.

Claude Code on behalf of Andrea Cosentino

…Camel naming convention (apache#23435)

Renames the Exchange header string values in Web3jConstants from non-Camel
prefixed values (OPERATION, FROM_ADDRESS, TO_ADDRESS, VALUE,
SIGNED_TRANSACTION_DATA, SHA3_HASH_OF_DATA_TO_SIGN, ETH_HASHRATE,
GAS_PRICE, GAS_LIMIT, ...) to CamelWeb3j<Name>, following the convention
used across the rest of the Camel component catalog and matching the
pattern established in CAMEL-23526 (camel-cxf), CAMEL-23522 (camel-mail),
CAMEL-23461 (camel-aws-bedrock), CAMEL-23532 (camel-vertx-websocket /
camel-atmosphere-websocket / camel-iggy), and CAMEL-23576 (camel-jira).

The Java field names (OPERATION, FROM_ADDRESS, ...) are unchanged so
routes referencing the constants symbolically continue to work; routes
using the literal string values must be updated (documented in the 4.21
upgrade guide). The producer-side dispatch operation identifiers
(WEB3_CLIENT_VERSION, ETH_GAS_PRICE, ETH_SEND_TRANSACTION, ...) keep
their previous string values because they are operation enum values
rather than Exchange header names; only ETH_HASHRATE is dual-purpose
(both an operation identifier and an input header) and is therefore
renamed alongside the other header names.

The OPERATION constant gains an @metadata annotation so it now appears
in the catalog as the producer dispatch header.

The generated Endpoint DSL header accessors on Web3jHeaderNameBuilder
have been renamed accordingly (fromAddress() -> web3jFromAddress(),
toAddress() -> web3jToAddress(), ethHashrate() -> web3jEthHashrate(),
iD() -> web3jId(), ...). Updates the tests that used
Web3jConstants.OPERATION.toLowerCase() as the endpoint URI parameter
name to use the literal "operation" parameter (the URI parameter
controls the configuration.operation field and is unrelated to the
header rename).

Tracker: CAMEL-23577

Reported by Claude Code on behalf of Andrea Cosentino

Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
@oscerd oscerd added the backport indicate that a Pull request is a backport from a fix from the main branch label May 25, 2026
@oscerd oscerd requested review from davsclaus and gnodet May 25, 2026 08:16
Copy link
Copy Markdown
Contributor

@gnodet gnodet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thorough backport of camel-web3j header rename to 4.18.x. All header constants renamed from SCREAMING_SNAKE_CASE to CamelWeb3j* form. Constants, catalog JSON, Endpoint DSL accessors, tests, documentation, and upgrade guide all updated consistently. Large diff (1200+ lines) but it's a mechanical rename across all the expected artifacts.

LGTM.

Claude Code on behalf of Guillaume Nodet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport indicate that a Pull request is a backport from a fix from the main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants