JSON Schemas
These are the canonical, resolvable JSON Schema documents for the SDI wire contract, version 1.0.
They are served as static files under https://sdi.admissio.app/schemas/, and each schema’s $id is its
own URL, so a validator can dereference them directly (the envelope’s $ref resolves to the document
descriptor here). They are JSON Schema Draft 2020-12 and match
Appendix B of the Standard.
Ingest envelopehttps://sdi.admissio.app/schemas/1.0/envelope.json — the wrapper around a batch of records POSTed to an enrollment-sync ingest endpoint (§9.1).
Document descriptorhttps://sdi.admissio.app/schemas/1.0/document-descriptor.json — the by-reference descriptor for a document carried on a record (§10.1).
Using them
Section titled “Using them”Compile them with any Draft 2020-12 validator. With Ajv, register the descriptor so
the envelope’s $ref resolves:
import Ajv2020 from "ajv/dist/2020"import addFormats from "ajv-formats"
const envelope = await fetch("https://sdi.admissio.app/schemas/1.0/envelope.json").then((r) => r.json())const descriptor = await fetch("https://sdi.admissio.app/schemas/1.0/document-descriptor.json").then((r) => r.json())
const ajv = addFormats(new Ajv2020())ajv.addSchema(descriptor) // satisfies the envelope's $ref by its $idconst validateEnvelope = ajv.compile(envelope)