Overview
Reference usage
A read-only view of a JSON Schema as one aligned grid with the columns Field, Type and Description. Every field is a row: the label, a small red dot after it when the field is required, its type in plain words, and the first paragraph of its description. Nested objects are indented under their field, and the raw schema document sits behind a JSON schema disclosure, so the schema is never dumped as raw JSON.
How to read it, and what feeds it:
- required first: the top-level required fields come first, then a single hairline, then the optional ones, with no group headers. Nested rows keep the schema's order and carry their own dots. The raw document keeps the file's order.
- plain types:
text,number,whole number,yes or no,list of steps(a list of objects names them by the item'stitleor the field's label),list of text,one of: activity, wait(an enum),group of fieldsandJSON schema(a field whoseformatisjson-schemaor that refers to the JSON Schema meta-schema). - choices: a
oneOforanyOfwhose members are objects lists each branch's fields under the choice, labelledIf email: Address. The branches are told apart by a property that is a constant in each one (kind: { const: 'email' }, withtype,modeandvarianttried first); that property is the choice's name for the branch and is not a row. Without one, a branch is named by itstitle, then by position (option 1). A branch's ownrequiredlist gives its dots, so only the chosen branch's dots apply. - descriptions: a description is shown up to its first blank line. Anything after it is text written for a model, and a More link opens it in place (the link turns into Less). Write the line a person reads first, then a blank line, then the rest.
- sentence-case labels:
timeZonereads "Time zone",orderId"Order ID", throughhumanizeIdentifierin sentence case. - long values: a long field name truncates on one line with the full label as its tooltip, and the dot stays after it; a value with no spaces breaks anywhere inside its cell and never widens the grid.
- phone width: when the view itself is narrower than 30rem the columns restack, with the label and type on one line, the type at the end, and the description below it with More inline after it.
Local $refs into $defs or definitions are followed and allOf members are merged, including properties that more than one member declares. A reference that points back into the object being shown is not expanded again; its type reads, for example, node (recursive). The view lists at most 500 expanded fields, and an object it did not open past that shows the same note as one beyond maxDepth. A schema that is not an object with properties shows one Value row that names its type, and a schema with no fields shows one line, "This schema takes no fields, so there is nothing to fill in.", in a bordered box instead of an empty grid.
Use it wherever a schema is shown for reading: a workflow's input and output, a tool's input, the payload of a signal or an update, a question's answer. Use JsonSchemaEditor when the schema must be edited, and PayloadInspector when you are showing a value rather than the shape it must have.
Usage
A branch’s fields indent under their choice and read “If <choice>: <field>”. Only the chosen branch’s required dots apply.
When to use
- Showing the shape of a workflow input or output, a tool input, or a signal or update payload without a raw JSON dump.
- Telling the reader which fields are required and what type each one takes.
- The schema must be edited. Use JSON Schema Editor instead
- You are showing a value rather than the shape it must have. Use Payload Inspector instead
Examples
A choice of branches
A oneOf of objects lists each branch's fields under the choice, labelled "If <choice>: <field>". The caption says how to read the branches.
A schema with no fields
One line in a bordered box instead of an empty grid, with the raw document still one disclosure away.
Long names and unbroken values
A long field name truncates on one line and its full name is its tooltip, with the required dot after it. A value with no spaces breaks inside its cell and never widens the grid.
A nested schema
Required fields first with a red dot, nested objects indented, and the raw document behind the JSON schema disclosure.
A workflow file's schema
Field, Type and Description on one grid. Required fields come first, marked by a red dot after the label, with one hairline before the rest. Types are plain words, nested rows indent under their parent, and More opens the model-facing text in place.
Props
Name | Type | Default | Description |
|---|---|---|---|
schema required | unknown | The JSON Schema to show, as a parsed object. Local $refs into $defs or
definitions are followed and allOf members are merged. A schema that is
not an object with properties shows one Value line naming its type. | |
label | text | 'Schema' | Accessible name of the view, for example "Workflow input". It is the
aria-label of the region, so name what the schema describes. |
maxDepth | number | 8 | How many levels of nested objects are expanded. Deeper objects show their line without their fields, and the raw document still holds them. |
rawLabel | text | 'JSON schema' | Label of the disclosure that reveals the raw schema document. |
emptyLabel | text | 'This schema takes no fields, so there is nothing to fill in.' | Text shown, in a bordered box instead of an empty grid, when the schema declares no fields. |
caption | text | A note shown as the last line of the frame, below the rows. Use it to say how to read the grid, for example how a choice's branches are labelled. |