On this page Validation Layers

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:

  1. Parse JSON and reject malformed syntax.
  2. Select the schema declared by $schema.
  3. Validate required fields and value shapes.
  4. Verify that ols_version is supported and type matches the schema.
  5. Resolve IDs and references across the package.
  6. 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.