effect-io-ai

Package: effect
Module: SchemaRepresentation

SchemaRepresentation.toJsonSchemaDocument

Compiles a live representation document to JSON Schema Draft 2020-12.

When to use

Use when you need JSON Schema output from a representation whose checks carry compiler annotations.

Gotchas

Opaque declarations are represented by an unconstrained JSON Schema. Check callback results are used directly, and exceptions raised by a callback pass through unchanged.

See

Signature

declare const toJsonSchemaDocument: (document: Document, options?: Schema.ToJsonSchemaOptions) => JsonSchema.Document<"draft-2020-12">

Source

Since v4.0.0