Schemas · v1 · 1.0-rc
JSON Schema, 2020-12, one file per object type.
The schemas are normative for the JSON form of CanPUFF
objects. Each is served here at the exact URL it declares as its
$id, so a validator can resolve them over the network without
any rewriting.
Precision limits (grams to 4 decimal places, money to 2) are writer
requirements and are deliberately not asserted by the schemas —
IEEE-754 multipleOf is unreliable. See
Core §2.
-
manifest.jsonVault identity and format version — the file that makes a directory a vault. Core §3.1 -
consumption.jsonThe journal event: what was consumed, when, how much, with whom, to what effect. Core §4.1 -
supply.jsonA package on hand — potency, terpenes, cost, remaining grams. Core §5.1 -
shop.jsonWhere it was bought, including delivery and loyalty identifiers. Core §5.2 -
chain.jsonA retail chain a shop belongs to. Core §5.2 -
brand.jsonA product brand, optionally pointing at its producer. Core §5.3 -
producer.jsonThe licensed producer behind a brand. Core §5.3 -
method.jsonA way of consuming, with aliases for quick and voice entry. Core §5.4 -
tax-rate.jsonA named tax applied to purchases; the math is normative. Core §5.5 -
terpene.jsonAn optional dictionary entry: aroma, common effects, boiling point. Core §5.6 -
tombstone.jsonA deleted object reduced to a deletion marker — what stops deleted records resurrecting on import. Core §2
Validating a whole vault? The schemas cover individual objects.
Vault-level rules — file placement, id uniqueness across tiers, attachment
content-addressing, catalog round-tripping — are checked by
validate-vault.py.