comparison env/lib/python3.7/site-packages/schema_salad/metaschema/map_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 ## Identifier maps
3
4 The schema may designate certain fields as having a `mapSubject`. If the
5 value of the field is a JSON object, it must be transformed into an array of
6 JSON objects. Each key-value pair from the source JSON object is a list
7 item, each list item must be a JSON objects, and the value of the key is
8 assigned to the field specified by `mapSubject`.
9
10 Fields which have `mapSubject` specified may also supply a `mapPredicate`.
11 If the value of a map item is not a JSON object, the item is transformed to a
12 JSON object with the key assigned to the field specified by `mapSubject` and
13 the value assigned to the field specified by `mapPredicate`.
14
15 ### Identifier map example
16
17 Given the following schema:
18
19 ```
20 - $include: map_res_schema.yml
21 - |
22 ```
23
24 Process the following example:
25
26 ```
27 - $include: map_res_src.yml
28 - |
29 ```
30
31 This becomes:
32
33 ```
34 - $include: map_res_proc.yml
35 - |
36 ```