This is an automated email from the ASF dual-hosted git repository. nferraro pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 329f29f34c45a39d8097d67c2ad22554f44af7d5 Author: nicolaferraro <ni.ferr...@gmail.com> AuthorDate: Tue Feb 16 10:22:06 2021 +0100 chore: fix generated YAML and required props --- .gitignore | 1 + docs/generator/generator.go | 2 +- docs/modules/ROOT/pages/aws-kinesis-source.adoc | 2 +- docs/modules/ROOT/pages/aws-sqs-source.adoc | 2 +- docs/modules/ROOT/pages/bitcoin-source.adoc | 2 +- docs/modules/ROOT/pages/http-source.adoc | 6 ++++-- docs/modules/ROOT/pages/jira-source.adoc | 2 +- docs/modules/ROOT/pages/mqtt-source.adoc | 5 +++-- docs/modules/ROOT/pages/salesforce-source.adoc | 2 +- docs/modules/ROOT/pages/slack-source.adoc | 2 +- docs/modules/ROOT/pages/telegram-source.adoc | 2 +- docs/modules/ROOT/pages/timer-source.adoc | 2 +- http-source.kamelet.yaml | 2 ++ mqtt-source.kamelet.yaml | 3 ++- 14 files changed, 21 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 6b02832..7861f62 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ node_modules .project .classpath .metadata +.vscode diff --git a/docs/generator/generator.go b/docs/generator/generator.go index 6135e89..4392a5b 100644 --- a/docs/generator/generator.go +++ b/docs/generator/generator.go @@ -215,7 +215,7 @@ metadata: name: %s-binding spec: source: -%s sink: +%s sink: %s `, k.Name, sourceRef, sinkRef) diff --git a/docs/modules/ROOT/pages/aws-kinesis-source.adoc b/docs/modules/ROOT/pages/aws-kinesis-source.adoc index b46d1a1..b8fd4b4 100644 --- a/docs/modules/ROOT/pages/aws-kinesis-source.adoc +++ b/docs/modules/ROOT/pages/aws-kinesis-source.adoc @@ -45,7 +45,7 @@ spec: region: "EU_WEST_1" secretKey: "The Secret Key" stream: "The Stream Name" - sink: + sink: ref: kind: InMemoryChannel apiVersion: messaging.knative.dev/v1 diff --git a/docs/modules/ROOT/pages/aws-sqs-source.adoc b/docs/modules/ROOT/pages/aws-sqs-source.adoc index bdbbca8..2b45f6f 100644 --- a/docs/modules/ROOT/pages/aws-sqs-source.adoc +++ b/docs/modules/ROOT/pages/aws-sqs-source.adoc @@ -46,7 +46,7 @@ spec: queueNameOrArn: "The Queue Name" region: "eu-west-1" secretKey: "The Secret Key" - sink: + sink: ref: kind: InMemoryChannel apiVersion: messaging.knative.dev/v1 diff --git a/docs/modules/ROOT/pages/bitcoin-source.adoc b/docs/modules/ROOT/pages/bitcoin-source.adoc index 19346c4..7c6ad02 100644 --- a/docs/modules/ROOT/pages/bitcoin-source.adoc +++ b/docs/modules/ROOT/pages/bitcoin-source.adoc @@ -37,7 +37,7 @@ spec: kind: Kamelet apiVersion: camel.apache.org/v1alpha1 name: bitcoin-source - sink: + sink: ref: kind: InMemoryChannel apiVersion: messaging.knative.dev/v1 diff --git a/docs/modules/ROOT/pages/http-source.adoc b/docs/modules/ROOT/pages/http-source.adoc index 45d35b4..db1b6a0 100644 --- a/docs/modules/ROOT/pages/http-source.adoc +++ b/docs/modules/ROOT/pages/http-source.adoc @@ -11,9 +11,9 @@ The following table summarizes the configuration options available for the `http [width="100%",cols="2,^2,3,^2,^2,^3",options="header"] |=== | Property| Name| Description| Type| Default| Example +| *url {empty}* *| URL| The URL to fetch for data| string| | `"https://gist.githubusercontent.com/nicolaferraro/e3c72ace3c751f9f88273896611ce5fe/raw/3b6f54060bacb56b6719b7386a4645cb59ad6cc1/quote.json"` | contentType| Content type| The content type of the resource| string| `"application/json"`| | period| Period between updates| The interval between fetches in milliseconds| integer| `10000`| -| url| URL| The URL to fetch for data| string| | `"https://gist.githubusercontent.com/nicolaferraro/e3c72ace3c751f9f88273896611ce5fe/raw/3b6f54060bacb56b6719b7386a4645cb59ad6cc1/quote.json"` |=== NOTE: Fields marked with ({empty}*) are mandatory. @@ -39,7 +39,9 @@ spec: kind: Kamelet apiVersion: camel.apache.org/v1alpha1 name: http-source - sink: + properties: + url: "https://gist.githubusercontent.com/nicolaferraro/e3c72ace3c751f9f88273896611ce5fe/raw/3b6f54060bacb56b6719b7386a4645cb59ad6cc1/quote.json" + sink: ref: kind: InMemoryChannel apiVersion: messaging.knative.dev/v1 diff --git a/docs/modules/ROOT/pages/jira-source.adoc b/docs/modules/ROOT/pages/jira-source.adoc index d5302c6..871a13f 100644 --- a/docs/modules/ROOT/pages/jira-source.adoc +++ b/docs/modules/ROOT/pages/jira-source.adoc @@ -44,7 +44,7 @@ spec: jiraUrl: "http://my_jira.com:8081" password: "The Password" username: "The Username" - sink: + sink: ref: kind: InMemoryChannel apiVersion: messaging.knative.dev/v1 diff --git a/docs/modules/ROOT/pages/mqtt-source.adoc b/docs/modules/ROOT/pages/mqtt-source.adoc index ef1e07d..de3f42f 100644 --- a/docs/modules/ROOT/pages/mqtt-source.adoc +++ b/docs/modules/ROOT/pages/mqtt-source.adoc @@ -11,8 +11,8 @@ The following table summarizes the configuration options available for the `mqtt [width="100%",cols="2,^2,3,^2,^2,^3",options="header"] |=== | Property| Name| Description| Type| Default| Example +| *brokerUrl {empty}* *| Broker URL| The URL of the broker where to establish the connection| string| | `"tcp://mosquitto:1883"` | *topic {empty}* *| Topic| The topic to subscribe to| string| | `"mytopic"` -| brokerUrl| Broker URL| The URL of the broker where to establish the connection| string| | `"tcp://mosquitto:1883"` | clientId| Client ID| The client ID to use when connecting to the resource| string| `"mqtt-source"`| |=== @@ -40,8 +40,9 @@ spec: apiVersion: camel.apache.org/v1alpha1 name: mqtt-source properties: + brokerUrl: "tcp://mosquitto:1883" topic: "mytopic" - sink: + sink: ref: kind: InMemoryChannel apiVersion: messaging.knative.dev/v1 diff --git a/docs/modules/ROOT/pages/salesforce-source.adoc b/docs/modules/ROOT/pages/salesforce-source.adoc index a9b268b..46bea79 100644 --- a/docs/modules/ROOT/pages/salesforce-source.adoc +++ b/docs/modules/ROOT/pages/salesforce-source.adoc @@ -50,7 +50,7 @@ spec: query: "SELECT Id, Name, Email, Phone FROM Contact" topicName: "ContactTopic" userName: "The Username" - sink: + sink: ref: kind: InMemoryChannel apiVersion: messaging.knative.dev/v1 diff --git a/docs/modules/ROOT/pages/slack-source.adoc b/docs/modules/ROOT/pages/slack-source.adoc index aab43e4..0af3da9 100644 --- a/docs/modules/ROOT/pages/slack-source.adoc +++ b/docs/modules/ROOT/pages/slack-source.adoc @@ -41,7 +41,7 @@ spec: properties: channel: "#myroom" token: "The Token" - sink: + sink: ref: kind: InMemoryChannel apiVersion: messaging.knative.dev/v1 diff --git a/docs/modules/ROOT/pages/telegram-source.adoc b/docs/modules/ROOT/pages/telegram-source.adoc index 8dd0454..eb7f5d9 100644 --- a/docs/modules/ROOT/pages/telegram-source.adoc +++ b/docs/modules/ROOT/pages/telegram-source.adoc @@ -41,7 +41,7 @@ spec: name: telegram-source properties: authorizationToken: "The Token" - sink: + sink: ref: kind: InMemoryChannel apiVersion: messaging.knative.dev/v1 diff --git a/docs/modules/ROOT/pages/timer-source.adoc b/docs/modules/ROOT/pages/timer-source.adoc index 5605964..bcb0a9f 100644 --- a/docs/modules/ROOT/pages/timer-source.adoc +++ b/docs/modules/ROOT/pages/timer-source.adoc @@ -40,7 +40,7 @@ spec: name: timer-source properties: message: "hello world" - sink: + sink: ref: kind: InMemoryChannel apiVersion: messaging.knative.dev/v1 diff --git a/http-source.kamelet.yaml b/http-source.kamelet.yaml index a656693..9183a33 100644 --- a/http-source.kamelet.yaml +++ b/http-source.kamelet.yaml @@ -12,6 +12,8 @@ spec: title: "HTTP Source" description: |- Periodically fetches an HTTP resource and provides the content as output. + required: + - url properties: period: title: Period between updates diff --git a/mqtt-source.kamelet.yaml b/mqtt-source.kamelet.yaml index da080dd..e213b11 100644 --- a/mqtt-source.kamelet.yaml +++ b/mqtt-source.kamelet.yaml @@ -13,7 +13,8 @@ spec: description: |- Allows receiving messages from any endpoint that supports the MQTT protocol, such as a message broker. required: - - topic + - topic + - brokerUrl properties: topic: title: Topic