Writing the schema
Output mapping
Every field that should persist data needs an output block:
| Key | Description |
|---|---|
path |
Destination key in the FDF JSON |
mode |
How to write: set, append, set_int, collect_object, append_if, etc. |
tpl |
Template for the output object ($value, $label, $id, $scheme placeholders) |
obj_key |
Key inside a repeated object (for repeatable sections) |
Common modes:
set— overwrite the pathappend— push to an arrayset_int— set as integercollect_object— gather allobj_keyvalues into an array of objectsappend_if— append only if value is non-empty
subjectScheme is usually a literal string ("UBERON", "MONDO"...). Use "$scheme" instead when the field's api can match more than one ontology at once (extra_params.ontology: "so,ncit", see Mapper strategies): it resolves per selected result, from OLS4's own ontology_prefix for that result, instead of a single scheme fixed for the whole field. A field with a single-ontology api doesn't need this — keep the literal string.
