Extension Mechanisms

Extension Mechanisms#

The FAIR Data JSON Schema extends the standard JSON Schema (Draft 2020-12) through four primary mechanisms. These allow for rich semantic metadata and data stewardship features while maintaining 100% compatibility with standard validators.

🏷️ Annotations

The lightest way to add metadata. Custom keywords are used as annotations that validators ignore but specialized tools use.

Mechanism 1: Custom Annotations
πŸ“š Vocabularies

Define new sets of keywords and their associated validation logic using the $vocabulary keyword.

Mechanism 2: $vocabulary Declaration
πŸ—£οΈ Dialects

A specific β€œflavor” of JSON Schema that combines multiple vocabularies under a custom $schema URI.

Mechanism 3: Custom Dialect ($schema)
πŸ’Ž Refinements

Advanced constraints that go beyond simple data types, such as physical units or semantic classifications.

Mechanism 4: $defs Keyword Refinements