Skip to content

Commit 88ba008

Browse files
committed
formatting tweaks
1 parent 144a1e1 commit 88ba008

File tree

1 file changed

+25
-24
lines changed

1 file changed

+25
-24
lines changed

concepts.md

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,13 @@ An implementation may formally validate the structure of a CWL document using
9191
SALAD schemas located at
9292
https://github.com/common-workflow-language/common-workflow-language/tree/master/v1.1.0-dev1
9393

94-
### <a name="map">`map<>`</a>
94+
### map
9595

9696
Note: This section is non-normative.
97+
> type: array&lt;ComplexType&gt; |
98+
> map&lt;`key_field`, ComplexType&gt;
9799
98-
The
99-
> type: array<ComplexType> |
100-
> map<`key_field`, ComplexType>
101-
syntax in the CWL specifications means there are two or more ways to write the given value.
100+
The above syntax in the CWL specifications means there are two or more ways to write the given value.
102101

103102
Option one is a array and is the most verbose option.
104103
In our example here we use the generic`ComplexType`, but
@@ -108,7 +107,7 @@ in reality it would be one of `InputRecordField`, `OutputRecordField`,
108107
`WorkflowInputParameter`, `WorkflowOutputParameter`, `WorkflowStep`,
109108
`ExpressionToolOutputParameter`, or a specific `*Requirement` entry.
110109

111-
Generic example:
110+
A generic example:
112111
```
113112
some_cwl_field:
114113
- key_field: a_complex_type1
@@ -120,9 +119,9 @@ some_cwl_field:
120119
- key_field: a_complex_type3
121120
```
122121

123-
Specific example using [Workflow.inputs](Workflow.html#InputParameter):
124-
> array<InputParameter> |
125-
> map<`id`, `type` | InputParameter>
122+
A specific example using [Workflow](Workflow.html#Workflow).[inputs](Workflow.html#WorkflowInputParameter):
123+
> array&lt;InputParameter&gt; |
124+
> map&lt;`id`, `type` | InputParameter&gt;
126125
127126

128127
```
@@ -142,7 +141,7 @@ without the key field. If all of the other fields of the `ComplexType` are
142141
optional and unneeded, then we can indicate this with an empty mapping as the
143142
value: `a_complex_type3: {}`
144143

145-
Generic example:
144+
A generic example:
146145
```
147146
some_cwl_field:
148147
a_complex_type1: # this was the "key_field" from above
@@ -154,9 +153,9 @@ some_cwl_field:
154153
a_complex_type3: {} # we accept the defualt values for "field2" and "field3"
155154
```
156155

157-
Specific example using [Workflow.inputs](Workflow.html#InputParameter):
158-
> array<InputParameter> |
159-
> map<`id`, `type` | InputParameter>
156+
A specific example using [Workflow](Workflow.html#Workflow).[inputs](Workflow.html#WorkflowInputParameter):
157+
> array&lt;InputParameter&gt; |
158+
> map&lt;`id`, `type` | InputParameter&gt;
160159
161160

162161
```
@@ -170,23 +169,24 @@ inputs:
170169
```
171170

172171
Sometimes we have a third and even more compact option denoted like this:
173-
"type: `array<ComplexType> | map<key_field, field2 | ComplexType>`"
172+
> type: array&lt;ComplexType&gt; |
173+
> map&lt;`key_field`, `field2` | ComplexType&gt;
174174
175175
For this example, if we only need the `key_field` and `field2` when specifying
176176
our `ComplexType`s (because the other fields are optional and we are fine with
177177
their default values) then we can abbreviate.
178178

179-
Here's the generic example:
179+
A generic example:
180180
```
181181
some_cwl_field:
182182
a_complex_type1: foo # we accept the default value for field3
183183
a_complex_type2: foo2 # we accept the default value for field3
184184
a_complex_type3: {} # we accept the defualt values for "field2" and "field3"
185185
```
186186

187-
Specific example using [Workflow.inputs](Workflow.html#InputParameter):
188-
> array<InputParameter> |
189-
> map<`id`, `type` | InputParameter>
187+
A specific example using [Workflow](Workflow.html#Workflow).[inputs](Workflow.html#WorkflowInputParameter):
188+
> array&lt;InputParameter&gt; |
189+
> map&lt;`id`, `type` | InputParameter&gt;
190190
191191

192192
```
@@ -199,7 +199,7 @@ inputs:
199199

200200
What if some entries we want to mix the option 2 and 3? You can!
201201

202-
Generic example:
202+
A generic example:
203203
```
204204
some_cwl_field:
205205
my_complex_type1: foo # we accept the default value for field3
@@ -211,9 +211,9 @@ some_cwl_field:
211211
# "field2" and "field3"
212212
```
213213

214-
Specific example using [Workflow.inputs](Workflow.html#InputParameter):
215-
> array<InputParameter> |
216-
> map<`id`, `type` | InputParameter>
214+
A specific example using [Workflow](Workflow.html#Workflow).[inputs](Workflow.html#WorkflowInputParameter):
215+
> array&lt;InputParameter&gt; |
216+
> map&lt;`id`, `type` | InputParameter&gt;
217217
218218

219219
```
@@ -228,8 +228,9 @@ inputs:
228228
```
229229

230230

231-
Note: The `map<…>` version is optional, the verbose option #1 is always allowed,
232-
but for presentation reasons option 3 and 2 may be preferred by human readers.
231+
Note: The `map<…>` (compact) versions are optional, the verbose option #1 is
232+
always allowed, but for presentation reasons option 3 and 2 may be preferred
233+
by human readers.
233234

234235
The normative explanation for these variations, aimed at implementors, is in the
235236
[Schema Salad specification](SchemaSalad.html#Identifier_maps).

0 commit comments

Comments
 (0)