comparison env/lib/python3.7/site-packages/schema_salad/metaschema/typedsl_res.yml @ 0:26e78fe6e8c4 draft

"planemo upload commit c699937486c35866861690329de38ec1a5d9f783"
author shellac
date Sat, 02 May 2020 07:14:21 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:26e78fe6e8c4
1 - |
2 ## Domain Specific Language for types
3
4 Fields may be tagged `typeDSL: true` in `jsonldPredicate`. If so, the field is expanded using the
5 following micro-DSL for schema salad types:
6
7 * If the type ends with a question mark `?`, the question mark is stripped off and the type is expanded to a union with `null`
8 * If the type ends with square brackets `[]` it is expanded to an array with items of the preceeding type symbol
9 * The type may end with both `[]?` to indicate it is an optional array.
10 * Identifier resolution is applied after type DSL expansion.
11
12 ### Type DSL example
13
14 Given the following schema:
15
16 ```
17 - $include: typedsl_res_schema.yml
18 - |
19 ```
20
21 Process the following example:
22
23 ```
24 - $include: typedsl_res_src.yml
25 - |
26 ```
27
28 This becomes:
29
30 ```
31 - $include: typedsl_res_proc.yml
32 - |
33 ```