This repository contains the OTIO core model specification and the node scripts necessary to generate:
- an HTML representation of the specification
- a JSON Schema for the JSON serialization defined by the specification.
The specification is contained in a single markdown document (src/main/md/otio-core.md
) that combines:
- specification prose
- figures (rendered figures are stored under
figures
while corresponding source files are undersrc/main/resources
) - inline UML diagrams that conform to the PlantUML syntax
- inline JSON Schema snippets
Combining these elements into a single document prevents divergence between prose, data model representation and JSON serialization.
The specification is built using node scripts as follows:
script/build.js
: the markdown document, including the inline UML diagrams, is rendered to HTML, and the inline JSON schema snippets are extracted and combined into a standalone document. The latter steps uses the handlebar template atsrc/main/templates/otio.schema.hbs
script/test.js
: the standalone JSON schema document is tested against a collection of sample files atsrc/test/json
- Install node dependencies:
npm install
- Run the build script to generate the rendered specification:
npm run build
The rendered specification consists of the following files under the build
directory:
index.html
: the specification, which embeds all figures and rendered UML diagramsotio.schema.json
: the JSON schema document
figures
: rendered figures used by the specificationscripts
: build and test scriptssrc/main/md/otio-core.md
: source specificationsrc/main/resources/*.vsd
: source files for the specification figuressrc/main/templates/otio.schema.hbs
: template used to generate the JSON schema documentsrc/test/json
: sample OTIO documents used to test the generated JSON schemapackage.json
andpackage-lock.json
: NPM dependency specifications