Skip to content

Umpire Schema Reference

Top-level shape

PropertyTypeRequiredDescription
version1 (literal)yesSchema version
conditionsRecord<string, JsonConditionDef>noNamed runtime conditions
fieldsRecord<string, JsonFieldDef>yesField definitions (min 1)
rulesJsonRule[]yesRule array
validatorsRecord<string, JsonValidatorDef>noNamed portable validators
excludedExcludedRule[]noRules excluded during migration

Rule types

The type field discriminates between rule variants.

typeRequired propertiesDescription
enabledWhenfield, whenEnable a field when an expression is true
disablessource / when, targetsDisable target fields when a source is satisfied
requiresfield, (dependency | dependencies | when)Require a dependency before a field is enabled
fairWhenfield, whenMark a field as foul when an expression is true
checkfield, op (and validator params)Attach a portable validator to a field
oneOfgroup, branchesPresent exactly one named branch
anyOfrulesAt least one nested rule must pass
eitherOfgroup, branchesNamed groups of ANDed rules

All rule types accept an optional reason string for the blocking message.

requires variants

json
// Single dependency
{ "type": "requires", "field": "a", "dependency": "b" }

// Multiple dependencies
{ "type": "requires", "field": "a", "dependencies": ["b", { "op": "present", "field": "c" }] }

// Conditional dependency
{ "type": "requires", "field": "a", "when": { "op": "eq", "field": "b", "value": true } }

disables variants

json
// Source field
{ "type": "disables", "source": "a", "targets": ["b", "c"] }

// Conditional
{ "type": "disables", "when": { "op": "present", "field": "a" }, "targets": ["b"] }

Expression operators

The op field discriminates between expression variants.

Comparisons

opPropertiesDescription
eqfield, valueField equals value
neqfield, valueField does not equal value
gtfield, valueField greater than value (number)
gtefield, valueField greater than or equal (number)
ltfield, valueField less than value (number)
ltefield, valueField less than or equal (number)

Presence

opPropertiesDescription
presentfieldField has a non-empty value
absentfieldField is missing or empty
truthyfieldField value is truthy
falsyfieldField value is falsy

Membership

opPropertiesDescription
infield, valuesField value is in the list
notInfield, valuesField value is not in the list

Conditions

opPropertiesDescription
condconditionNamed condition is truthy
condEqcondition, valueNamed condition equals value
condIncondition, valuesNamed condition value is in the list
fieldInCondfield, conditionField value exists in a named array condition

Logical combinators

opPropertiesDescription
andexprsAll sub-expressions must be true
orexprsAt least one sub-expression must be true
notexprNegate a sub-expression

Check expression

opPropertiesDescription
checkfield, checkInline validator spec on a field

Validator operators

Used in top-level validators and inline in check rules and expressions.

opPropertiesDescription
emailValid email address
urlValid URL
integerInteger value
matchespatternMatches regex pattern
minLengthvalueMinimum string length
maxLengthvalueMaximum string length
minvalueMinimum numeric value
maxvalueMaximum numeric value
rangemin, maxNumeric range (inclusive)

All validators accept an optional error string for the failure message.

Field definitions

PropertyTypeDescription
requiredbooleanField must have a value
defaultstring | number | boolean | nullDefault value when absent
isEmpty"string" | "number" | "boolean" | "array" | "object" | "present"How to determine emptiness

Condition definitions

PropertyTypeDescription
type"boolean" | "string" | "number" | "string[]" | "number[]"Condition value type
descriptionstringHuman-readable description