Declared input schema — rule-line's supported JSON Schema subset
A ruleset declares the shape of the input job data it expects as inputSchema, written in
rule-line's supported JSON Schema subset — a deliberate DIALECT of JSON Schema, not the full
specification. Every construct the declaration uses must be one rule-line's type checker can
reason about. A construct outside this subset is refused when the ruleset is saved, by name and
by position, rather than accepted and silently treated as an unknown type.
A declared object is complete
This is the one place this subset departs from ordinary JSON Schema, and it changes what you may
send. An object declared under properties is CLOSED: the properties listed there are the
whole of that object's shape. A field not listed is not part of the input, no formula in the
ruleset may read one, and a payload carrying an extra field beyond the declaration is not what the
ruleset was checked against. Ordinary JSON Schema leaves an object open by default — this subset
does not. additionalProperties: false is accepted only as a redundant restatement of that
default; see the refused constructs table below for what happens if you try to declare an open
object instead.
Supported keywords
| Keyword | Applies to | Meaning |
|---|---|---|
type | any schema node | Declares the node's own kind — one scalar or container type name, or an array of scalar type names for a nullable/union field (see the refused table for wider unions). |
properties | an object node | Declares the field names an accepted object has. The declared properties are the WHOLE of that object's shape — a field not listed here is not part of the input, and a formula may not read one. |
required | an object node | Names which declared properties must be present. Every entry must be a string naming one of the same object's own declared properties — an entry naming an undeclared property, or one that is not a string, is refused by name and path. A property left out is not removed — it becomes nullable, and every field access still sees either the value or null. |
items | an array node | Declares the single element type every position in the array must satisfy. An array with no items is not accepted. |
enum | a node with a scalar type, declared or inferable | Constrains which values a field may hold, without changing that field's declared type. The enumerated values themselves are read once to decide the type and are not carried into the type system. |
additionalProperties | an object node | May only be the literal false — a redundant restatement that the declared properties are already the object's whole shape. true or a schema value are both refused; see the refused table. |
scale | a declared output (the ruleset's output schema or an extract step's target schema), on a number or integer node | Constrains a decimal value's number of decimal places, checked as an integer comparison. An integer node carries a scale of 0 without restating it. Legal only on a declared output, where it is enforced: a value with more decimals than the scale fails the run's result check against the ruleset's output schema, and fails an extract step's answer against its target schema. Nothing checks a value against a declared scale anywhere else, so it is refused there by name and path. |
description | any schema node | A plain-text note about what the field holds. It must be a string. It changes no type: the field is typed exactly as it would be without it. |
format | a string node, or a type array in which every member other than null is string | States that a text field holds a date (date) or a date with a time (date-time). Those are the only two values. It changes no type: the field stays text. It is refused on any node that is not text. |
Supported types
Every type name below converts to the one machine token shown, exactly as a diagnostic's expected or actual field would name it.
| Type name | Kind | Becomes |
|---|---|---|
string | scalar | string |
number | scalar | decimal |
integer | scalar | decimal |
boolean | scalar | boolean |
null | scalar | null |
object | container | object |
array | container | array<T> |
A type field may also be an array of the scalar type names above — the one way to express a
nullable or multi-kind field, for example ["string", "null"]. A type array may not contain
object or array.
Refused constructs
Each construct below is refused when the ruleset is saved. The declaration is rejected outright — it does not save with a warning.
| Construct | Write this instead |
|---|---|
oneOf | a type array, for example ["string", "null"] for the common nullable case |
anyOf | a type array |
allOf | a single object node declaring every combined property directly |
not | no equivalent — declare the field with a construct this subset admits |
$ref | no equivalent — copy the referenced schema inline |
patternProperties | no equivalent — declare each expected field explicitly under properties |
additionalProperties: true | omit additionalProperties, or declare it as false — every accepted object is already closed |
a schema-valued additionalProperties | declare the extra fields explicitly under properties instead of describing them separately |
Any keyword or type name not listed anywhere on this page is refused the same way — an unrecognized construct is never accepted and silently treated as an unknown type.
What happens when a construct is refused
A refused construct is reported at save time, naming the exact position in inputSchema where it
appears — not just that the schema as a whole was rejected. When a value's type genuinely cannot be
worked out from this subset (for example, an AI extraction's result), the ruleset author declares
that step's output type explicitly rather than the engine assuming a shape for it.
Declaring a step's own output shape
Some steps produce a value rule-line cannot work out in advance from already-declared input and
already-checked formulas — a dataset lookup's row shape, a converted XML document's shape, or an AI
extraction's result. For a step like this, the author may declare the step's own output shape using
assertedOutput, written in this exact same supported subset.
The declaration may be written on any step, but it is only meaningful where rule-line cannot already work the shape out on its own — including a position where rule-line can work out most of a step's shape but not one particular part of it. rule-line trusts the declaration when the ruleset is checked, and verifies it again when the ruleset actually runs, stopping the step if its real output does not match what was declared.
Declaring a shape rule-line can already work out on its own is refused, not merely reported — the ruleset cannot be activated until the unnecessary declaration is removed.