JSON Schema & Validation
JSON schema verification, validations, and corpus definitions.
OLS v1.0 is validatable. Every file must declare a schema, version, and type.
{
"$schema": "https://ols.otyg.org/schema/v1.0/corpus.schema.json",
"ols_version": "1.0.0",
"type": "corpus"
}
Validation Layers
Validation should happen in a predictable order:
- Parse JSON and reject malformed syntax.
- Select the schema declared by
$schema. - Validate required fields and value shapes.
- Verify that
ols_versionis supported andtypematches the schema. - Resolve IDs and references across the package.
- Apply active profile constraints, authority rules, and deterministic behavior checks.
JSON Schema catches structural errors, but it cannot by itself prove that a reference exists, a calendar tie is resolved, a rubric transition is possible, or content has ecclesial approval.
{
"$schema": "https://ols.otyg.org/schema/v1.0/reading.schema.json",
"ols_version": "1.0.0",
"type": "reading",
"id": "reading-john-1-1-17"
}
Use the schema for the actual file type. A manifest, reading, section, and complete corpus should not all claim corpus.schema.json merely because they are distributed together.