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.
- Files built from other files
- Status: draft
- Version: 1.0.0
- Format name in the file:
open-values-presentation-package
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
| Field | What it means | Type |
|---|---|---|
format required | Names the file format. Always open-values-presentation-package. | always "open-values-presentation-package" |
version required | The version of this format the file follows. Always 1.0.0. | always "1.0.0" |
built required | The date of the package, as YYYY-MM-DD, copied from the updated date in the strings file. | string |
consumer required | The code the package is built for. Currently P5 presentation implementation. | string |
sources required | Paths of the source files the package was built from: the ontology, strings, page kinds, fixtures and source index. | list of string |
taxonomy required | The navigation tree a presentation shell shows, resolved from content/ontology.json, with a route for every decision. | object |
strings required | The public copy from content/presentation/strings.json, without the format, version and updated fields. | object |
pageKinds required | The ten page kinds from content/presentation/page-kinds.json, in order. | list |
fixtures required | The fixture sets from content/presentation/fixtures.json: three test cases for each of the ten page kinds. | list |
sourceIndex required | The source records from content/presentation/sources.json. | object |
checksum required | A 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.