JSON Schemas¶
Each document kind has a JSON Schema (draft 2020-12). The schemas are published at stable URLs, so editors and validators can fetch them directly.
| Document | Schema URL |
|---|---|
| Privacy model | /schema/0.1/model.schema.json |
| Catalog | /schema/0.1/catalog.schema.json |
| Presets | /schema/0.1/presets.schema.json |
Editor support¶
Add a modeline to the top of a YAML document to get completion and validation in editors that use the YAML language server:
# yaml-language-server: $schema=https://openprivacyprotocol.com/schema/0.1/model.schema.json
opp: "0.1.0.dev0"
Validate from code¶
The schemas are sources of truth for structure; the specification adds the rules a
schema cannot express, such as class resolution and the strictest-action order.
Source: schema/.