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