Model Data Components
Model Data Components

Inject YAML model data into spec content: ObjectLink, Field, ObjectList, ObjectTable, Each, and If/Else.

Model data components let you pull data from your YAML models (objects, their fields, links, tags, and attributes) directly into Markdown content. Use them to build object tables and lists, link to objects by title, or inject a single field value anywhere in a sentence.

All of them read from the same source as the Objects diagram and resolve the model from model_key (falling back to the current route’s model). The examples across these pages use the deployment model from this project.

Object ids are model-relative

The object attribute and id patterns in filters are written relative to the model — without the model_key prefix. With model_key="deployment", the object deployment.iomodel.studio is referenced as object="iomodel.studio".

Components at a glance

ComponentKindPurpose
ObjectLinkinlineLink to an object (text defaults to the object title)
FieldinlineInsert one field value of an object
ObjectListblock<ul> of links to objects matching a filter
ObjectTableblockTable of objects with configurable columns
EachblockRepeat a template per object / per links/tags/attributes
If / ElseblockShow or hide content based on a field predicate

How it works

These components are driven by a small shared model: a flat list of objects (with model-relative ids) plus their fields, links, tags, and attributes.

  • ObjectLink and Field are inline — drop them into a sentence.
  • ObjectList and ObjectTable are block components that take a YAML body (filter, and for tables, columns).
  • Each is a loop: write the per-item body once, and it repeats for each item, exposing the current item to Field / ObjectLink / If.
  • If / Else is a flat conditional for the current item (or a standalone object).

Id masks

Id patterns are matched relative to the model:

PatternMatches
iomodel.studioexactly that object
*one level (*iomodel; iomodel.*iomodel.studio, iomodel.postgres)
**recursive (** → everything, including nested children)

Start here

Constraints

  • Each / ObjectList / ObjectTable cannot be nested in one another.
  • If cannot be nested, and supports a single <Else /> (no else if).
  • Links are always rendered by ObjectLink (no [text](url) with components inside).
  • Filtering uses id masks + include/exclude only (no sorting/grouping/computed selects).

Last updated on