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.
- Import:
@kjanat/dreamcli - Export kind: constant
- Declared in:
src/core/json-schema/index.ts - Source link:
packages/dreamcli/src/core/json-schema/index.ts:814
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));