Skip to content

definitionMetaSchema

JSON Schema (draft 2020-12) that validates the output of generateSchema.

Each $defs entry is defined once as a schema DSL string — the DSL parser produces a runtime AST, and nodeToJsonSchema converts that AST to a JSON Schema fragment. No probe fixtures, no override maps, no manually maintained type definitions.

Hosted at DEFINITION_SCHEMA_URL for $schema resolution. Also exported so tooling can validate definition documents without a network round-trip.

Signatures

ts
const definitionMetaSchema: Record<string, unknown>;

Examples

ts
import Ajv from 'ajv/dist/2020';
import { definitionMetaSchema, generateSchema } from '@kjanat/dreamcli';

const ajv = new Ajv();
const validate = ajv.compile(definitionMetaSchema);
const valid = validate(generateSchema(myCli.schema));

See Also

Released under the MIT License.