Skip to content

Commit f368628

Browse files
jdidionmr-c
andcommitted
add conformance test for nested types in SchemaDefRequirement
Co-authored-by: Michael R. Crusoe <[email protected]>
1 parent fa6d28f commit f368628

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

conformance_tests.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3473,3 +3473,11 @@
34733473
size: 14
34743474
checksum: sha1$0074b1841ab5103cc0442f739d9fb41a33b602ee
34753475
tags: [ step_input, workflow ]
3476+
3477+
- id: nested_types
3478+
job: tests/nested_types.yaml
3479+
tool: tests/nested_types.cwl
3480+
doc: demonstrate usage of nested types
3481+
output:
3482+
their_name: "Foo Bar"
3483+
tags: [ require, command_line_tool ]

tests/nested_types.cwl

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env cwl-runner
2+
cwlVersion: v1.2
3+
class: CommandLineTool
4+
5+
requirements:
6+
SchemaDefRequirement:
7+
types:
8+
- name: name
9+
type: record
10+
fields:
11+
- name: first
12+
type: string
13+
- name: last
14+
type: string
15+
- name: person
16+
type: record
17+
fields:
18+
- name: name
19+
type: name
20+
- name: age
21+
type: int
22+
inputs:
23+
my_person: person
24+
25+
outputs:
26+
their_name: string
27+
28+
baseCommand: echo
29+
30+
stdout: cwl.output.json
31+
32+
arguments:
33+
- '{"their_name": "$(inputs.my_person.name.first) $(inputs.my_person.name.last)" }'

tests/nested_types.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
my_person:
2+
name:
3+
first: Foo
4+
last: Bar
5+
age: 42

0 commit comments

Comments
 (0)