Summary
Running npm test reveals several pre-existing failures that were never caught because the Node.js validator crashes before completing. This issue documents all of them so they can be fixed together.
1. Node.js validator crashes (MissingRefError)
code/validate.js loads schemas from schema/index.js, but alignment/alignment.schema.json is not registered there. Since type.schema.json references it via $ref, AJV throws:
MissingRefError: can't resolve reference alignment/alignment.schema.json
from id https://burrito.bible/schema/type.schema.json
Fix: add require("./alignment/alignment.schema.json") to schema/index.js.
2. audioAlignment.json and audioTranslation.json missing idAuthorities
Both example files lack the idAuthorities field, which source_metadata.schema.json requires. audioAlignment.json was added in caad42c without it; audioTranslation.json also lacks it.
Fix: add an idAuthorities block to both example files.
3. textTranslation_derived.json — relationType: "parascriptural" has no schema case
The example contains:
{ "relationType": "parascriptural", "flavor": "alignment", "id": "agmt::irvmal-4-wh" }
relationship.schema.json defines a top-level oneOf with four cases: source, target, expression, and x- custom flavors. There is no case for relationType: "parascriptural" or "peripheral" with standard flavor names, even though both are valid relationType values in the properties enum.
Decision needed: add oneOf cases for parascriptural and peripheral, or change the example to use a valid combination.
4. wrapper.json validated against burrito metadata schema
The npm test glob docs/examples/artifacts/*.json includes wrapper.json, which is a Scripture Burrito Wrapper file ("format": "scripture burrito wrapper"), not a burrito metadata file. Because meta.category is absent, metadata.schema.json's if condition (meta.category == "source") is vacuously satisfied and the file is routed to source_metadata, where it fails languages required.
Fix options:
- Exclude
wrapper.json from the test glob, or
- Add a
format == "scripture burrito" guard at the top of metadata.schema.json
Notes
- All four failures are pre-existing; none were introduced by recent schema changes.
- The Node.js crash masks the Python failures when running
npm test.
- The Python validator (
code/validate.py) surfaces failures 2–4 when run directly.
Summary
Running
npm testreveals several pre-existing failures that were never caught because the Node.js validator crashes before completing. This issue documents all of them so they can be fixed together.1. Node.js validator crashes (MissingRefError)
code/validate.jsloads schemas fromschema/index.js, butalignment/alignment.schema.jsonis not registered there. Sincetype.schema.jsonreferences it via$ref, AJV throws:Fix: add
require("./alignment/alignment.schema.json")toschema/index.js.2.
audioAlignment.jsonandaudioTranslation.jsonmissingidAuthoritiesBoth example files lack the
idAuthoritiesfield, whichsource_metadata.schema.jsonrequires.audioAlignment.jsonwas added in caad42c without it;audioTranslation.jsonalso lacks it.Fix: add an
idAuthoritiesblock to both example files.3.
textTranslation_derived.json—relationType: "parascriptural"has no schema caseThe example contains:
{ "relationType": "parascriptural", "flavor": "alignment", "id": "agmt::irvmal-4-wh" }relationship.schema.jsondefines a top-leveloneOfwith four cases:source,target,expression, andx-custom flavors. There is no case forrelationType: "parascriptural"or"peripheral"with standard flavor names, even though both are validrelationTypevalues in the properties enum.Decision needed: add
oneOfcases forparascripturalandperipheral, or change the example to use a valid combination.4.
wrapper.jsonvalidated against burrito metadata schemaThe npm test glob
docs/examples/artifacts/*.jsonincludeswrapper.json, which is a Scripture Burrito Wrapper file ("format": "scripture burrito wrapper"), not a burrito metadata file. Becausemeta.categoryis absent,metadata.schema.json'sifcondition (meta.category == "source") is vacuously satisfied and the file is routed tosource_metadata, where it failslanguagesrequired.Fix options:
wrapper.jsonfrom the test glob, orformat == "scripture burrito"guard at the top ofmetadata.schema.jsonNotes
npm test.code/validate.py) surfaces failures 2–4 when run directly.