Schema Format
Anatomy of a domain schema — types, constraints, payloads, and trust signals.
Schema Structure
Every domain schema follows a consistent structure. Field types are limited to five primitives — there are no compound types like array or object.
{
"domain": "yon.health",
"version": "1.0",
"status": "active",
"description": "Healthcare domain covering patient data and clinical records",
"records": {
"VITALS": {
"description": "Patient vital signs",
"fields": {
"bp": {
"type": "string",
"required": true,
"pattern": "\\d+/\\d+"
},
"hr": {
"type": "int",
"required": false,
"range": [30, 250]
},
"temp_c": {
"type": "float",
"required": false,
"range": [30.0, 45.0]
},
"measured_at": {
"type": "ts",
"required": false
}
}
}
}
}
Top-Level Fields
Record Definition
Records are named groups of related fields — identified by uppercase tags (e.g., VITALS, TXN, SHIPMENT).
Field Constraints
Fields are the smallest unit — typed attributes with validation rules.
Type System
YounndAI Domains uses exactly 5 primitive types:
⚠️Warning
Previous documentation listed enum, date, datetime, array, and
object as types. These are not valid YounndAI Domain types. The enum
constraint is a property on string fields, not a type. Timestamps use the
ts type.
Four Payloads
The API supports four response payloads via the ?include= parameter:
| Payload | Description | Use Case |
|---|---|---|
schema | Records and field constraints only (default) | Validation, code generation |
metadata | Links, related domains, use cases, conformance | Documentation, discovery |
registry | Owner, tier, verification, scores | Trust evaluation, governance |
all | All three combined | Full domain detail pages |
Trust Signals
Every domain includes trust signals in the list and detail endpoints:
Default YON Settings
Domains can specify default YON processing settings:
