Update 'swagger.yaml'
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
put files back into the input schema and adjust command list accordingly
This commit is contained in:
34
swagger.yaml
34
swagger.yaml
@@ -59,9 +59,15 @@ paths:
|
||||
- worksheet-name
|
||||
- out-filename
|
||||
properties:
|
||||
files:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/definitions/direktivFile'
|
||||
description: File to create before running commands.
|
||||
default: []
|
||||
infile:
|
||||
type: string
|
||||
description: Name of the json input file to utilise
|
||||
description: Name of the json input file to utilise
|
||||
in-data:
|
||||
type: object
|
||||
description: json input to convert to spreadsheet
|
||||
@@ -89,7 +95,7 @@ paths:
|
||||
function: export-xlsx
|
||||
input:
|
||||
files:
|
||||
- name: /tmp/input.json
|
||||
- name: input.json
|
||||
data: |
|
||||
jq(.input)
|
||||
worksheet-name: "TestSpreadsheet"
|
||||
@@ -108,32 +114,16 @@ paths:
|
||||
- name: export-xlsxSecret
|
||||
description: This is a secret value
|
||||
x-direktiv:
|
||||
cmds:
|
||||
cmds:
|
||||
- action: exec
|
||||
exec: ls -la
|
||||
exec: /bin/json2excel -inputJson {{- if eq (deref .Infile) "" }} "input.json" {{- else }} {{ .Infile }} {{- end }} -worksheetName "{{ .WorksheetName }}" -outputFilename '{{ .OutFilename }}'
|
||||
silent: false
|
||||
print: true
|
||||
- action: exec
|
||||
exec: pwd
|
||||
silent: false
|
||||
print: true
|
||||
- action: exec
|
||||
exec: "/bin/bash -c \"echo '{{ .InData | toJson }}' > /tmp/input.json\""
|
||||
silent: false
|
||||
print: true
|
||||
- action: exec
|
||||
exec: find / -name '*.json'
|
||||
silent: false
|
||||
print: true
|
||||
- action: exec
|
||||
exec: /bin/json2excel -inputJson {{- if eq (deref .Infile) "" }} "/tmp/input.json" {{- else }} {{ .Infile }} {{- end }} -worksheetName "{{ .WorksheetName }}" -outputFilename '{{ .OutFilename }}'
|
||||
silent: false
|
||||
print: true
|
||||
- action: exec
|
||||
exec: base64 -w 0 /tmp/{{ .OutFilename }}
|
||||
exec: base64 -w 0 {{ .OutFilename }}
|
||||
output: |
|
||||
{
|
||||
"export-excel": {{ (index . 5).result | toJson }}
|
||||
"export-excel": {{ (index . 1).result | toJson }}
|
||||
}
|
||||
x-direktiv-errors:
|
||||
io.direktiv.command.error: Command execution failed
|
||||
|
Reference in New Issue
Block a user