Package: effect
Module: SchemaRepresentation
Imports a JSON Schema Draft 2020-12 document as a runtime schema.
When to use
Use when you need to validate or transform values described by an external JSON Schema document.
Gotchas
Import is best-effort. Built-in declarations and checks are reconstructed with importer-owned revivers. Callback results are used directly, and exceptions raised by a callback pass through unchanged.
See
fromJsonSchemaMultiDocument for multiple roots sharing definitionstoRepresentation for converting the result to a representation documentSignature
declare const fromJsonSchemaDocument: (document: JsonSchema.Document<"draft-2020-12">, options?: FromJsonSchemaOptions) => Schema.Top
Since v4.0.0