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

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


The following commit(s) were added to refs/heads/main by this push:
     new 725d8335 Regen for commit 71c03e8c5d436774182906447c9db2394649b927
725d8335 is described below

commit 725d8335091cd68b698833348636c9597af99ca6
Author: oscerd <osc...@users.noreply.github.com>
AuthorDate: Mon Jul 25 17:12:12 2022 +0000

    Regen for commit 71c03e8c5d436774182906447c9db2394649b927
    
    Signed-off-by: GitHub <nore...@github.com>
---
 docs/modules/ROOT/nav.adoc                         |   1 +
 .../kamelets/azure-functions-sink.kamelet.yaml     |   2 +-
 .../kamelets/nominatim-geocode-action.kamelet.yaml | 111 +++++++++++++++++++++
 3 files changed, 113 insertions(+), 1 deletion(-)

diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 8285e7a8..856952a9 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -142,6 +142,7 @@
 * xref:mysql-source.adoc[]
 * xref:nats-sink.adoc[]
 * xref:nats-source.adoc[]
+* xref:nominatim-geocode-action.adoc[]
 * xref:openai-classification-action.adoc[]
 * xref:openai-completion-action.adoc[]
 * xref:oracle-database-sink.adoc[]
diff --git 
a/library/camel-kamelets/src/main/resources/kamelets/azure-functions-sink.kamelet.yaml
 
b/library/camel-kamelets/src/main/resources/kamelets/azure-functions-sink.kamelet.yaml
index 288d69ec..04717b97 100644
--- 
a/library/camel-kamelets/src/main/resources/kamelets/azure-functions-sink.kamelet.yaml
+++ 
b/library/camel-kamelets/src/main/resources/kamelets/azure-functions-sink.kamelet.yaml
@@ -19,7 +19,7 @@ kind: Kamelet
 metadata:
   name: azure-functions-sink
   annotations:
-    camel.apache.org/kamelet.support.level: "Stable"
+    camel.apache.org/kamelet.support.level: "Preview"
     camel.apache.org/catalog.version: "main-SNAPSHOT"
     camel.apache.org/kamelet.icon: 
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjE4LjI0IDIxLjQ2IDY0IDY0IiB3aWR0aD0iNjQiIGhlaWdodD0iNjQiPjxwYXRoIGQ9Ik04MS44MzcgNTMuODVjLjU4NS0uNTg1LjQ4Ny0xLjcgMC0yLjMwN2wtMy4wODctMy4wODctMTMuOC0xMy4zODZjLS41ODUtLjU4NS0xLjQ5NS0uNTg1LTIuMiAwLS41ODUuNTg1LS44MTIgMS43IDAgMi4zMDdsMTQuNSAxNC4xOThjLjU4NS41ODUuNTg1IDEuNyAwIDIuMzA3TDYyLjQ0IDY4LjU2OGMtLjU4NS41ODUtLjU4NSAxLjcgMCAyLjMwNy41ODUuNTg1IDEuNy40ODcgMi4yIDBsMTMuOC
 [...]
     camel.apache.org/provider: "Apache Software Foundation"
diff --git 
a/library/camel-kamelets/src/main/resources/kamelets/nominatim-geocode-action.kamelet.yaml
 
b/library/camel-kamelets/src/main/resources/kamelets/nominatim-geocode-action.kamelet.yaml
new file mode 100644
index 00000000..bf1d4756
--- /dev/null
+++ 
b/library/camel-kamelets/src/main/resources/kamelets/nominatim-geocode-action.kamelet.yaml
@@ -0,0 +1,111 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: nominatim-geocode-action
+  annotations:
+    camel.apache.org/kamelet.support.level: "Preview"
+    camel.apache.org/catalog.version: "main-SNAPSHOT"
+    camel.apache.org/kamelet.icon: 
"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgoKPHN2ZwogICB3aWR0aD0iMjU2IgogICBoZWlnaHQ9IjI1NiIKICAgaWQ9InN2ZzMwMzgiCiAgIHZlcnNpb249IjEuMSIKICAgaW5rc2NhcGU6dmVyc2lvbj0iMS4xLjIgKDBhMDBjZjUzMzksIDIwMjItMDItMDQpIgogICBzb2RpcG9kaTpkb2NuYW1lPSJPcGVuU3RyZWV0TWFwIGxvZ28gMjAxMS5zdmciCiAgIGlua3NjYXBlOmV4cG9ydC1maWxlbmFtZT0iL2hvbWUvZn
 [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "Geospatial"
+  labels:
+    camel.apache.org/kamelet.type: "action"
+spec:
+  definition:
+    title: "Nominatim GeoCode Action"
+    description: |-
+      Find locations on Earth by name and address. 
+      This Kamelet expects in the body the `address` to find.
+      The return message will also contain the following headers with the 
geolocation info:
+       
+      - `CamelGeoCoderAddress`
+      - `CamelGeoCoderCity`
+      - `CamelGeoCoderCountryLong`
+      - `CamelGeoCoderCountryShort`
+      - `CamelGeoCoderLat`
+      - `CamelGeoCoderLng`
+      - `CamelGeoCoderLatlng`
+      - `CamelGeoCoderPostalCode`
+      - `CamelGeoCoderRegionCode`
+      - `CamelGeoCoderRegionName`
+      - `CamelGeoCoderStatus`
+      
+      The body will be returned in JSON format.
+    required:
+      - serverUrl
+    type: object
+    properties:
+      serverUrl:
+        title: "Server URL"
+        description: "Url of the Nominatim server"
+        example: "https://nominatim.openstreetmap.org";
+        type: string
+  types:
+    in:
+      mediaType: text/plain
+    out:
+      mediaType: application/json
+      schema:
+        type: object
+        required: ["place_id"]
+        properties:
+          place_id:
+            type: numeric
+          licence:
+            type: string
+          osm_type:
+            type: string
+          osm_id:
+            type: numeric
+          boundingbox:
+            type: array
+          lat:
+            type: numeric
+          lon:
+            type: numeric
+          display_name:
+            type: string
+          place_rank:
+            type: numeric
+          category:
+            type: string
+          address:
+            type: object
+  dependencies:
+    - "camel:core"
+    - "camel:jackson"
+    - "camel:geocoder"
+    - "camel:kamelet"
+  template:
+    from:
+      uri: "kamelet:source"
+      steps:
+      - set-header:
+          name: CamelGeoCoderAddress
+          simple: "${body}"
+      - to: 
+          uri: "geocoder:address:toOverride"
+          parameters:
+            type: "NOMINATIM"
+            serverUrl: "RAW({{serverUrl}})"
+      - marshal:
+          json: {}
+
+
+

Reply via email to