Skip to content

Commit 2da084e

Browse files
author
Peter Amstutz
committed
Add mapSubject and mapPredicate to metaschema.
1 parent 2b00752 commit 2da084e

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

schema_salad/metaschema/metaschema.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,22 @@ $graph:
123123
If true, this indicates that link validation traversal must stop at
124124
this field. This field (it is is a URI) or any fields under it (if it
125125
is an object or array) are not subject to link checking.
126-
126+
- name: mapSubject
127+
type: ["null", string]
128+
doc: |
129+
If the value of the field is a JSON object, it must be transformed
130+
into an array of JSON objects, where each key-value pair from the
131+
source JSON object is a list item, the list items must be JSON objects,
132+
and the key is assigned to the field specified by `mapSubject`.
133+
- name: mapPredicate
134+
type: ["null", string]
135+
doc: |
136+
Only applies if `mapSubject` is also provided. If the value of the
137+
field is a JSON object, it is transformed as described in `mapSubject`,
138+
with the addition that when the value of a map item is not an object,
139+
the item is transformed to a JSON object with the key assigned to the
140+
field specified by `mapSubject` and the value assigned to the field
141+
specified by `mapPredicate`.
127142
128143
- name: SpecializeDef
129144
type: record

0 commit comments

Comments
 (0)