◇ Open Values Standardfor builders

Spec / open-values-presentation-package

Open Values Presentation Package v1.0

One generated file holding everything a site's page layer needs: the navigation tree with a route for every decision, the public wording, the ten page kinds, their test cases and the source index. The presentation build writes it from the files it lists, and the app reads it.

Draft. It may still change before it is called stable. A file a build step makes from other files. Change the sources, not this file.

Who writes it and who reads it

Written by pipeline/build_presentation.js. Read by P5 presentation implementation.

Fields

FieldWhat it meansType
format requiredNames the file format. Always open-values-presentation-package.always "open-values-presentation-package"
version requiredThe version of this format the file follows. Always 1.0.0.always "1.0.0"
built requiredThe date of the package, as YYYY-MM-DD, copied from the updated date in the strings file.string
consumer requiredThe code the package is built for. Currently P5 presentation implementation.string
sources requiredPaths of the source files the package was built from: the ontology, strings, page kinds, fixtures and source index.list of string
taxonomy requiredThe navigation tree a presentation shell shows, resolved from content/ontology.json, with a route for every decision.object
strings requiredThe public copy from content/presentation/strings.json, without the format, version and updated fields.object
pageKinds requiredThe ten page kinds from content/presentation/page-kinds.json, in order.list
fixtures requiredThe fixture sets from content/presentation/fixtures.json: three test cases for each of the ten page kinds.list
sourceIndex requiredThe source records from content/presentation/sources.json.object
checksum requiredA SHA-256 hash of the rest of the package, written as sha256: followed by 64 hex characters.string

This format allows no fields beyond the list above. A writer MUST NOT add any.

The schema

Its address is https://openvaluesstandard.org/schema/presentation-package-v1.0.schema.json. Validators can fetch it there; the file is also in the repository at app/data/standard/schemas/presentation-package.schema.json.

The key words MUST, MUST NOT, SHOULD, SHOULD NOT and MAY are used as described in RFC 2119 and RFC 8174 when, and only when, they appear in capitals.

Whether this format fits your app is your call. The spec says what a file MUST hold. Which formats you read and write, and what your app does with them, is yours to decide.