Schema Tags Reference#
This page documents tags that are commonly used in Tony Schema definitions.
For complete operation documentation, see the Operations Reference.
Tags Used in Schemas#
| Tag | Category | Summary | Schema Usage |
|---|---|---|---|
!all |
mergeop | Apply match/patch to all array or object elements | Used in schema define: sections to constrain array/object elements. Example... |
!and |
mergeop | Match all conditions (logical AND) | Used in schema define: sections to combine multiple constraints. Example: `... |
!not |
mergeop | Negate a match condition | Used in schema accept: sections to exclude certain types. Example: `accept:... |
!or |
mergeop | Match any condition (logical OR) | Used in schema accept: and define: sections to allow multiple valid types... |
!irtype |
mergeop | Match by node type | Fundamental schema operation for type checking. Used in define: sections: `... |
Schema Context#
Tags in schemas are used in two main contexts:
define:section - Define reusable type constraintsaccept:section - Define what the schema accepts
Example:
!schema
define:
bool: !irtype true
array(t): !and
- .array
- !all.type t
accept:
!or
- .bool
- .array(string)
Related Documentation#
- Tony Schema - Complete schema documentation
- Operations Reference - All operations
- Mergeop Operations - Match and patch operations