You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2024/03/27 08:42:47 UTC

(camel-kamelets) 01/01: Azure CosmosDB Source: Expose Kamelet data type information

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch 1924
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit cbce4db4262bcacc83365f34faa2a3f8e191c486
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Mar 27 09:42:22 2024 +0100

    Azure CosmosDB Source: Expose Kamelet data type information
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 kamelets/azure-cosmosdb-source.kamelet.yaml        | 39 ++++++++++++++++++++--
 .../kamelets/azure-cosmosdb-source.kamelet.yaml    | 39 ++++++++++++++++++++--
 2 files changed, 74 insertions(+), 4 deletions(-)

diff --git a/kamelets/azure-cosmosdb-source.kamelet.yaml b/kamelets/azure-cosmosdb-source.kamelet.yaml
index 9b149bcd..37eae0b5 100644
--- a/kamelets/azure-cosmosdb-source.kamelet.yaml
+++ b/kamelets/azure-cosmosdb-source.kamelet.yaml
@@ -86,9 +86,44 @@ spec:
         type: string
         enum: ["SHARED_ACCOUNT_KEY", "AZURE_IDENTITY"]
         default: "SHARED_ACCOUNT_KEY"
-  types:
+  dataTypes:
     out:
-      mediaType: application/json
+      default: json
+      headers:
+      types:
+        json:
+          format: "application-json"
+          description: Json mapping of Change Feed records
+          mediaType: application/json
+        cloudevents:
+          format: "azure-cosmosdb:application-cloudevents"
+          description: |-
+            Data type transformer converts Azure CosmosDB Change Feed processor response to CloudEvent v1_0 data format. The data
+            type sets Camel specific CloudEvent headers with values extracted from Azure CosmosDB Change Feed processor response.
+          headers:
+            CamelCloudEventID:
+              title: CloudEvent ID
+              description: The Camel exchange id set as event id
+              type: string
+            CamelCloudEventType:
+              title: CloudEvent Type
+              description: The event type
+              default: "org.apache.camel.event.azure.cosmosdb.changes"
+              type: string
+            CamelCloudEventSource:
+              title: CloudEvent Source
+              description: The event source.
+              type: string
+              default: "org.apache.camel.event.azure.cosmosdb.changefeed"
+            CamelCloudEventSubject:
+              title: CloudEvent Subject
+              description: The event subject. 
+              type: string
+              default: "org.apache.camel.event.azure.cosmosdb.changefeed"
+            CamelCloudEventTime:
+              title: CloudEvent Time
+              description: The exchange creation timestamp as event time.
+              type: string
   dependencies:
     - "camel:azure-cosmosdb"
     - "camel:kamelet"
diff --git a/library/camel-kamelets/src/main/resources/kamelets/azure-cosmosdb-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/azure-cosmosdb-source.kamelet.yaml
index 9b149bcd..37eae0b5 100644
--- a/library/camel-kamelets/src/main/resources/kamelets/azure-cosmosdb-source.kamelet.yaml
+++ b/library/camel-kamelets/src/main/resources/kamelets/azure-cosmosdb-source.kamelet.yaml
@@ -86,9 +86,44 @@ spec:
         type: string
         enum: ["SHARED_ACCOUNT_KEY", "AZURE_IDENTITY"]
         default: "SHARED_ACCOUNT_KEY"
-  types:
+  dataTypes:
     out:
-      mediaType: application/json
+      default: json
+      headers:
+      types:
+        json:
+          format: "application-json"
+          description: Json mapping of Change Feed records
+          mediaType: application/json
+        cloudevents:
+          format: "azure-cosmosdb:application-cloudevents"
+          description: |-
+            Data type transformer converts Azure CosmosDB Change Feed processor response to CloudEvent v1_0 data format. The data
+            type sets Camel specific CloudEvent headers with values extracted from Azure CosmosDB Change Feed processor response.
+          headers:
+            CamelCloudEventID:
+              title: CloudEvent ID
+              description: The Camel exchange id set as event id
+              type: string
+            CamelCloudEventType:
+              title: CloudEvent Type
+              description: The event type
+              default: "org.apache.camel.event.azure.cosmosdb.changes"
+              type: string
+            CamelCloudEventSource:
+              title: CloudEvent Source
+              description: The event source.
+              type: string
+              default: "org.apache.camel.event.azure.cosmosdb.changefeed"
+            CamelCloudEventSubject:
+              title: CloudEvent Subject
+              description: The event subject. 
+              type: string
+              default: "org.apache.camel.event.azure.cosmosdb.changefeed"
+            CamelCloudEventTime:
+              title: CloudEvent Time
+              description: The exchange creation timestamp as event time.
+              type: string
   dependencies:
     - "camel:azure-cosmosdb"
     - "camel:kamelet"