@lucid-softworks/schema-json-schema
v0.1.0
Published
Deterministic JSON Schema 2020-12 generation from Lucid schemas.
Maintainers
Readme
@lucid-softworks/schema-json-schema
Deterministic, self-contained JSON Schema Draft 2020-12 documents generated from Lucid schemas.
import { toJsonSchema } from "@lucid-softworks/schema-json-schema";
const document = toJsonSchema(userSchema, {
id: "https://example.com/schemas/user",
title: "User",
});Every component receives a stable local $defs reference, including recursive
lazy schemas. Runtime-only refinements, preprocessing, transformations,
defaults, and pipelines are annotated with x-lucid-* keywords by default.
Set { runtimeEffects: "error" } to reject those lossy conversions instead.
Object schemas that strip unknown keys emit additionalProperties: true
because JSON Schema validates but does not transform input. Strict objects emit
additionalProperties: false.
