Skip to content

CAMEL-23575: camel-mongodb-gridfs - align Exchange header constant names with Camel naming convention#23413

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

CAMEL-23575: camel-mongodb-gridfs - align Exchange header constant names with Camel naming convention#23413
oscerd merged 1 commit into
apache:mainfrom
oscerd:fix/CAMEL-23575

Conversation

@oscerd
Copy link
Copy Markdown
Contributor

@oscerd oscerd commented May 21, 2026

Summary

Aligns the values of the Exchange header constants in GridFsConstants (camel-mongodb-gridfs) with the standard Camel<Component><Field> naming convention used across the rest of the component catalog. Brings the component in line with the parent camel-mongodb component, where MongoDbConstants.OPERATION_HEADER is already CamelMongoDbOperation.

The Java field names are unchanged, so routes and code referencing the constants symbolically (e.g. GridFsConstants.GRIDFS_OPERATION, GridFsConstants.GRIDFS_OBJECT_ID) continue to work without modification.

Renames (string values only)

Constant Before After
GRIDFS_OPERATION gridfs.operation CamelGridFsOperation
GRIDFS_METADATA gridfs.metadata CamelGridFsMetadata
GRIDFS_CHUNKSIZE gridfs.chunksize CamelGridFsChunkSize
GRIDFS_OBJECT_ID gridfs.objectid CamelGridFsObjectId
GRIDFS_FILE_ID_PRODUCED gridfs.fileid CamelGridFsFileId

Cascading regeneration

The Endpoint DSL header accessors on GridFsHeaderNameBuilder got renamed accordingly (gridfsOperation() -> gridFsOperation(), etc.). Both the constant-value rename and the DSL-accessor rename are documented in camel-4x-upgrade-guide-4_21.adoc.

Context

Consistent with the same alignment recently applied to camel-lucene (CAMEL-23509), camel-jgroups (CAMEL-23510), camel-jgroups-raft (CAMEL-23511), and camel-cxf (CAMEL-23526). Affects 4.21.0 (this PR) and is queued for backport to 4.18.x / 4.14.x — the constants are identical on both maintenance branches.

Test plan

  • Module-local build: mvn -pl components/camel-mongodb-gridfs -am install — green
  • Full reactor sanity build: mvn clean install -DskipTests from repo root — green; the catalog and Endpoint DSL regenerated artifacts are included in the commit
  • Existing tests reference constants symbolically (GridFsConstants.GRIDFS_OPERATION etc.), so no test-source changes are needed
  • Upgrade-guide entry mirrors the camel-lucene / camel-couchdb pattern

Reported by Claude Code on behalf of Andrea Cosentino.

…mes with Camel naming convention

Renames the values of the Exchange header constants in GridFsConstants to
follow the standard Camel<Component><Field> naming convention used across
the rest of the component catalog, bringing camel-mongodb-gridfs in line
with the parent camel-mongodb component
(MongoDbConstants.OPERATION_HEADER = "CamelMongoDbOperation").

The Java field names are unchanged so routes/code referencing the
constants symbolically continue to work as-is:

  gridfs.operation -> CamelGridFsOperation
  gridfs.metadata  -> CamelGridFsMetadata
  gridfs.chunksize -> CamelGridFsChunkSize
  gridfs.objectid  -> CamelGridFsObjectId
  gridfs.fileid    -> CamelGridFsFileId

The cascading rename of the auto-generated Endpoint DSL accessors on
GridFsHeaderNameBuilder is included (gridfsOperation() -> gridFsOperation(),
etc.) along with the regenerated component catalog. The 4.21
upgrade-guide entry documents both the constant-value rename and the
DSL-accessor rename for routes using the literal string keys or the
fluent builder methods.

Consistent with the same alignment applied to camel-lucene (CAMEL-23509),
camel-jgroups (CAMEL-23510), camel-jgroups-raft (CAMEL-23511), and
camel-cxf (CAMEL-23526).

Reported by Claude Code on behalf of Andrea Cosentino.

Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
@oscerd oscerd requested review from davsclaus and orpiske May 21, 2026 09:51
@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-mongodb-gridfs
  • docs
  • dsl/camel-endpointdsl
All tested modules (10 modules)
  • Camel :: Catalog :: Camel Catalog
  • Camel :: Endpoint DSL
  • Camel :: JBang :: MCP
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: Launcher :: Container
  • Camel :: MongoDB GridFS
  • Camel :: YAML DSL :: Validator
  • Camel :: YAML DSL :: Validator Maven Plugin

⚙️ View full build and test results

@oscerd oscerd merged commit 8f0b1ac into apache:main May 21, 2026
7 checks passed
@oscerd oscerd deleted the fix/CAMEL-23575 branch May 21, 2026 11:45
oscerd added a commit that referenced this pull request May 22, 2026
…mes with Camel naming convention (#23413) (#23473)

Renames the values of the Exchange header constants in GridFsConstants to
follow the standard Camel<Component><Field> naming convention used across
the rest of the component catalog, bringing camel-mongodb-gridfs in line
with the parent camel-mongodb component
(MongoDbConstants.OPERATION_HEADER = "CamelMongoDbOperation").

The Java field names are unchanged so routes/code referencing the
constants symbolically continue to work as-is:

  gridfs.operation -> CamelGridFsOperation
  gridfs.metadata  -> CamelGridFsMetadata
  gridfs.chunksize -> CamelGridFsChunkSize
  gridfs.objectid  -> CamelGridFsObjectId
  gridfs.fileid    -> CamelGridFsFileId

The cascading rename of the auto-generated Endpoint DSL accessors on
GridFsHeaderNameBuilder is included (gridfsOperation() -> gridFsOperation(),
etc.) along with the regenerated component catalog. The upgrade-guide
entry for this change is added on the main branch (per the backport
upgrade-guide policy).

Consistent with the same alignment applied to camel-lucene (CAMEL-23509),
camel-jgroups (CAMEL-23510), camel-jgroups-raft (CAMEL-23511), and
camel-cxf (CAMEL-23526).

Reported by Claude Code on behalf of Andrea Cosentino.

(cherry picked from commit 8f0b1ac)

Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
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.

2 participants