From df7fa5b6541dd76309d9cf068bd79dc7ed7eca19 Mon Sep 17 00:00:00 2001 From: gitea_admin Date: Mon, 12 Oct 2026 02:34:10 +0000 Subject: [PATCH] Add kamelet definition: http-source --- kamelet.json | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 kamelet.json diff --git a/kamelet.json b/kamelet.json new file mode 100644 index 0000000..d031dba --- /dev/null +++ b/kamelet.json @@ -0,0 +1,105 @@ +{ + "apiVersion": "camel.apache.org/v1", + "kind": "Kamelet", + "metadata": { + "name": "http-source", + "annotations": { + "camel.apache.org/kamelet.support.level": "Stable", + "camel.apache.org/catalog.version": "4.22.1", + "camel.apache.org/kamelet.icon": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MjAiCmhlaWdodD0iNDIwIiBzdHJva2U9IiMwMDAiIGZpbGw9Im5vbmUiPgo8cGF0aCBzdHJva2Utd2lkdGg9IjI2IgpkPSJNMjA5LDE1YTE5NSwxOTUgMCAxLDAgMiwweiIvPgo8cGF0aCBzdHJva2Utd2lkdGg9IjE4IgpkPSJtMjEwLDE1djM5MG0xOTUtMTk1SDE1TTU5LDkwYTI2MCwyNjAgMCAwLDAgMzAyLDAgbTAsMjQwIGEyNjAsMjYwIDAgMCwwLTMwMiwwTTE5NSwyMGEyNTAsMjUwIDAgMCwwIDAsMzgyIG0zMCwwIGEyNTAsMjUwIDAgMCwwIDAtMzgyIi8+Cjwvc3ZnPg==", + "camel.apache.org/provider": "Apache Software Foundation", + "camel.apache.org/kamelet.group": "HTTP", + "camel.apache.org/kamelet.namespace": "HTTP" + }, + "labels": { + "camel.apache.org/kamelet.type": "source" + } + }, + "spec": { + "definition": { + "title": "HTTP Source", + "description": "Periodically fetches an HTTP resource and provides the content as output.", + "required": [ + "url" + ], + "type": "object", + "properties": { + "period": { + "title": "Period between Updates", + "description": "The interval between fetches in milliseconds.", + "type": "integer", + "default": 10000 + }, + "contentType": { + "title": "Content Type", + "description": "The content type accepted for the resource.", + "type": "string", + "default": "application/json" + }, + "url": { + "title": "URL", + "description": "The URL to fetch for data.", + "type": "string", + "example": "https://gist.githubusercontent.com/nicolaferraro/e3c72ace3c751f9f88273896611ce5fe/raw/3b6f54060bacb56b6719b7386a4645cb59ad6cc1/quote.json", + "pattern": "^(http|https)://.*" + } + } + }, + "dependencies": [ + "camel:http", + "camel:kamelet", + "camel:core", + "camel:timer" + ], + "template": { + "from": { + "uri": "timer:fetch", + "parameters": { + "period": "{{period}}" + }, + "steps": [ + { + "setHeader": { + "name": "Accept", + "constant": "{{contentType}}" + } + }, + { + "to": "{{url}}" + }, + { + "to": "kamelet:sink" + } + ] + } + } + }, + "propertiesSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "title": "HTTP Source", + "description": "Periodically fetches an HTTP resource and provides the content as output.", + "required": [ + "url" + ], + "properties": { + "period": { + "type": "integer", + "title": "Period between Updates", + "description": "The interval between fetches in milliseconds.", + "default": 10000 + }, + "contentType": { + "type": "string", + "title": "Content Type", + "description": "The content type accepted for the resource.", + "default": "application/json" + }, + "url": { + "type": "string", + "title": "URL", + "description": "The URL to fetch for data." + } + } + } +} \ No newline at end of file