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
|
- worksheet-name
|
||||||
- out-filename
|
- out-filename
|
||||||
properties:
|
properties:
|
||||||
|
files:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/direktivFile'
|
||||||
|
description: File to create before running commands.
|
||||||
|
default: []
|
||||||
infile:
|
infile:
|
||||||
type: string
|
type: string
|
||||||
description: Name of the json input file to utilise
|
description: Name of the json input file to utilise
|
||||||
in-data:
|
in-data:
|
||||||
type: object
|
type: object
|
||||||
description: json input to convert to spreadsheet
|
description: json input to convert to spreadsheet
|
||||||
@@ -89,7 +95,7 @@ paths:
|
|||||||
function: export-xlsx
|
function: export-xlsx
|
||||||
input:
|
input:
|
||||||
files:
|
files:
|
||||||
- name: /tmp/input.json
|
- name: input.json
|
||||||
data: |
|
data: |
|
||||||
jq(.input)
|
jq(.input)
|
||||||
worksheet-name: "TestSpreadsheet"
|
worksheet-name: "TestSpreadsheet"
|
||||||
@@ -108,32 +114,16 @@ paths:
|
|||||||
- name: export-xlsxSecret
|
- name: export-xlsxSecret
|
||||||
description: This is a secret value
|
description: This is a secret value
|
||||||
x-direktiv:
|
x-direktiv:
|
||||||
cmds:
|
cmds:
|
||||||
- action: exec
|
- action: exec
|
||||||
exec: ls -la
|
exec: /bin/json2excel -inputJson {{- if eq (deref .Infile) "" }} "input.json" {{- else }} {{ .Infile }} {{- end }} -worksheetName "{{ .WorksheetName }}" -outputFilename '{{ .OutFilename }}'
|
||||||
silent: false
|
silent: false
|
||||||
print: true
|
print: true
|
||||||
- action: exec
|
- action: exec
|
||||||
exec: pwd
|
exec: base64 -w 0 {{ .OutFilename }}
|
||||||
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 }}
|
|
||||||
output: |
|
output: |
|
||||||
{
|
{
|
||||||
"export-excel": {{ (index . 5).result | toJson }}
|
"export-excel": {{ (index . 1).result | toJson }}
|
||||||
}
|
}
|
||||||
x-direktiv-errors:
|
x-direktiv-errors:
|
||||||
io.direktiv.command.error: Command execution failed
|
io.direktiv.command.error: Command execution failed
|
||||||
|
Reference in New Issue
Block a user