diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/env/lib/python3.7/site-packages/schema_salad/metaschema/map_res.yml	Sat May 02 07:14:21 2020 -0400
@@ -0,0 +1,36 @@
+- |
+  ## Identifier maps
+
+  The schema may designate certain fields as having a `mapSubject`.  If the
+  value of the field is a JSON object, it must be transformed into an array of
+  JSON objects.  Each key-value pair from the source JSON object is a list
+  item, each list item must be a JSON objects, and the value of the key is
+  assigned to the field specified by `mapSubject`.
+
+  Fields which have `mapSubject` specified may also supply a `mapPredicate`.
+  If the value of a map item is not a JSON object, the item is transformed to a
+  JSON object with the key assigned to the field specified by `mapSubject` and
+  the value assigned to the field specified by `mapPredicate`.
+
+  ### Identifier map example
+
+  Given the following schema:
+
+  ```
+- $include: map_res_schema.yml
+- |
+  ```
+
+  Process the following example:
+
+  ```
+- $include: map_res_src.yml
+- |
+  ```
+
+  This becomes:
+
+  ```
+- $include: map_res_proc.yml
+- |
+  ```