From 23ff7416817f46045061604e6af01b5e8e0101b3 Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Fri, 22 May 2026 18:33:54 +0200 Subject: [PATCH] CAMEL-23583: camel-google-{functions,secret-manager,vision,text-to-speech,speech-to-text} - align Exchange header constant names with Camel naming convention (#23467) Renames the Exchange header string values in the Google Cloud component constants from their GoogleCloud / GoogleSecretManager prefixes (which are outside the Camel namespace and therefore not filtered by the default HeaderFilterStrategy) to CamelGoogle, 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). Renamed values: - GoogleCloudFunctions: OPERATION, ENTRY_POINT, RUNTIME, SOURCE_ARCHIVE_URL, RESPONSE_OBJECT - GoogleSecretManager: OPERATION (SECRET_ID, VERSION_ID, REPLICATION were already Camel-prefixed) - GoogleCloudVision: OPERATION, RESPONSE_OBJECT - GoogleCloudTextToSpeech: OPERATION, RESPONSE_OBJECT - GoogleCloudSpeechToText: OPERATION, RESPONSE_OBJECT The Java field names 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 generated Endpoint DSL header accessor names are unchanged (the Camel prefix is stripped when deriving the accessor name); the accessors now return the new values. All existing tests use symbolic constant references and continue to pass. Tracker: CAMEL-23577 Reported by Claude Code on behalf of Andrea Cosentino Signed-off-by: Andrea Cosentino --- .../catalog/components/google-functions.json | 10 ++--- .../components/google-secret-manager.json | 2 +- .../google/functions/google-functions.json | 10 ++--- .../GoogleCloudFunctionsConstants.java | 35 ++++++++++----- .../secret/manager/google-secret-manager.json | 2 +- .../manager/GoogleSecretManagerConstants.java | 2 +- .../pages/camel-4x-upgrade-guide-4_14.adoc | 43 +++++++++++++++++++ ...eCloudFunctionsEndpointBuilderFactory.java | 10 ++--- ...leSecretManagerEndpointBuilderFactory.java | 2 +- 9 files changed, 87 insertions(+), 29 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-functions.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-functions.json index 24a9c9863ec37..1dd94a2159f6e 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-functions.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-functions.json @@ -28,11 +28,11 @@ "autowiredEnabled": { "index": 1, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc." } }, "headers": { - "GoogleCloudFunctionsOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.camel.component.google.functions.GoogleCloudFunctionsOperations", "enum": [ "listFunctions", "getFunction", "callFunction", "generateDownloadUrl", "generateUploadUrl", "createFunction", "updateFunction", "deleteFunction" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform", "constantName": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConstants#OPERATION" }, - "GoogleCloudFunctionsEntryPoint": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the function (as defined in source code) that will be executed. Used for createFunction operation", "constantName": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConstants#ENTRY_POINT" }, - "GoogleCloudFunctionsRuntime": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The runtime in which to run the function. Possible values are: nodejs10 nodejs12 nodejs14 python37 python38 python39 go111 go113 java11 dotnet3 ruby26 nodejs6 nodejs8 Used for createFunction operation.", "constantName": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConstants#RUNTIME" }, - "GoogleCloudFunctionsSourceArchiveUrl": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Google Cloud Storage URL, starting with gs:\/\/, pointing to the zip archive which contains the function. Used for createFunction operation.", "constantName": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConstants#SOURCE_ARCHIVE_URL" }, - "GoogleCloudFunctionsResponseObject": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The response object resulting from the Google Functions Client invocation", "constantName": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConstants#RESPONSE_OBJECT" } + "CamelGoogleCloudFunctionsOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.camel.component.google.functions.GoogleCloudFunctionsOperations", "enum": [ "listFunctions", "getFunction", "callFunction", "generateDownloadUrl", "generateUploadUrl", "createFunction", "updateFunction", "deleteFunction" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform", "constantName": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConstants#OPERATION" }, + "CamelGoogleCloudFunctionsEntryPoint": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the function (as defined in source code) that will be executed. Used for createFunction operation", "constantName": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConstants#ENTRY_POINT" }, + "CamelGoogleCloudFunctionsRuntime": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The runtime in which to run the function. Possible values are: nodejs10 nodejs12 nodejs14 python37 python38 python39 go111 go113 java11 dotnet3 ruby26 nodejs6 nodejs8 Used for createFunction operation.", "constantName": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConstants#RUNTIME" }, + "CamelGoogleCloudFunctionsSourceArchiveUrl": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Google Cloud Storage URL, starting with gs:\/\/, pointing to the zip archive which contains the function. Used for createFunction operation.", "constantName": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConstants#SOURCE_ARCHIVE_URL" }, + "CamelGoogleCloudFunctionsResponseObject": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The response object resulting from the Google Functions Client invocation", "constantName": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConstants#RESPONSE_OBJECT" } }, "properties": { "functionName": { "index": 0, "kind": "path", "displayName": "Function Name", "group": "common", "label": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConfiguration", "configurationField": "configuration", "description": "The user-defined name of the function" }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-secret-manager.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-secret-manager.json index f3ad40c1d2231..33783f7a82735 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-secret-manager.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-secret-manager.json @@ -29,7 +29,7 @@ "autowiredEnabled": { "index": 1, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc." } }, "headers": { - "GoogleSecretManagerOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.camel.component.google.secret.manager.GoogleSecretManagerOperations", "enum": [ "createSecret", "getSecretVersion", "deleteSecret", "listSecrets" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform", "constantName": "org.apache.camel.component.google.secret.manager.GoogleSecretManagerConstants#OPERATION" }, + "CamelGoogleSecretManagerOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.camel.component.google.secret.manager.GoogleSecretManagerOperations", "enum": [ "createSecret", "getSecretVersion", "deleteSecret", "listSecrets" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform", "constantName": "org.apache.camel.component.google.secret.manager.GoogleSecretManagerConstants#OPERATION" }, "CamelGoogleSecretManagerSecretId": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the secret", "constantName": "org.apache.camel.component.google.secret.manager.GoogleSecretManagerConstants#SECRET_ID" }, "CamelGoogleSecretManagerVersionId": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "latest", "description": "The version of the secret", "constantName": "org.apache.camel.component.google.secret.manager.GoogleSecretManagerConstants#VERSION_ID" } }, diff --git a/components/camel-google/camel-google-functions/src/generated/resources/META-INF/org/apache/camel/component/google/functions/google-functions.json b/components/camel-google/camel-google-functions/src/generated/resources/META-INF/org/apache/camel/component/google/functions/google-functions.json index 24a9c9863ec37..1dd94a2159f6e 100644 --- a/components/camel-google/camel-google-functions/src/generated/resources/META-INF/org/apache/camel/component/google/functions/google-functions.json +++ b/components/camel-google/camel-google-functions/src/generated/resources/META-INF/org/apache/camel/component/google/functions/google-functions.json @@ -28,11 +28,11 @@ "autowiredEnabled": { "index": 1, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc." } }, "headers": { - "GoogleCloudFunctionsOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.camel.component.google.functions.GoogleCloudFunctionsOperations", "enum": [ "listFunctions", "getFunction", "callFunction", "generateDownloadUrl", "generateUploadUrl", "createFunction", "updateFunction", "deleteFunction" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform", "constantName": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConstants#OPERATION" }, - "GoogleCloudFunctionsEntryPoint": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the function (as defined in source code) that will be executed. Used for createFunction operation", "constantName": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConstants#ENTRY_POINT" }, - "GoogleCloudFunctionsRuntime": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The runtime in which to run the function. Possible values are: nodejs10 nodejs12 nodejs14 python37 python38 python39 go111 go113 java11 dotnet3 ruby26 nodejs6 nodejs8 Used for createFunction operation.", "constantName": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConstants#RUNTIME" }, - "GoogleCloudFunctionsSourceArchiveUrl": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Google Cloud Storage URL, starting with gs:\/\/, pointing to the zip archive which contains the function. Used for createFunction operation.", "constantName": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConstants#SOURCE_ARCHIVE_URL" }, - "GoogleCloudFunctionsResponseObject": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The response object resulting from the Google Functions Client invocation", "constantName": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConstants#RESPONSE_OBJECT" } + "CamelGoogleCloudFunctionsOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.camel.component.google.functions.GoogleCloudFunctionsOperations", "enum": [ "listFunctions", "getFunction", "callFunction", "generateDownloadUrl", "generateUploadUrl", "createFunction", "updateFunction", "deleteFunction" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform", "constantName": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConstants#OPERATION" }, + "CamelGoogleCloudFunctionsEntryPoint": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the function (as defined in source code) that will be executed. Used for createFunction operation", "constantName": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConstants#ENTRY_POINT" }, + "CamelGoogleCloudFunctionsRuntime": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The runtime in which to run the function. Possible values are: nodejs10 nodejs12 nodejs14 python37 python38 python39 go111 go113 java11 dotnet3 ruby26 nodejs6 nodejs8 Used for createFunction operation.", "constantName": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConstants#RUNTIME" }, + "CamelGoogleCloudFunctionsSourceArchiveUrl": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Google Cloud Storage URL, starting with gs:\/\/, pointing to the zip archive which contains the function. Used for createFunction operation.", "constantName": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConstants#SOURCE_ARCHIVE_URL" }, + "CamelGoogleCloudFunctionsResponseObject": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The response object resulting from the Google Functions Client invocation", "constantName": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConstants#RESPONSE_OBJECT" } }, "properties": { "functionName": { "index": 0, "kind": "path", "displayName": "Function Name", "group": "common", "label": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConfiguration", "configurationField": "configuration", "description": "The user-defined name of the function" }, diff --git a/components/camel-google/camel-google-functions/src/main/java/org/apache/camel/component/google/functions/GoogleCloudFunctionsConstants.java b/components/camel-google/camel-google-functions/src/main/java/org/apache/camel/component/google/functions/GoogleCloudFunctionsConstants.java index d900d3772bcc6..e08c81e40f3dd 100644 --- a/components/camel-google/camel-google-functions/src/main/java/org/apache/camel/component/google/functions/GoogleCloudFunctionsConstants.java +++ b/components/camel-google/camel-google-functions/src/main/java/org/apache/camel/component/google/functions/GoogleCloudFunctionsConstants.java @@ -21,20 +21,35 @@ public interface GoogleCloudFunctionsConstants { @Metadata(description = "The operation to perform", javaType = "org.apache.camel.component.google.functions.GoogleCloudFunctionsOperations") - String OPERATION = "GoogleCloudFunctionsOperation"; + String OPERATION = "CamelGoogleCloudFunctionsOperation"; @Metadata(description = "The name of the function (as defined in source code) that will be executed. Used for createFunction operation", javaType = "String") - String ENTRY_POINT = "GoogleCloudFunctionsEntryPoint"; - @Metadata(description = "The runtime in which to run the function.\n\nPossible values are:\n\n" + - "* `nodejs10`\n* `nodejs12`\n* `nodejs14`\n* `python37`\n* `python38`\n* `python39`\n* `go111`\n* `go113`\n" - + - "* `java11`\n* `dotnet3`\n* `ruby26`\n* `nodejs6`\n* `nodejs8`\n" + - "\nUsed for createFunction operation.", + String ENTRY_POINT = "CamelGoogleCloudFunctionsEntryPoint"; + @Metadata(description = """ + The runtime in which to run the function. + + Possible values are: + + * `nodejs10` + * `nodejs12` + * `nodejs14` + * `python37` + * `python38` + * `python39` + * `go111` + * `go113` + * `java11` + * `dotnet3` + * `ruby26` + * `nodejs6` + * `nodejs8` + + Used for createFunction operation.""", javaType = "String") - String RUNTIME = "GoogleCloudFunctionsRuntime"; + String RUNTIME = "CamelGoogleCloudFunctionsRuntime"; @Metadata(description = "The Google Cloud Storage URL, starting with `gs://`, pointing to the zip archive which contains the function. Used for createFunction operation.", javaType = "String") - String SOURCE_ARCHIVE_URL = "GoogleCloudFunctionsSourceArchiveUrl"; + String SOURCE_ARCHIVE_URL = "CamelGoogleCloudFunctionsSourceArchiveUrl"; @Metadata(description = "The response object resulting from the Google Functions Client invocation", javaType = "Object") - String RESPONSE_OBJECT = "GoogleCloudFunctionsResponseObject"; + String RESPONSE_OBJECT = "CamelGoogleCloudFunctionsResponseObject"; } diff --git a/components/camel-google/camel-google-secret-manager/src/generated/resources/META-INF/org/apache/camel/component/google/secret/manager/google-secret-manager.json b/components/camel-google/camel-google-secret-manager/src/generated/resources/META-INF/org/apache/camel/component/google/secret/manager/google-secret-manager.json index f3ad40c1d2231..33783f7a82735 100644 --- a/components/camel-google/camel-google-secret-manager/src/generated/resources/META-INF/org/apache/camel/component/google/secret/manager/google-secret-manager.json +++ b/components/camel-google/camel-google-secret-manager/src/generated/resources/META-INF/org/apache/camel/component/google/secret/manager/google-secret-manager.json @@ -29,7 +29,7 @@ "autowiredEnabled": { "index": 1, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc." } }, "headers": { - "GoogleSecretManagerOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.camel.component.google.secret.manager.GoogleSecretManagerOperations", "enum": [ "createSecret", "getSecretVersion", "deleteSecret", "listSecrets" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform", "constantName": "org.apache.camel.component.google.secret.manager.GoogleSecretManagerConstants#OPERATION" }, + "CamelGoogleSecretManagerOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.camel.component.google.secret.manager.GoogleSecretManagerOperations", "enum": [ "createSecret", "getSecretVersion", "deleteSecret", "listSecrets" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform", "constantName": "org.apache.camel.component.google.secret.manager.GoogleSecretManagerConstants#OPERATION" }, "CamelGoogleSecretManagerSecretId": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the secret", "constantName": "org.apache.camel.component.google.secret.manager.GoogleSecretManagerConstants#SECRET_ID" }, "CamelGoogleSecretManagerVersionId": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "latest", "description": "The version of the secret", "constantName": "org.apache.camel.component.google.secret.manager.GoogleSecretManagerConstants#VERSION_ID" } }, diff --git a/components/camel-google/camel-google-secret-manager/src/main/java/org/apache/camel/component/google/secret/manager/GoogleSecretManagerConstants.java b/components/camel-google/camel-google-secret-manager/src/main/java/org/apache/camel/component/google/secret/manager/GoogleSecretManagerConstants.java index d0311a1c470fc..1f6de1ab1c29b 100644 --- a/components/camel-google/camel-google-secret-manager/src/main/java/org/apache/camel/component/google/secret/manager/GoogleSecretManagerConstants.java +++ b/components/camel-google/camel-google-secret-manager/src/main/java/org/apache/camel/component/google/secret/manager/GoogleSecretManagerConstants.java @@ -21,7 +21,7 @@ public interface GoogleSecretManagerConstants { @Metadata(description = "The operation to perform", javaType = "org.apache.camel.component.google.secret.manager.GoogleSecretManagerOperations") - String OPERATION = "GoogleSecretManagerOperation"; + String OPERATION = "CamelGoogleSecretManagerOperation"; @Metadata(description = "The id of the secret", javaType = "String") String SECRET_ID = "CamelGoogleSecretManagerSecretId"; @Metadata(description = "The version of the secret", javaType = "String", defaultValue = "latest") diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_14.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_14.adoc index c495956620971..606f9a79c7958 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_14.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_14.adoc @@ -515,6 +515,49 @@ A new accessor `web3jOperation()` is also generated for `Web3jConstants.OPERATIO previously, so no DSL accessor renaming applies to it. +=== camel-google-functions / camel-google-secret-manager - potential breaking change + +The Exchange header constants in these Google Cloud components carried a +`GoogleCloud` / `GoogleSecretManager` prefix that is not in the +`Camel` namespace, so the default `HeaderFilterStrategy` did not filter them +at transport boundaries. They have been renamed to add the `Camel` prefix. +The Java field names are unchanged; only the header string values have changed: + +[options="header"] +|=== +| Constant | Previous value | New value +| `GoogleCloudFunctionsConstants.OPERATION` | `GoogleCloudFunctionsOperation` | `CamelGoogleCloudFunctionsOperation` +| `GoogleCloudFunctionsConstants.ENTRY_POINT` | `GoogleCloudFunctionsEntryPoint` | `CamelGoogleCloudFunctionsEntryPoint` +| `GoogleCloudFunctionsConstants.RUNTIME` | `GoogleCloudFunctionsRuntime` | `CamelGoogleCloudFunctionsRuntime` +| `GoogleCloudFunctionsConstants.SOURCE_ARCHIVE_URL` | `GoogleCloudFunctionsSourceArchiveUrl` | `CamelGoogleCloudFunctionsSourceArchiveUrl` +| `GoogleCloudFunctionsConstants.RESPONSE_OBJECT` | `GoogleCloudFunctionsResponseObject` | `CamelGoogleCloudFunctionsResponseObject` +| `GoogleSecretManagerConstants.OPERATION` | `GoogleSecretManagerOperation` | `CamelGoogleSecretManagerOperation` +| `GoogleCloudVisionConstants.OPERATION` | `GoogleCloudVisionOperation` | `CamelGoogleCloudVisionOperation` +| `GoogleCloudVisionConstants.RESPONSE_OBJECT` | `GoogleCloudVisionResponseObject` | `CamelGoogleCloudVisionResponseObject` +| `GoogleCloudTextToSpeechConstants.OPERATION` | `GoogleCloudTextToSpeechOperation` | `CamelGoogleCloudTextToSpeechOperation` +| `GoogleCloudTextToSpeechConstants.RESPONSE_OBJECT` | `GoogleCloudTextToSpeechResponseObject` | `CamelGoogleCloudTextToSpeechResponseObject` +| `GoogleCloudSpeechToTextConstants.OPERATION` | `GoogleCloudSpeechToTextOperation` | `CamelGoogleCloudSpeechToTextOperation` +| `GoogleCloudSpeechToTextConstants.RESPONSE_OBJECT` | `GoogleCloudSpeechToTextResponseObject` | `CamelGoogleCloudSpeechToTextResponseObject` +|=== + +The `GoogleSecretManagerConstants.SECRET_ID`, `VERSION_ID` and `REPLICATION` +constants were already `Camel`-prefixed (`CamelGoogleSecretManagerSecretId`, +etc.) and are unchanged. + +Routes that reference the constants symbolically (for example +`setHeader(GoogleCloudFunctionsConstants.OPERATION, ...)`) continue to work +without changes. Routes that set the header by its literal string value (for +example `setHeader("GoogleCloudFunctionsOperation", ...)`) must be updated to +use the new value (`setHeader("CamelGoogleCloudFunctionsOperation", ...)`). + +The generated Endpoint DSL header accessor names are unchanged (for example +`googleCloudFunctionsOperation()`), since the `Camel` prefix is stripped when +deriving the accessor name; the accessors now return the new `Camel`-prefixed +values. + + +NOTE: The companion rename for `camel-google-vision`, `camel-google-text-to-speech` and `camel-google-speech-to-text` from the same main-branch PR (#23467) is NOT backported to 4.14.x because those components were added after the 4.14.x branch point and do not exist on this maintenance branch. + == Upgrading from 4.14.5 to 4.14.6 === camel-platform-http-main diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GoogleCloudFunctionsEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GoogleCloudFunctionsEndpointBuilderFactory.java index 5f8dce0f2181f..a22e1e96eb128 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GoogleCloudFunctionsEndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GoogleCloudFunctionsEndpointBuilderFactory.java @@ -314,7 +314,7 @@ public static class GoogleCloudFunctionsHeaderNameBuilder { * @return the name of the header {@code GoogleCloudFunctionsOperation}. */ public String googleCloudFunctionsOperation() { - return "GoogleCloudFunctionsOperation"; + return "CamelGoogleCloudFunctionsOperation"; } /** * The name of the function (as defined in source code) that will be @@ -328,7 +328,7 @@ public String googleCloudFunctionsOperation() { * GoogleCloudFunctionsEntryPoint}. */ public String googleCloudFunctionsEntryPoint() { - return "GoogleCloudFunctionsEntryPoint"; + return "CamelGoogleCloudFunctionsEntryPoint"; } /** * The runtime in which to run the function. Possible values are: @@ -343,7 +343,7 @@ public String googleCloudFunctionsEntryPoint() { * @return the name of the header {@code GoogleCloudFunctionsRuntime}. */ public String googleCloudFunctionsRuntime() { - return "GoogleCloudFunctionsRuntime"; + return "CamelGoogleCloudFunctionsRuntime"; } /** * The Google Cloud Storage URL, starting with gs://, pointing to the @@ -358,7 +358,7 @@ public String googleCloudFunctionsRuntime() { * GoogleCloudFunctionsSourceArchiveUrl}. */ public String googleCloudFunctionsSourceArchiveUrl() { - return "GoogleCloudFunctionsSourceArchiveUrl"; + return "CamelGoogleCloudFunctionsSourceArchiveUrl"; } /** * The response object resulting from the Google Functions Client @@ -372,7 +372,7 @@ public String googleCloudFunctionsSourceArchiveUrl() { * GoogleCloudFunctionsResponseObject}. */ public String googleCloudFunctionsResponseObject() { - return "GoogleCloudFunctionsResponseObject"; + return "CamelGoogleCloudFunctionsResponseObject"; } } static GoogleCloudFunctionsEndpointBuilder endpointBuilder(String componentName, String path) { diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GoogleSecretManagerEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GoogleSecretManagerEndpointBuilderFactory.java index 4bca4c0256240..c869962ef1cd6 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GoogleSecretManagerEndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GoogleSecretManagerEndpointBuilderFactory.java @@ -286,7 +286,7 @@ public static class GoogleSecretManagerHeaderNameBuilder { * @return the name of the header {@code GoogleSecretManagerOperation}. */ public String googleSecretManagerOperation() { - return "GoogleSecretManagerOperation"; + return "CamelGoogleSecretManagerOperation"; } /** * The id of the secret.