Metakit / @doeixd/metakit/inspect
toJsonSchema
function · packages/metakit/src/inspect.ts:336
function toJsonSchema<S extends Schema.Top>(
schema: S,
): Readonly<Record<string, unknown>>Generate a JSON Schema object enriched with Expr.refine bounds,
title/description annotations, and @doeixd/metakit/domain metadata
(x-metakit-domain). Arrays state their item shape and nested structs their
properties; required lists only keys that may not be left out.