Skip to content

Appendix A — JSON Schema

Contents of DID 0.2

The normative JSON Schema is published as did.schema.json (JSON Schema draft 2020-12), $id https://etalii.net/adp/did/schema/0.2/did.schema.json. Its root, #/$defs/Definition, validates definitions, and every definition example validates against it. A definition that names the 0.1 $id is validated against this schema.

$defs Validates
Definition A stored diagram (section 3).
ElementRecord An element record.
RelationRecord A relation record (target optional since 0.2).
ViewRecord A view record.
NodeView The view data of a node.
EdgeView The view data of an edge.

QualifiedId, SemVer and Point are referenced from https://etalii.net/adp/disl/schema/0.2/disl.schema.json. As in DISL, all objects forbid unknown properties except extension properties matching ^x-. Rules that JSON Schema cannot express — conformance to the specification's metamodel, id uniqueness, resolvable references, the value forms of section 3 and whether a relation may omit its target — are the job of a DID validator that has the specification loaded.