I am trying to write a tool where a record describes one of the inputs and the input itself is optional but if it is there then all parts of the input (all fields in the record) must be there. Here is a non-working example:
class: CommandLineTool cwlVersion: v1.1 baseCommand: - echo inputs: one: type: - 'null' - type: record fields: - name: one type: string inputBinding: position: 1 - name: two type: string inputBinding: position: 2 two: type: string outputs: output_one: type: stdout stdout: output.txt
This example does not work because
one.two are required arguments. What I intend to express is that
one is optional but if it is there then
one.two are required. If I make the fields optional (i.e. type
string?) then each of them can be provided or not, independently. That is also not correct.
I hope my question is clear.