From 1f1e172f2eb443af9e7db114bc44f4884e841eba Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 10 Feb 2023 17:20:17 +1100 Subject: [PATCH] Update 'swagger.yaml' Update example --- swagger.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/swagger.yaml b/swagger.yaml index 81aaf5d..d9e1604 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -68,9 +68,6 @@ paths: infile: type: string description: Name of the json input file to utilise - in-data: - type: object - description: json input to convert to spreadsheet worksheet-name: type: string description: Label for the worksheet created in the spreadsheet @@ -87,7 +84,7 @@ paths: type: knative-workflow x-direktiv-examples: # ADD MORE EXAMPLES HERE - - title: Rely on Direktiv to create input file + - title: Basic content: |- - id: export-xlsx type: action @@ -100,16 +97,19 @@ paths: jq(.input) worksheet-name: "TestSpreadsheet" out-filename: example.xlsx - - title: Use function to create input file + - title: Use jq to add a parent key 'input' containing array of objects content: |- - id: export-xlsx type: action action: function: export-xlsx - input: + input: + files: + - name: input.json + data: | + jq(.array | {input: . } | tostring ) worksheet-name: "TestSpreadsheet" - out-filename: example.xlsx - in-data: jq(.array | tostring) + out-filename: example.xlsx x-direktiv-secrets: - name: export-xlsxSecret description: This is a secret value