You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2022/03/22 16:51:59 UTC
[camel] 10/14: CAMEL-17792: Add doc about the message headers of camel-google-secret-manager
This is an automated email from the ASF dual-hosted git repository.
nfilotto pushed a commit to branch CAMEL-17792/doc-message-headers
in repository https://gitbox.apache.org/repos/asf/camel.git
commit b4488c9c46730363cb47cfddb791c5058ca73476
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Tue Mar 22 15:28:51 2022 +0100
CAMEL-17792: Add doc about the message headers of camel-google-secret-manager
---
.../component/google/secret/manager/google-secret-manager.json | 5 +++++
.../src/main/docs/google-secret-manager-component.adoc | 3 +++
.../google/secret/manager/GoogleSecretManagerConstants.java | 6 ++++++
.../google/secret/manager/GoogleSecretManagerEndpoint.java | 2 +-
4 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/components/camel-google/camel-google-secret-manager/src/generated/resources/org/apache/camel/component/google/secret/manager/google-secret-manager.json b/components/camel-google/camel-google-secret-manager/src/generated/resources/org/apache/camel/component/google/secret/manager/google-secret-manager.json
index f6fa45e..1be9b4a14 100644
--- a/components/camel-google/camel-google-secret-manager/src/generated/resources/org/apache/camel/component/google/secret/manager/google-secret-manager.json
+++ b/components/camel-google/camel-google-secret-manager/src/generated/resources/org/apache/camel/component/google/secret/manager/google-secret-manager.json
@@ -25,6 +25,11 @@
"lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during star [...]
"autowiredEnabled": { "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 t [...]
},
+ "headers": {
+ "GoogleSecretManagerOperation": { "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" },
+ "CamelGoogleSecretManagerSecretId": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the secret" },
+ "CamelGoogleSecretManagerVersionId": { "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" }
+ },
"properties": {
"project": { "kind": "path", "displayName": "Project", "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.secret.manager.GoogleSecretManagerConfiguration", "configurationField": "configuration", "description": "The Google Cloud Project Id name related to the Secret Manager" },
"serviceAccountKey": { "kind": "parameter", "displayName": "Service Account Key", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.secret.manager.GoogleSecretManagerConfiguration", "configurationField": "configuration", "description": "Service account key to authenticate an application as a service account" },
diff --git a/components/camel-google/camel-google-secret-manager/src/main/docs/google-secret-manager-component.adoc b/components/camel-google/camel-google-secret-manager/src/main/docs/google-secret-manager-component.adoc
index abd0646..f8b10a3 100644
--- a/components/camel-google/camel-google-secret-manager/src/main/docs/google-secret-manager-component.adoc
+++ b/components/camel-google/camel-google-secret-manager/src/main/docs/google-secret-manager-component.adoc
@@ -83,6 +83,9 @@ include::partial$component-endpoint-options.adoc[]
// endpoint options: START
// endpoint options: END
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
=== Using GCP Secret Manager Properties Source
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 ec02f51..d0311a1 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
@@ -16,9 +16,15 @@
*/
package org.apache.camel.component.google.secret.manager;
+import org.apache.camel.spi.Metadata;
+
public interface GoogleSecretManagerConstants {
+ @Metadata(description = "The operation to perform",
+ javaType = "org.apache.camel.component.google.secret.manager.GoogleSecretManagerOperations")
String OPERATION = "GoogleSecretManagerOperation";
+ @Metadata(description = "The id of the secret", javaType = "String")
String SECRET_ID = "CamelGoogleSecretManagerSecretId";
+ @Metadata(description = "The version of the secret", javaType = "String", defaultValue = "latest")
String VERSION_ID = "CamelGoogleSecretManagerVersionId";
String REPLICATION = "CamelGoogleSecretManagerReplication";
}
diff --git a/components/camel-google/camel-google-secret-manager/src/main/java/org/apache/camel/component/google/secret/manager/GoogleSecretManagerEndpoint.java b/components/camel-google/camel-google-secret-manager/src/main/java/org/apache/camel/component/google/secret/manager/GoogleSecretManagerEndpoint.java
index b2be2a2..00896f0 100644
--- a/components/camel-google/camel-google-secret-manager/src/main/java/org/apache/camel/component/google/secret/manager/GoogleSecretManagerEndpoint.java
+++ b/components/camel-google/camel-google-secret-manager/src/main/java/org/apache/camel/component/google/secret/manager/GoogleSecretManagerEndpoint.java
@@ -33,7 +33,7 @@ import org.apache.camel.support.DefaultEndpoint;
@UriEndpoint(firstVersion = "3.16.0", scheme = "google-secret-manager", title = "Google Secret Manager",
syntax = "google-secret-manager:project", category = {
Category.CLOUD },
- producerOnly = true)
+ producerOnly = true, headersClass = GoogleSecretManagerConstants.class)
public class GoogleSecretManagerEndpoint extends DefaultEndpoint {
@UriParam