diff --git a/swagger.yaml b/swagger.yaml index f7546b1..4b58424 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -56,6 +56,10 @@ paths: schema: type: object properties: + infile: + type: string + description: Name of the json input file to utilise + #default: "/tmp/input.json" worksheet-name: type: string description: Label for the worksheet created in the spreadsheet @@ -80,7 +84,7 @@ paths: function: export-xlsx input: files: - - name: input.json + - name: /tmp/input.json data: | jq(.input) worksheet-name: "TestSpreadsheet" @@ -91,7 +95,7 @@ paths: x-direktiv: cmds: - action: exec - exec: /bin/json2excel -inputJson input.json -worksheetName "{{ .WorksheetName }}" -outputFilename '{{ .OutFilename }}' + exec: /bin/json2excel -inputJson {{- if eq (deref .Infile) "" }} "/tmp/input.json" {{- else }} {{ .Infile }} {{- end }} input.json -worksheetName "{{ .WorksheetName }}" -outputFilename '{{ .OutFilename }}' silent: false print: true - action: exec