The generic importer of a JSON Schema (commons 0019-mizan-integrationsFR-022, FR-023, FR-005, FR-006, FR-009): a slice of the $defs of a pinned schema (draft 2020-12), written as a generated TypeScript module in which each enum is a typed code list and each object's properties are a typed union of field names, so that a requirement names a value or a field of a schema we do not own and the compiler knows it exists in the pinned version.
The slice names definitions (Severity, Event), never the whole schema. A definition that is an enum, a const, or a oneOf or anyOf of consts becomes a code list: a const tuple and the union type of its members, named as the definition. A definition with properties becomes NameFields, an object keyed by field name whose entry says the field's type, whether it is required, the definition it refers to ($ref to #/$defs/...), its enum, its items, and NameField, the union of the field names; an enum or a nested object inside a property is lifted to a code list or fields of its own, named after the definition and the property. The checks are those of the other importers: a pin that differs, no license and no right to copy are refused, a definition the schema lacks is named, the same input gives the same text, and the module's header names the source, schema, hash and slice.
typeJsonSchemaImportInput= {
readonlystandard:StandardRecord;
/** The schema's JSON, as the pinned bytes read as UTF-8 text. */readonlysourceText:string;
/** The names of the `$defs` to take, never the whole schema. */readonlyslice:readonlystring[];
};
typeJsonSchemaImportInput= {
readonlystandard:StandardRecord;
/** The schema's JSON, as the pinned bytes read as UTF-8 text. */readonlysourceText:string;
/** The names of the `$defs` to take, never the whole schema. */readonlyslice:readonlystring[];
};