From 74138da13752a224cc8602ad71f2d2863b32ae0b Mon Sep 17 00:00:00 2001 From: Andrea Tarocchi Date: Tue, 5 Apr 2022 14:32:07 +0200 Subject: [PATCH] fix #877 fix #876 : range is a string, correct usage of spreadsheetId option. Google Sheets Source Kamelet: Range is a String and not a boolean Google Sheets Source Kamelet: Review the Kamelet --- kamelets/google-sheets-source.kamelet.yaml | 19 +++++-------------- .../google-sheets-source.kamelet.yaml | 19 +++++-------------- 2 files changed, 10 insertions(+), 28 deletions(-) diff --git a/kamelets/google-sheets-source.kamelet.yaml b/kamelets/google-sheets-source.kamelet.yaml index 3f538e4b0..edc623edd 100644 --- a/kamelets/google-sheets-source.kamelet.yaml +++ b/kamelets/google-sheets-source.kamelet.yaml @@ -32,19 +32,13 @@ spec: description: |- Receive data from Google Sheets. required: - - index - spreadsheetId - clientId - accessToken - refreshToken - clientSecret - - applicationName type: object properties: - index: - title: Index - description: An index for the google sheets endpoint - type: string spreadsheetId: title: Spreadsheet ID description: The Spreadsheet ID to be used as events source @@ -102,11 +96,9 @@ spec: - 'urn:alm:descriptor:com.tectonic.ui:checkbox' default: true range: - title: Consume from now + title: Cells Range to get Data from description: the range of rows and columns in a sheet to get data from. - type: boolean - x-descriptors: - - 'urn:alm:descriptor:com.tectonic.ui:checkbox' + type: string example: "A1:B3" types: out: @@ -117,17 +109,16 @@ spec: - "camel:google-sheets" template: from: - uri: "google-sheets-stream://{{index}}" + uri: "google-sheets-stream://{{spreadsheetId}}" parameters: clientId: "{{clientId}}" - spreadsheetId: "{{spreadsheetId}}" accessToken: "{{accessToken}}" refreshToken: "{{refreshToken}}" clientSecret: "{{clientSecret}}" delay: "{{delay}}" - applicationName: "{{applicationName}}" + applicationName: "{{?applicationName}}" splitResults: "{{splitResults}}" - range: "{{range}}" + range: "{{?range}}" repeatCount: "{{?repeatCount}}" steps: - marshal: diff --git a/library/camel-kamelets/src/main/resources/kamelets/google-sheets-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/google-sheets-source.kamelet.yaml index 3f538e4b0..edc623edd 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/google-sheets-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/google-sheets-source.kamelet.yaml @@ -32,19 +32,13 @@ spec: description: |- Receive data from Google Sheets. required: - - index - spreadsheetId - clientId - accessToken - refreshToken - clientSecret - - applicationName type: object properties: - index: - title: Index - description: An index for the google sheets endpoint - type: string spreadsheetId: title: Spreadsheet ID description: The Spreadsheet ID to be used as events source @@ -102,11 +96,9 @@ spec: - 'urn:alm:descriptor:com.tectonic.ui:checkbox' default: true range: - title: Consume from now + title: Cells Range to get Data from description: the range of rows and columns in a sheet to get data from. - type: boolean - x-descriptors: - - 'urn:alm:descriptor:com.tectonic.ui:checkbox' + type: string example: "A1:B3" types: out: @@ -117,17 +109,16 @@ spec: - "camel:google-sheets" template: from: - uri: "google-sheets-stream://{{index}}" + uri: "google-sheets-stream://{{spreadsheetId}}" parameters: clientId: "{{clientId}}" - spreadsheetId: "{{spreadsheetId}}" accessToken: "{{accessToken}}" refreshToken: "{{refreshToken}}" clientSecret: "{{clientSecret}}" delay: "{{delay}}" - applicationName: "{{applicationName}}" + applicationName: "{{?applicationName}}" splitResults: "{{splitResults}}" - range: "{{range}}" + range: "{{?range}}" repeatCount: "{{?repeatCount}}" steps: - marshal: