JSON Schema Package

The raw INHERIT JSON Schemas (Draft 2020-12), JSON-LD contexts, and reference data. Use these to build validators, generate types, or integrate INHERIT into any toolchain.

JSON Schema v6.0.02 min read
Package: @openinherit/schema

Installation#

bash
npm install @openinherit/schema

This is a data-only package — no runtime code, no dependencies.

What’s included#

Export path Contents
./v3/* Current INHERIT v3 JSON Schemas (Draft 2020-12)
./v2/* Legacy v2 schemas
./v1/* Legacy v1 schemas
./reference-data/* Reference data files (jurisdictions, asset types, etc.)
./extensions-registry.json Registry of all jurisdiction extensions

Quick start#

Import a schema directly#

javascript
import estateSchema from '@openinherit/schema/v3/schema.json';
import catalogueSchema from '@openinherit/schema/v3/catalogue.json';

Use with Ajv (JSON Schema validation)#

javascript
import Ajv from 'ajv/dist/2020';
import estateSchema from '@openinherit/schema/v3/schema.json';

const ajv = new Ajv();
const validate = ajv.compile(estateSchema);

const valid = validate(document);
if (!valid) {
  console.log(validate.errors);
}

Schema structure#

The v3 schemas define the full INHERIT data model:

Core entities#

Schema Description
schema.json Root estate document schema
catalogue.json Asset catalogue schema
person.json People (testators, beneficiaries, executors)
asset.json Financial and physical assets
property.json Real estate and land
trust.json Trust structures
bequest.json Bequests and gifts
executor.json Executor appointments
guardian.json Guardian appointments
wish.json Non-binding wishes

Supporting entities#

Schema Description
document.json Attached documents (wills, codicils, deeds)
relationship.json Relationships between people
liability.json Debts and liabilities
valuation.json Asset valuations
nonprobate-transfer.json Transfers that bypass probate

Jurisdiction extensions#

Extensions add jurisdiction-specific fields to the base schemas. The extensions registry lists all available extensions with their maturity level, legal tradition, and key features.

javascript
import registry from '@openinherit/schema/extensions-registry.json';

// List all extensions
for (const ext of registry.extensions) {
  console.log(`${ext.name} (${ext.maturity}): ${ext.keyFeatures.join(', ')}`);
}

API reference#

This package has no runtime API — it provides raw schema files. Use them with any JSON Schema Draft 2020-12 compliant validator:

Examples#

Load reference data#

javascript
import jurisdictions from '@openinherit/schema/reference-data/jurisdictions.json';

for (const j of jurisdictions) {
  console.log(`${j.code}: ${j.name}`);
}

Access extension schemas#

javascript
import ukExt from '@openinherit/schema/v3/extensions/uk-england-wales/uk-england-wales.json';

Get in touch

Have a question about INHERIT, or interested in becoming a partner? We'd love to hear from you.

By submitting this form, you agree to our Privacy Policy. Your data is processed by Formspark (EU) and retained until your enquiry is resolved.

or email hello@openinherit.org