This is an automated email from the ASF dual-hosted git repository.
davsclaus 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 011fdfdb2 chore: move the demo Kamelets out of the catalog into
examples/kamelets (#3162, group 3) (#3167)
011fdfdb2 is described below
commit 011fdfdb249a20bb62634927fa9180ed3800f0a4
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue Nov 17 16:06:07 2026 +0100
chore: move the demo Kamelets out of the catalog into examples/kamelets
(#3162, group 3) (#3167)
* chore: move the demo Kamelets out of the catalog into examples/kamelets
(#3162, group 3)
bitcoin-source, chuck-norris-source, earthquake-source and wttrin-source are
demos: they move to examples/kamelets with a README, so they are kept as
source
but are no longer in the camel-kamelets JAR, the index or the catalog
website.
Their doc partials, pipe templates, the wttrin-source catalog test line and
the
KameletPrefixSchemeEnum entries are removed. The release version bump also
covers examples/kamelets, the developer guide says where the complete
earthquake-source is, and the earthquake itest loads it from
examples/kamelets.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* chore: chuck-norris-source asks only for jokes about programming (#3162)
The other categories of api.chucknorris.io include crude and offensive
jokes,
also outside the explicit category; the dev category is clean.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* chore: regenerate after rebase (#3167)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
---
.../camel-kamelets-catalog-sbom.json | 62 +--------
docs/modules/ROOT/nav.adoc | 4 -
docs/modules/ROOT/pages/development.adoc | 2 +-
.../ROOT/partials/bitcoin-source-description.adoc | 3 -
.../partials/chuck-norris-source-description.adoc | 35 -----
.../partials/earthquake-source-description.adoc | 73 ----------
.../ROOT/partials/wttrin-source-description.adoc | 40 ------
examples/kamelets/README.md | 37 +++++
.../kamelets}/bitcoin-source.kamelet.yaml | 0
.../kamelets}/chuck-norris-source.kamelet.yaml | 6 +-
.../kamelets}/earthquake-source.kamelet.yaml | 0
.../kamelets}/wttrin-source.kamelet.yaml | 0
.../catalog/model/KameletPrefixSchemeEnum.java | 5 +-
.../kamelets/catalog/KameletsCatalogTest.java | 1 -
.../main/resources/META-INF/kamelets-index.json | 40 ------
.../resources/kamelets/bitcoin-source.kamelet.yaml | 101 --------------
.../kamelets/chuck-norris-source.kamelet.yaml | 75 ----------
.../kamelets/earthquake-source.kamelet.yaml | 153 ---------------------
.../resources/kamelets/wttrin-source.kamelet.yaml | 106 --------------
templates/pipes/camel-k/bitcoin-source-pipe.yaml | 16 ---
.../pipes/camel-k/chuck-norris-source-pipe.yaml | 16 ---
.../pipes/camel-k/earthquake-source-pipe.yaml | 16 ---
templates/pipes/camel-k/wttrin-source-pipe.yaml | 16 ---
templates/pipes/core/bitcoin-source-pipe.yaml | 6 -
templates/pipes/core/chuck-norris-source-pipe.yaml | 6 -
templates/pipes/core/earthquake-source-pipe.yaml | 6 -
templates/pipes/core/wttrin-source-pipe.yaml | 6 -
tests/camel-kamelets-itest/pom.xml | 9 ++
.../earthquake/earthquake-to-http.citrus.it.yaml | 3 +
update-kamelets.xml | 3 +
30 files changed, 58 insertions(+), 788 deletions(-)
diff --git a/camel-kamelets-sbom/camel-kamelets-catalog-sbom.json
b/camel-kamelets-sbom/camel-kamelets-catalog-sbom.json
index 6e92b5cf0..58f1c7158 100644
--- a/camel-kamelets-sbom/camel-kamelets-catalog-sbom.json
+++ b/camel-kamelets-sbom/camel-kamelets-catalog-sbom.json
@@ -261,11 +261,6 @@
"type" : "library",
"name" : "azure-storage-queue-source",
"version" : "4.24.0-SNAPSHOT"
- }, {
- "bom-ref" : "kamelet:bitcoin-source",
- "type" : "library",
- "name" : "bitcoin-source",
- "version" : "4.24.0-SNAPSHOT"
}, {
"bom-ref" : "kamelet:cassandra-sink",
"type" : "library",
@@ -286,11 +281,6 @@
"type" : "library",
"name" : "ceph-source",
"version" : "4.24.0-SNAPSHOT"
- }, {
- "bom-ref" : "kamelet:chuck-norris-source",
- "type" : "library",
- "name" : "chuck-norris-source",
- "version" : "4.24.0-SNAPSHOT"
}, {
"bom-ref" : "kamelet:couchbase-sink",
"type" : "library",
@@ -376,11 +366,6 @@
"type" : "library",
"name" : "drop-headers-action",
"version" : "4.24.0-SNAPSHOT"
- }, {
- "bom-ref" : "kamelet:earthquake-source",
- "type" : "library",
- "name" : "earthquake-source",
- "version" : "4.24.0-SNAPSHOT"
}, {
"bom-ref" : "kamelet:elasticsearch-index-sink",
"type" : "library",
@@ -1186,11 +1171,6 @@
"type" : "library",
"name" : "webhook-source",
"version" : "4.24.0-SNAPSHOT"
- }, {
- "bom-ref" : "kamelet:wttrin-source",
- "type" : "library",
- "name" : "wttrin-source",
- "version" : "4.24.0-SNAPSHOT"
}, {
"bom-ref" : "kamelet:xj-identity-action",
"type" : "library",
@@ -1550,17 +1530,6 @@
"name" : "camel.apache.org/versioned-by",
"value" : "runtime"
} ]
- }, {
- "bom-ref" : "pkg:maven/org.apache.camel/[email protected]",
- "type" : "library",
- "group" : "org.apache.camel",
- "name" : "camel-caffeine",
- "version" : "4.23.0",
- "purl" : "pkg:maven/org.apache.camel/[email protected]",
- "properties" : [ {
- "name" : "camel.apache.org/versioned-by",
- "value" : "runtime"
- } ]
}, {
"bom-ref" : "pkg:maven/org.apache.camel/[email protected]",
"type" : "library",
@@ -2386,17 +2355,6 @@
"name" : "camel.apache.org/versioned-by",
"value" : "runtime"
} ]
- }, {
- "bom-ref" : "pkg:maven/org.apache.camel/[email protected]",
- "type" : "library",
- "group" : "org.apache.camel",
- "name" : "camel-xchange",
- "version" : "4.23.0",
- "purl" : "pkg:maven/org.apache.camel/[email protected]",
- "properties" : [ {
- "name" : "camel.apache.org/versioned-by",
- "value" : "runtime"
- } ]
}, {
"bom-ref" : "pkg:maven/org.apache.camel/[email protected]",
"type" : "library",
@@ -2432,7 +2390,7 @@
} ],
"dependencies" : [ {
"ref" : "camel-kamelets-catalog",
- "dependsOn" : [ "kamelet:avro-deserialize-action",
"kamelet:avro-serialize-action", "kamelet:aws-bedrock-agent-runtime-sink",
"kamelet:aws-bedrock-agent-sink", "kamelet:aws-bedrock-text-sink",
"kamelet:aws-cloudtrail-source", "kamelet:aws-cloudwatch-sink",
"kamelet:aws-comprehend-sink", "kamelet:aws-ddb-sink",
"kamelet:aws-ddb-streams-source", "kamelet:aws-ec2-sink",
"kamelet:aws-eventbridge-sink", "kamelet:aws-kinesis-firehose-sink",
"kamelet:aws-kinesis-sink", "kamelet:aws-kinesis- [...]
+ "dependsOn" : [ "kamelet:avro-deserialize-action",
"kamelet:avro-serialize-action", "kamelet:aws-bedrock-agent-runtime-sink",
"kamelet:aws-bedrock-agent-sink", "kamelet:aws-bedrock-text-sink",
"kamelet:aws-cloudtrail-source", "kamelet:aws-cloudwatch-sink",
"kamelet:aws-comprehend-sink", "kamelet:aws-ddb-sink",
"kamelet:aws-ddb-streams-source", "kamelet:aws-ec2-sink",
"kamelet:aws-eventbridge-sink", "kamelet:aws-kinesis-firehose-sink",
"kamelet:aws-kinesis-sink", "kamelet:aws-kinesis- [...]
}, {
"ref" : "kamelet:avro-deserialize-action",
"dependsOn" : [ "pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]" ]
@@ -2583,9 +2541,6 @@
}, {
"ref" : "kamelet:azure-storage-queue-source",
"dependsOn" : [
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]" ]
- }, {
- "ref" : "kamelet:bitcoin-source",
- "dependsOn" : [ "pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]" ]
}, {
"ref" : "kamelet:cassandra-sink",
"dependsOn" : [ "pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]" ]
@@ -2598,9 +2553,6 @@
}, {
"ref" : "kamelet:ceph-source",
"dependsOn" : [ "pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]" ]
- }, {
- "ref" : "kamelet:chuck-norris-source",
- "dependsOn" : [ "pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]" ]
}, {
"ref" : "kamelet:couchbase-sink",
"dependsOn" : [ "pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]" ]
@@ -2652,9 +2604,6 @@
}, {
"ref" : "kamelet:drop-headers-action",
"dependsOn" : [ "pkg:maven/org.apache.camel/[email protected]" ]
- }, {
- "ref" : "kamelet:earthquake-source",
- "dependsOn" : [ "pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]" ]
}, {
"ref" : "kamelet:elasticsearch-index-sink",
"dependsOn" : [ "pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]" ]
@@ -3138,9 +3087,6 @@
}, {
"ref" : "kamelet:webhook-source",
"dependsOn" : [ "pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]" ]
- }, {
- "ref" : "kamelet:wttrin-source",
- "dependsOn" : [ "pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]" ]
}, {
"ref" : "kamelet:xj-identity-action",
"dependsOn" : [ "pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]" ]
@@ -3252,9 +3198,6 @@
}, {
"ref" : "pkg:maven/org.apache.camel/[email protected]",
"dependsOn" : [ ]
- }, {
- "ref" : "pkg:maven/org.apache.camel/[email protected]",
- "dependsOn" : [ ]
}, {
"ref" : "pkg:maven/org.apache.camel/[email protected]",
"dependsOn" : [ ]
@@ -3480,9 +3423,6 @@
}, {
"ref" : "pkg:maven/org.apache.camel/[email protected]",
"dependsOn" : [ ]
- }, {
- "ref" : "pkg:maven/org.apache.camel/[email protected]",
- "dependsOn" : [ ]
}, {
"ref" : "pkg:maven/org.apache.camel/[email protected]",
"dependsOn" : [ ]
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index c87c24946..51f3f5281 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -49,12 +49,10 @@
* xref:azure-storage-files-source.adoc[]
* xref:azure-storage-queue-sink.adoc[]
* xref:azure-storage-queue-source.adoc[]
-* xref:bitcoin-source.adoc[]
* xref:cassandra-sink.adoc[]
* xref:ceph-event-based-source.adoc[]
* xref:ceph-sink.adoc[]
* xref:ceph-source.adoc[]
-* xref:chuck-norris-source.adoc[]
* xref:couchbase-sink.adoc[]
* xref:couchbase-source.adoc[]
* xref:counter-source.adoc[]
@@ -72,7 +70,6 @@
* xref:drop-field-action.adoc[]
* xref:drop-header-action.adoc[]
* xref:drop-headers-action.adoc[]
-* xref:earthquake-source.adoc[]
* xref:elasticsearch-index-sink.adoc[]
* xref:exec-sink.adoc[]
* xref:extract-field-action.adoc[]
@@ -234,7 +231,6 @@
* xref:value-to-key-action.adoc[]
* xref:velocity-template-action.adoc[]
* xref:webhook-source.adoc[]
-* xref:wttrin-source.adoc[]
* xref:xj-identity-action.adoc[]
* xref:xj-template-action.adoc[]
// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
diff --git a/docs/modules/ROOT/pages/development.adoc
b/docs/modules/ROOT/pages/development.adoc
index e8fe153a4..23ef4ff53 100644
--- a/docs/modules/ROOT/pages/development.adoc
+++ b/docs/modules/ROOT/pages/development.adoc
@@ -953,7 +953,7 @@ TIP: In other scenarios, you might want to refer to
non-required parameters in t
We should complete the Kamelet with all mandatory (also optional) options that
are described in https://github.com/apache/camel-kamelets[the guidelines for
contributing Kamelets].
-The final result should look like:
+The final result should look like this. The complete Kamelet is in
`examples/kamelets/earthquake-source.kamelet.yaml` in the repository: it is a
demo, so it is not part of the catalog.
.earthquake-source.kamelet.yaml
[source,yaml]
diff --git a/docs/modules/ROOT/partials/bitcoin-source-description.adoc
b/docs/modules/ROOT/partials/bitcoin-source-description.adoc
deleted file mode 100644
index 22a7fcd6e..000000000
--- a/docs/modules/ROOT/partials/bitcoin-source-description.adoc
+++ /dev/null
@@ -1,3 +0,0 @@
-== Bitcoin Source Kamelet Description
-
-This is a simple Kamelet providing a feed of the value of the Bitcoin compared
to USDT using the Binance service.
diff --git a/docs/modules/ROOT/partials/chuck-norris-source-description.adoc
b/docs/modules/ROOT/partials/chuck-norris-source-description.adoc
deleted file mode 100644
index 8a4e9ca35..000000000
--- a/docs/modules/ROOT/partials/chuck-norris-source-description.adoc
+++ /dev/null
@@ -1,35 +0,0 @@
-== Chuck Norris Source Kamelet Description
-
-This Kamelet provides a periodic source of Chuck Norris jokes from the Chuck
Norris API. It fetches random jokes at configurable intervals and outputs them
as plain text.
-
-=== Output format
-
-The Kamelet outputs Chuck Norris jokes as plain text strings, one joke per
message. The jokes are extracted from the JSON response using JSONPath to get
the `value` field from the API response.
-
-=== Usage examples
-
-Basic usage with default 10-second interval:
-
-[source,yaml,subs='+attributes,macros']
-----
-- route:
- from:
- uri: "kamelet:chuck-norris-source"
- steps:
- - to:
- uri: "kamelet:log-sink"
-----
-
-Custom interval of 30 seconds:
-
-[source,yaml,subs='+attributes,macros']
-----
-- route:
- from:
- uri: "kamelet:chuck-norris-source"
- parameters:
- period: 30000
- steps:
- - to:
- uri: "kamelet:log-sink"
-----
\ No newline at end of file
diff --git a/docs/modules/ROOT/partials/earthquake-source-description.adoc
b/docs/modules/ROOT/partials/earthquake-source-description.adoc
deleted file mode 100644
index 2fe37928c..000000000
--- a/docs/modules/ROOT/partials/earthquake-source-description.adoc
+++ /dev/null
@@ -1,73 +0,0 @@
-== Earthquake Source Kamelet Description
-
-This Kamelet provides real-time earthquake data from the United States
Geological Survey (USGS) API. It periodically fetches information about current
earthquake events happening worldwide and outputs each earthquake as a separate
JSON message.
-
-=== Output format
-
-The Kamelet outputs earthquake data in JSON format. Each message contains
details about a single earthquake event, including:
-
-- Geographic coordinates (latitude, longitude)
-- Magnitude and depth
-- Time of occurrence
-- Location description
-- Additional metadata from USGS
-
-=== Data source
-
-The Kamelet uses the official USGS Earthquake API at
`https://earthquake.usgs.gov/fdsnws/event/1/query` to retrieve earthquake data
in GeoJSON format.
-
-=== Configuration options
-
-- **period**: Polling interval in milliseconds (default: 60000 = 1 minute)
-- **lookAhead**: When starting fresh, how many minutes back to look for
earthquakes (default: 120 minutes)
-
-=== Caching mechanism
-
-The Kamelet maintains state to avoid duplicate earthquake reports by:
-
-1. Caching the timestamp of the last update
-2. Only fetching earthquakes whose report was updated after the last known
update, so an earthquake is sent again when USGS updates its report
-3. Using the USGS API's `updatedafter` parameter for efficient filtering
-
-=== Usage examples
-
-Basic earthquake monitoring with default settings:
-
-[source,yaml,subs='+attributes,macros']
-----
-- route:
- from:
- uri: "kamelet:earthquake-source"
- steps:
- - to:
- uri: "kamelet:log-sink"
-----
-
-Custom polling interval and look-ahead period:
-
-[source,yaml,subs='+attributes,macros']
-----
-- route:
- from:
- uri: "kamelet:earthquake-source"
- parameters:
- period: 300000
- lookAhead: 60
- steps:
- - to:
- uri: "kamelet:log-sink"
-----
-
-Filter earthquakes by magnitude in the route:
-
-[source,yaml,subs='+attributes,macros']
-----
-- route:
- from:
- uri: "kamelet:earthquake-source"
- steps:
- - filter:
- simple: "${jsonpath($.properties.mag)} >= 4.0"
- - to:
- uri: "kamelet:log-sink"
-----
\ No newline at end of file
diff --git a/docs/modules/ROOT/partials/wttrin-source-description.adoc
b/docs/modules/ROOT/partials/wttrin-source-description.adoc
deleted file mode 100644
index 38dbc5f48..000000000
--- a/docs/modules/ROOT/partials/wttrin-source-description.adoc
+++ /dev/null
@@ -1,40 +0,0 @@
-== Wttrin Source Kamelet Description
-
-=== Authentication
-
-The Kamelet calls the public `https://wttr.in` service, which needs no
account, API key or credentials.
-
-=== Output format
-
-The Kamelet fetches data from wttr.in and produces the data in JSON format.
-
-=== Configuration
-
-No option is required:
-
-- `wttrLocation`: the place to get the weather for; when it is not set,
wttr.in guesses the place from the IP address of the machine
-- `wttrLanguage`: the language of the weather descriptions
-- `output`: `current`, `weather` or `full`
-- `period`: how long to wait between two fetches, in milliseconds
-
-=== Usage example
-
-```yaml
-apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
-metadata:
- name: wttrin-source-binding
-spec:
- source:
- ref:
- kind: Kamelet
- apiVersion: camel.apache.org/v1alpha1
- name: wttrin-source
- properties:
- wttrLocation: Paris
- sink:
- ref:
- kind: Service
- apiVersion: v1
- name: my-service
-```
diff --git a/examples/kamelets/README.md b/examples/kamelets/README.md
new file mode 100644
index 000000000..188f87628
--- /dev/null
+++ b/examples/kamelets/README.md
@@ -0,0 +1,37 @@
+# Demo Kamelets
+
+These Kamelets read toy data from public services. They are good for a first
try of Kamelets, for a demo, or as an
+example of how to write a Kamelet. They are not part of the Kamelet catalog:
they are not in the
+`camel-kamelets` JAR, and they have no page on the catalog website.
+
+| Kamelet | What it does |
+|---|---|
+| `bitcoin-source` | Reads the current price of Bitcoin in USDT from the
public market data of Binance at a regular interval. It does not connect to a
Bitcoin node or wallet. |
+| `chuck-norris-source` | Fetches a random Chuck Norris joke about programming
from api.chucknorris.io at a regular interval. |
+| `earthquake-source` | Sends a message for each earthquake reported by the
USGS. The developer guide builds it step by step. |
+| `wttrin-source` | Fetches the current weather or the forecast for a place
from wttr.in at a regular interval. |
+
+They all need access to the internet, and no account or key.
+
+## Run one
+
+Point Camel JBang at this directory with `--local-kamelet-dir`. For example,
save this route as `jokes.yaml`:
+
+```yaml
+- route:
+ from:
+ uri: "kamelet:chuck-norris-source"
+ parameters:
+ period: 10000
+ steps:
+ - to:
+ uri: "log:joke"
+```
+
+Then run it from the root of the repository:
+
+```
+camel run jokes.yaml --local-kamelet-dir=examples/kamelets
+```
+
+Each Kamelet describes its options and its output in `spec.definition`.
diff --git a/kamelets/bitcoin-source.kamelet.yaml
b/examples/kamelets/bitcoin-source.kamelet.yaml
similarity index 100%
rename from kamelets/bitcoin-source.kamelet.yaml
rename to examples/kamelets/bitcoin-source.kamelet.yaml
diff --git a/kamelets/chuck-norris-source.kamelet.yaml
b/examples/kamelets/chuck-norris-source.kamelet.yaml
similarity index 95%
rename from kamelets/chuck-norris-source.kamelet.yaml
rename to examples/kamelets/chuck-norris-source.kamelet.yaml
index 8bcd63426..4a2c8bf42 100644
--- a/kamelets/chuck-norris-source.kamelet.yaml
+++ b/examples/kamelets/chuck-norris-source.kamelet.yaml
@@ -31,13 +31,13 @@ spec:
definition:
title: "Chuck Norris Source"
description: |-
- Fetches a random Chuck Norris joke from the public api.chucknorris.io
service at a regular interval, and sends it as a message.
+ Fetches a random Chuck Norris joke about programming from the public
api.chucknorris.io service at a regular interval, and sends it as a message.
Use it to get short, changing text messages to try out a sink, an action
or a demo, with no account and no setup. For the same fixed message every time,
use `timer-source`.
Output: the body is the text of one joke. The message has no headers.
- Good to know: it calls `https://api.chucknorris.io` over the internet
for every message, so it needs internet access.
+ Good to know: it asks only for jokes of the `dev` category, because the
other categories of the service include crude and offensive jokes. It calls
`https://api.chucknorris.io` over the internet for every message, so it needs
internet access.
type: object
properties:
period:
@@ -64,7 +64,7 @@ spec:
- to:
uri: https
parameters:
- httpUri: api.chucknorris.io/jokes/random
+ httpUri: api.chucknorris.io/jokes/random?category=dev
- removeHeaders:
pattern: "*"
- setBody:
diff --git a/kamelets/earthquake-source.kamelet.yaml
b/examples/kamelets/earthquake-source.kamelet.yaml
similarity index 100%
rename from kamelets/earthquake-source.kamelet.yaml
rename to examples/kamelets/earthquake-source.kamelet.yaml
diff --git a/kamelets/wttrin-source.kamelet.yaml
b/examples/kamelets/wttrin-source.kamelet.yaml
similarity index 100%
rename from kamelets/wttrin-source.kamelet.yaml
rename to examples/kamelets/wttrin-source.kamelet.yaml
diff --git
a/library/camel-kamelets-catalog/src/main/java/org/apache/camel/kamelets/catalog/model/KameletPrefixSchemeEnum.java
b/library/camel-kamelets-catalog/src/main/java/org/apache/camel/kamelets/catalog/model/KameletPrefixSchemeEnum.java
index 209faba89..bbc4d6081 100644
---
a/library/camel-kamelets-catalog/src/main/java/org/apache/camel/kamelets/catalog/model/KameletPrefixSchemeEnum.java
+++
b/library/camel-kamelets-catalog/src/main/java/org/apache/camel/kamelets/catalog/model/KameletPrefixSchemeEnum.java
@@ -41,10 +41,8 @@ public enum KameletPrefixSchemeEnum {
azure_storage_datalake("azure-storage-datalake","azure-storage-datalake"),
azure_storage_queue("azure-storage-queue","azure-storage-queue"),
beer("beer", "http"),
- bitcoin("bitcoin", "xchange"),
cassandra("cassandra", "cql"),
ceph("ceph", "aws2-s3"),
- chuck_norris("chuck-norris", "http"),
couchbase("couchbase", "couchbase"),
elasticsearch_index("elasticsearch-index", "elasticsearch"),
exec("exec", "exec"),
@@ -113,8 +111,7 @@ public enum KameletPrefixSchemeEnum {
ssh("ssh", "ssh"),
telegram("telegram", "telegram"),
timer("timer", "timer"),
- webhook("webhook", "platform-http"),
- wttrin("wttrin", "https");
+ webhook("webhook", "platform-http");
public final String name;
public final String scheme;
diff --git
a/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java
b/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java
index 49977ca00..8d20c70d2 100644
---
a/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java
+++
b/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java
@@ -303,7 +303,6 @@ public class KameletsCatalogTest {
verifyHeaders("telegram-source", 2);
verifyHeaders("timer-source", 1);
verifyHeaders("webhook-source", 3);
- verifyHeaders("wttrin-source", 5);
}
void verifyHeaders(String name, int expected) {
diff --git
a/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json
b/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json
index e00042ea3..6b3e440d3 100644
--- a/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json
+++ b/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json
@@ -499,16 +499,6 @@
"group" : "Azure Storage Queue",
"namespace" : "Azure",
"provider" : "Apache Software Foundation"
- }, {
- "name" : "bitcoin-source",
- "type" : "source",
- "supportLevel" : "Stable",
- "title" : "Bitcoin Source",
- "summary" : "Reads the current price of Bitcoin in USDT (Tether) from the
public market data of the Binance trading platform at a regular interval, one
message per reading.",
- "description" : "Reads the current price of Bitcoin in USDT (Tether) from
the public market data of the Binance trading platform at a regular interval,
one message per reading.\n\nUse it to follow the Bitcoin price, for example to
store it over time, to send an alert when it crosses a threshold, or as a live
data feed for a demo. It reads market prices from Binance; it does not connect
to a Bitcoin node or wallet.\n\nOutput: the body is JSON text with the ticker
of the BTC/USDT pair: [...]
- "group" : "Bitcoin",
- "namespace" : "Bitcoin",
- "provider" : "Apache Software Foundation"
}, {
"name" : "cassandra-sink",
"type" : "sink",
@@ -549,16 +539,6 @@
"group" : "Ceph",
"namespace" : "Cloud",
"provider" : "Apache Software Foundation"
- }, {
- "name" : "chuck-norris-source",
- "type" : "source",
- "supportLevel" : "Stable",
- "title" : "Chuck Norris Source",
- "summary" : "Fetches a random Chuck Norris joke from the public
api.chucknorris.io service at a regular interval, and sends it as a message.",
- "description" : "Fetches a random Chuck Norris joke from the public
api.chucknorris.io service at a regular interval, and sends it as a
message.\n\nUse it to get short, changing text messages to try out a sink, an
action or a demo, with no account and no setup. For the same fixed message
every time, use `timer-source`.\n\nOutput: the body is the text of one joke.
The message has no headers.\n\nGood to know: it calls
`https://api.chucknorris.io` over the internet for every message, so [...]
- "group" : "Chuck Norris",
- "namespace" : "Dataset",
- "provider" : "Apache Software Foundation"
}, {
"name" : "couchbase-sink",
"type" : "sink",
@@ -729,16 +709,6 @@
"group" : "Actions",
"namespace" : "EIP",
"provider" : "Apache Software Foundation"
- }, {
- "name" : "earthquake-source",
- "type" : "source",
- "supportLevel" : "Stable",
- "title" : "Earthquake Source",
- "summary" : "Sends a message for each earthquake reported by the USGS
(United States Geological Survey), checking for new reports at a regular
interval.",
- "description" : "Sends a message for each earthquake reported by the USGS
(United States Geological Survey), checking for new reports at a regular
interval.\n\nUse it to follow the earthquakes around the world, for example to
alert on the strong ones, or as a stream of real, changing JSON data for a
demo. No account is needed.\n\nOutput: one message per earthquake. The body is
a GeoJSON feature, as JSON text: `properties` has the magnitude (`mag`), the
place, the time and a link to t [...]
- "group" : "Earthquake",
- "namespace" : "Dataset",
- "provider" : "Apache Software Foundation"
}, {
"name" : "elasticsearch-index-sink",
"type" : "sink",
@@ -2349,16 +2319,6 @@
"group" : "Webhook",
"namespace" : "Cloud",
"provider" : "Apache Software Foundation"
- }, {
- "name" : "wttrin-source",
- "type" : "source",
- "supportLevel" : "Stable",
- "title" : "wttr.in Source",
- "summary" : "Fetches the current weather or the forecast for a place from
the public wttr.in service at a regular interval, and sends it as JSON.",
- "description" : "Fetches the current weather or the forecast for a place
from the public wttr.in service at a regular interval, and sends it as
JSON.\n\nUse it to feed weather data into a dashboard, a chat message or a
decision, such as a frost alert, or as real, changing JSON data for a demo. No
account is needed.\n\nOutput: the body is JSON text. With `output` set to
`current`, the default, it is an object with the current conditions, such as
`temp_C`, `humidity` and `weatherDesc`. [...]
- "group" : "Weather",
- "namespace" : "Dataset",
- "provider" : "Apache Software Foundation"
}, {
"name" : "xj-identity-action",
"type" : "action",
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/bitcoin-source.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/bitcoin-source.kamelet.yaml
deleted file mode 100644
index 3167f49d0..000000000
---
a/library/camel-kamelets/src/main/resources/kamelets/bitcoin-source.kamelet.yaml
+++ /dev/null
@@ -1,101 +0,0 @@
-# ---------------------------------------------------------------------------
-# 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/v1
-kind: Kamelet
-metadata:
- name: bitcoin-source
- annotations:
- camel.apache.org/kamelet.support.level: "Stable"
- camel.apache.org/catalog.version: "4.24.0-SNAPSHOT"
- camel.apache.org/kamelet.icon:
"data:image/svg+xml;base64,PCEtLSBDcmVhdGVkIHdpdGggSW5rc2NhcGUgKGh0dHA6Ly93d3cuaW5rc2NhcGUub3JnLykgLS0+CjxzdmcgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNjQiIHdpZHRoPSI2NCIgdmVyc2lvbj0iMS4xIiB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iPgo8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjAwNjMwODc2LC0wLjAwMzAxOT
[...]
- camel.apache.org/provider: "Apache Software Foundation"
- camel.apache.org/kamelet.group: "Bitcoin"
- camel.apache.org/kamelet.namespace: "Bitcoin"
- labels:
- camel.apache.org/kamelet.type: "source"
-spec:
- definition:
- title: "Bitcoin Source"
- description: |-
- Reads the current price of Bitcoin in USDT (Tether) from the public
market data of the Binance trading platform at a regular interval, one message
per reading.
-
- Use it to follow the Bitcoin price, for example to store it over time,
to send an alert when it crosses a threshold, or as a live data feed for a
demo. It reads market prices from Binance; it does not connect to a Bitcoin
node or wallet.
-
- Output: the body is JSON text with the ticker of the BTC/USDT pair:
among others the last price (`last`), the best bid and ask (`bid`, `ask`), the
high and low (`high`, `low`) and the volume (`volume`) of the last 24 hours.
The `Content-Type` header is `application/json`.
-
- Good to know: it needs access to the internet and no account or key. The
first reading comes about one second after start, then one every `period`.
- type: object
- properties:
- period:
- title: Period between Updates
- description: How long to wait between two readings, in milliseconds.
For example, 60000 is one minute.
- type: integer
- default: 10000
- example: 60000
- types:
- out:
- mediaType: application/json
- schema:
- type: object
- properties:
- currencyPair:
- type: string
- open:
- type: number
- last:
- type: number
- bid:
- type: number
- ask:
- type: number
- high:
- type: number
- low:
- type: number
- vwap:
- type: number
- volume:
- type: number
- quoteVolume:
- type: number
- bidSize:
- type: number
- askSize:
- type: number
- dependencies:
- - "camel:xchange"
- - "camel:kamelet"
- - "camel:jackson"
- - "camel:timer"
- template:
- from:
- uri: timer
- parameters:
- timerName: update
- period: "{{period}}"
- steps:
- - to:
- uri: xchange
- parameters:
- name: binance
- currencyPair: BTC/USDT
- method: ticker
- service: marketdata
- - marshal:
- json: {}
- - to:
- uri: kamelet:sink
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/chuck-norris-source.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/chuck-norris-source.kamelet.yaml
deleted file mode 100644
index 8bcd63426..000000000
---
a/library/camel-kamelets/src/main/resources/kamelets/chuck-norris-source.kamelet.yaml
+++ /dev/null
@@ -1,75 +0,0 @@
-# ---------------------------------------------------------------------------
-# 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/v1
-kind: Kamelet
-metadata:
- name: chuck-norris-source
- annotations:
- camel.apache.org/kamelet.support.level: "Stable"
- camel.apache.org/catalog.version: "4.24.0-SNAPSHOT"
- camel.apache.org/kamelet.icon:
data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgNTEyIDUxMiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDA
[...]
- camel.apache.org/provider: "Apache Software Foundation"
- camel.apache.org/kamelet.group: "Chuck Norris"
- camel.apache.org/kamelet.namespace: "Dataset"
- labels:
- camel.apache.org/kamelet.type: "source"
-spec:
- definition:
- title: "Chuck Norris Source"
- description: |-
- Fetches a random Chuck Norris joke from the public api.chucknorris.io
service at a regular interval, and sends it as a message.
-
- Use it to get short, changing text messages to try out a sink, an action
or a demo, with no account and no setup. For the same fixed message every time,
use `timer-source`.
-
- Output: the body is the text of one joke. The message has no headers.
-
- Good to know: it calls `https://api.chucknorris.io` over the internet
for every message, so it needs internet access.
- type: object
- properties:
- period:
- title: Period
- description: "How long to wait between two jokes, in milliseconds. For
example, 60000 is one minute."
- type: integer
- default: 10000
- example: 60000
- types:
- out:
- mediaType: text/plain
- dependencies:
- - "camel:kamelet"
- - "camel:timer"
- - "camel:http"
- - "camel:jsonpath"
- template:
- from:
- uri: timer
- parameters:
- timerName: chuck
- period: "{{period}}"
- steps:
- - to:
- uri: https
- parameters:
- httpUri: api.chucknorris.io/jokes/random
- - removeHeaders:
- pattern: "*"
- - setBody:
- expression:
- jsonpath:
- expression: "$.value"
- - to:
- uri: kamelet:sink
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/earthquake-source.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/earthquake-source.kamelet.yaml
deleted file mode 100644
index 4b2bb1f7c..000000000
---
a/library/camel-kamelets/src/main/resources/kamelets/earthquake-source.kamelet.yaml
+++ /dev/null
@@ -1,153 +0,0 @@
-# ---------------------------------------------------------------------------
-# 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/v1
-kind: Kamelet
-metadata:
- name: earthquake-source
- annotations:
- camel.apache.org/kamelet.support.level: "Stable"
- camel.apache.org/catalog.version: "4.24.0-SNAPSHOT"
- camel.apache.org/kamelet.icon:
"data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzEwMHB4JyB3aWR0aD0nMTAwcHgnICBmaWxsPSIjMDAwMDAwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTAwLjAwMyA3OS45OTciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDEwMC4wMDMgNzkuOTk3IiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBkPSJNODEuNjUzLDQyLjk0Yy0xLjM4NywwLTIuNjY2LDAuNzY3LTMuMzE1LDEuOTkyTDcyLjk0Miw1NS4xbC02Lj
[...]
- camel.apache.org/provider: "Apache Software Foundation"
- camel.apache.org/kamelet.group: "Earthquake"
- camel.apache.org/kamelet.namespace: "Dataset"
- labels:
- camel.apache.org/kamelet.type: "source"
- camel.apache.org/kamelet.verified: "true"
-spec:
- definition:
- title: "Earthquake Source"
- description: |-
- Sends a message for each earthquake reported by the USGS (United States
Geological Survey), checking for new reports at a regular interval.
-
- Use it to follow the earthquakes around the world, for example to alert
on the strong ones, or as a stream of real, changing JSON data for a demo. No
account is needed.
-
- Output: one message per earthquake. The body is a GeoJSON feature, as
JSON text: `properties` has the magnitude (`mag`), the place, the time and a
link to the USGS page, and `geometry` has the longitude, the latitude and the
depth. The `Content-Type` header is `application/json`.
-
- Good to know: the first check sends the earthquakes whose report was
updated in the last `lookAhead` minutes, and each later check those updated
since the check before. An earthquake is sent again when USGS updates its
report. The time of the last check is kept in memory only, so a restart begins
again with the last `lookAhead` minutes. It calls `https://earthquake.usgs.gov`
over the internet.
- type: object
- properties:
- period:
- title: Period
- description: "How long to wait between two checks for new reports, in
milliseconds. For example, 300000 is five minutes."
- type: integer
- default: 60000
- example: 300000
- lookAhead:
- title: Minutes to Look Back
- description: "When the integration starts, how many minutes back to
look for earthquake reports. For example, 1440 first sends the reports of the
last day."
- type: integer
- default: 120
- example: 1440
- types:
- out:
- mediaType: application/json
- dependencies:
- - "camel:caffeine"
- - "camel:http"
- - "camel:kamelet"
- - "camel:jackson"
- - "camel:jsonpath"
- - "camel:timer"
- template:
- from:
- uri: timer
- parameters:
- timerName: earthquake
- period: "{{period}}"
- steps:
- - setHeader:
- name: CamelCaffeineAction
- expression:
- constant:
- expression: GET
- - toD:
- uri: caffeine-cache
- parameters:
- cacheName: "cache-${routeId}"
- key: lastUpdate
- - choice:
- when:
- - expression:
- simple:
- expression: "${header.CamelCaffeineActionHasResult}"
- steps:
- - setProperty:
- name: lastUpdate
- expression:
- simple:
- expression: "${body}"
- otherwise:
- steps:
- - setProperty:
- name: lastUpdate
- expression:
- simple:
- expression:
"${date-with-timezone:now-{{lookAhead}}m:UTC:yyyy-MM-dd'T'HH:mm:ss.SSS}"
- - setHeader:
- name: CamelHttpMethod
- expression:
- constant:
- expression: GET
- - toD:
- uri: https
- parameters:
- httpUri: earthquake.usgs.gov/fdsnws/event/1/query
- format: geojson
- orderby: time-asc
- updatedafter: "${exchangeProperty.lastUpdate}"
- - removeHeader:
- name: CamelHttpMethod
- - unmarshal:
- json: {}
- - setProperty:
- name: generated
- expression:
- simple:
- expression: "${body[metadata][generated]}"
- - setProperty:
- name: lastUpdate
- expression:
- simple:
- expression:
"${date-with-timezone:exchangeProperty.generated:UTC:yyyy-MM-dd'T'HH:mm:ss.SSS}"
- - claimCheck:
- operation: Push
- - setBody:
- expression:
- exchangeProperty:
- expression: lastUpdate
- - setHeader:
- name: CamelCaffeineAction
- expression:
- constant:
- expression: PUT
- - toD:
- uri: caffeine-cache
- parameters:
- cacheName: "cache-${routeId}"
- key: lastUpdate
- - claimCheck:
- operation: Pop
- - split:
- expression:
- jsonpath:
- expression: "$.features[*]"
- steps:
- - marshal:
- json: {}
- - to:
- uri: kamelet:sink
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/wttrin-source.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/wttrin-source.kamelet.yaml
deleted file mode 100644
index 844e7c75f..000000000
---
a/library/camel-kamelets/src/main/resources/kamelets/wttrin-source.kamelet.yaml
+++ /dev/null
@@ -1,106 +0,0 @@
-# ---------------------------------------------------------------------------
-# 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/v1
-kind: Kamelet
-metadata:
- name: wttrin-source
- annotations:
- camel.apache.org/kamelet.support.level: "Stable"
- camel.apache.org/catalog.version: "4.24.0-SNAPSHOT"
- camel.apache.org/kamelet.icon:
"data:image/svg+xml;base64,PHN2ZyBhcmlhLWhpZGRlbj0idHJ1ZSIgZm9jdXNhYmxlPSJmYWxzZSIgZGF0YS1wcmVmaXg9ImZhcyIgZGF0YS1pY29uPSJjbG91ZC1zdW4iIGNsYXNzPSJzdmctaW5saW5lLS1mYSBmYS1jbG91ZC1zdW4iIHJvbGU9ImltZyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgNjQwIDUxMiI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJNOTYgMjA4YzAtNjEuODYgNTAuMTQtMTExLjEgMTExLjEtMTExLjFjNTIuNjUgMCA5Ni41IDM2LjQ1IDEwOC41IDg1LjQyQzMzNC43IDE3My4xIDM1NC43IDE2OCAzNzUuMSAxNjhjNC42MD
[...]
- camel.apache.org/provider: "Apache Software Foundation"
- camel.apache.org/kamelet.group: "Weather"
- camel.apache.org/kamelet.namespace: "Dataset"
- labels:
- camel.apache.org/kamelet.type: "source"
-spec:
- definition:
- title: "wttr.in Source"
- description: |-
- Fetches the current weather or the forecast for a place from the public
wttr.in service at a regular interval, and sends it as JSON.
-
- Use it to feed weather data into a dashboard, a chat message or a
decision, such as a frost alert, or as real, changing JSON data for a demo. No
account is needed.
-
- Output: the body is JSON text. With `output` set to `current`, the
default, it is an object with the current conditions, such as `temp_C`,
`humidity` and `weatherDesc`. With `weather`, it is a list with the forecast
for each day, starting today. With `full`, it is the whole answer of wttr.in,
which has both. The `Content-Type` header is `application/json`, and the other
headers of the HTTP answer are kept.
-
- Good to know: it calls `https://wttr.in` over the internet. When
`wttrLocation` is not set, wttr.in guesses the place from the IP address of the
machine.
- type: object
- properties:
- period:
- title: Period
- description: "How long to wait between two fetches, in milliseconds.
For example, 3600000 is one hour."
- type: integer
- default: 60000
- example: 3600000
- wttrLocation:
- title: Location
- description: "The place to get the weather for: a city name such as
`Paris` or `New York`, an airport code such as `muc`, a landmark after `~` such
as `~Eiffel+tower`, a postal code, or a latitude and longitude such as
`48.85,2.35`. When it is not set, wttr.in guesses the place from the IP address
of the machine."
- type: string
- example: "Paris"
- wttrLanguage:
- title: Language
- description: "The language of the weather descriptions, as a language
code such as `fr` or `de`. The descriptions in that language are added to the
JSON in a field such as `lang_fr`; the other fields stay in English. When it is
not set, the descriptions are in English only."
- type: string
- example: "fr"
- output:
- title: Output
- description: "What to send: `current` for the current conditions,
`weather` for the forecast of each day, or `full` for the whole answer of
wttr.in. Any other value works like `full`."
- type: string
- example: "weather"
- default: current
- types:
- out:
- mediaType: application/json
- dependencies:
- - "camel:http"
- - "camel:jackson"
- - "camel:jsonpath"
- - "camel:kamelet"
- - "camel:timer"
- template:
- from:
- uri: timer
- parameters:
- timerName: wttr.in
- period: "{{period}}"
- steps:
- - to:
- uri:
"https://wttr.in/{{?wttrLocation}}?format=j1&lang={{?wttrLanguage}}"
- - choice:
- when:
- - expression:
- simple:
- expression: "'{{output}}' == 'current'"
- steps:
- - transform:
- expression:
- jsonpath:
- expression: "$.current_condition[0]"
- - marshal:
- json: {}
- - expression:
- simple:
- expression: "'{{output}}' == 'weather'"
- steps:
- - transform:
- expression:
- jsonpath:
- expression: "$.weather"
- - marshal:
- json: {}
- - to:
- uri: kamelet:sink
diff --git a/templates/pipes/camel-k/bitcoin-source-pipe.yaml
b/templates/pipes/camel-k/bitcoin-source-pipe.yaml
deleted file mode 100644
index fc06c5bb6..000000000
--- a/templates/pipes/camel-k/bitcoin-source-pipe.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-apiVersion: camel.apache.org/v1
-kind: Pipe
-metadata:
- name: bitcoin-source-pipe
-spec:
- source:
- ref:
- kind: Kamelet
- apiVersion: camel.apache.org/v1
- name: bitcoin-source
- sink:
- ref:
- kind: KafkaTopic
- apiVersion: kafka.strimzi.io/v1beta1
- name: my-topic
-
\ No newline at end of file
diff --git a/templates/pipes/camel-k/chuck-norris-source-pipe.yaml
b/templates/pipes/camel-k/chuck-norris-source-pipe.yaml
deleted file mode 100644
index fe35249b5..000000000
--- a/templates/pipes/camel-k/chuck-norris-source-pipe.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-apiVersion: camel.apache.org/v1
-kind: Pipe
-metadata:
- name: chuck-norris-source-pipe
-spec:
- source:
- ref:
- kind: Kamelet
- apiVersion: camel.apache.org/v1
- name: chuck-norris-source
- sink:
- ref:
- kind: KafkaTopic
- apiVersion: kafka.strimzi.io/v1beta1
- name: my-topic
-
\ No newline at end of file
diff --git a/templates/pipes/camel-k/earthquake-source-pipe.yaml
b/templates/pipes/camel-k/earthquake-source-pipe.yaml
deleted file mode 100644
index 02edaf9a0..000000000
--- a/templates/pipes/camel-k/earthquake-source-pipe.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-apiVersion: camel.apache.org/v1
-kind: Pipe
-metadata:
- name: earthquake-source-pipe
-spec:
- source:
- ref:
- kind: Kamelet
- apiVersion: camel.apache.org/v1
- name: earthquake-source
- sink:
- ref:
- kind: KafkaTopic
- apiVersion: kafka.strimzi.io/v1beta1
- name: my-topic
-
\ No newline at end of file
diff --git a/templates/pipes/camel-k/wttrin-source-pipe.yaml
b/templates/pipes/camel-k/wttrin-source-pipe.yaml
deleted file mode 100644
index ab34b1859..000000000
--- a/templates/pipes/camel-k/wttrin-source-pipe.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-apiVersion: camel.apache.org/v1
-kind: Pipe
-metadata:
- name: wttrin-source-pipe
-spec:
- source:
- ref:
- kind: Kamelet
- apiVersion: camel.apache.org/v1
- name: wttrin-source
- sink:
- ref:
- kind: KafkaTopic
- apiVersion: kafka.strimzi.io/v1beta1
- name: my-topic
-
\ No newline at end of file
diff --git a/templates/pipes/core/bitcoin-source-pipe.yaml
b/templates/pipes/core/bitcoin-source-pipe.yaml
deleted file mode 100644
index 789acdc1c..000000000
--- a/templates/pipes/core/bitcoin-source-pipe.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-- route:
- from:
- uri: "kamelet:bitcoin-source"
- steps:
- - to:
- uri: "log:info"
diff --git a/templates/pipes/core/chuck-norris-source-pipe.yaml
b/templates/pipes/core/chuck-norris-source-pipe.yaml
deleted file mode 100644
index 2a0028e6a..000000000
--- a/templates/pipes/core/chuck-norris-source-pipe.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-- route:
- from:
- uri: "kamelet:chuck-norris-source"
- steps:
- - to:
- uri: "log:info"
diff --git a/templates/pipes/core/earthquake-source-pipe.yaml
b/templates/pipes/core/earthquake-source-pipe.yaml
deleted file mode 100644
index 92b781f73..000000000
--- a/templates/pipes/core/earthquake-source-pipe.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-- route:
- from:
- uri: "kamelet:earthquake-source"
- steps:
- - to:
- uri: "log:info"
diff --git a/templates/pipes/core/wttrin-source-pipe.yaml
b/templates/pipes/core/wttrin-source-pipe.yaml
deleted file mode 100644
index d3f2b5a5c..000000000
--- a/templates/pipes/core/wttrin-source-pipe.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-- route:
- from:
- uri: "kamelet:wttrin-source"
- steps:
- - to:
- uri: "log:info"
diff --git a/tests/camel-kamelets-itest/pom.xml
b/tests/camel-kamelets-itest/pom.xml
index 17def6075..0b762f4f1 100644
--- a/tests/camel-kamelets-itest/pom.xml
+++ b/tests/camel-kamelets-itest/pom.xml
@@ -268,6 +268,15 @@
<directory>src/test/resources-filtered</directory>
<filtering>true</filtering>
</testResource>
+ <!-- The demo Kamelets of examples/kamelets, which are not in the
catalog, for the tests that use them -->
+ <testResource>
+
<directory>${project.basedir}/../../examples/kamelets</directory>
+ <targetPath>examples</targetPath>
+ <includes>
+ <include>*.kamelet.yaml</include>
+ </includes>
+ <filtering>false</filtering>
+ </testResource>
</testResources>
<plugins>
<plugin>
diff --git
a/tests/camel-kamelets-itest/src/test/resources/earthquake/earthquake-to-http.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/earthquake/earthquake-to-http.citrus.it.yaml
index b02ba7b83..4f61360c8 100644
---
a/tests/camel-kamelets-itest/src/test/resources/earthquake/earthquake-to-http.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/earthquake/earthquake-to-http.citrus.it.yaml
@@ -27,6 +27,9 @@ actions:
properties:
- name: http.sink.url
value: "http://localhost:${http.server.port}/test"
+ # earthquake-source is a demo, not in the catalog: the build copies
examples/kamelets into examples/
+ resources:
+ - "../examples/earthquake-source.kamelet.yaml"
# Verify Http request
- http:
diff --git a/update-kamelets.xml b/update-kamelets.xml
index a8f1ae81c..637b1ba5c 100644
--- a/update-kamelets.xml
+++ b/update-kamelets.xml
@@ -28,6 +28,9 @@
<fileset dir="kamelets/">
<include name="*.kamelet.yaml"/>
</fileset>
+ <fileset dir="examples/kamelets/">
+ <include name="*.kamelet.yaml"/>
+ </fileset>
</replaceregexp>
</target>