(schema: Constraint): SchemaRepresentation.DocumentDerives an intermediate SchemaRepresentation.Document from a schema. This
document is used internally by toJsonSchemaDocument and related
functions to produce JSON Schema output.
RepresentationtoJsonSchemaDocument
Source effect/Schema.ts:133253 lines
export function function toRepresentation(
schema: Constraint
): SchemaRepresentation.Document
Derives an intermediate SchemaRepresentation.Document from a schema. This
document is used internally by
toJsonSchemaDocument
and related
functions to produce JSON Schema output.
toRepresentation(schema: Constraint(parameter) schema: {
ast: SchemaAST.AST;
Type: unknown;
Encoded: unknown;
DecodingServices: unknown;
EncodingServices: unknown;
Iso: unknown;
}
schema: Constraint): import SchemaRepresentationSchemaRepresentation.type Document = {
readonly representation: SchemaRepresentation.Representation
readonly references: SchemaRepresentation.References
}
A single
Representation
together with its named
References
.
When to use
Use when representing a single Schema AST together with its named references
before reconstructing a runtime Schema, converting to JSON Schema, or
wrapping it as a
MultiDocument
.
Document {
return import InternalStandardInternalStandard.function fromAST(
ast: SchemaAST.AST
): SchemaRepresentation.Document
fromAST(schema: Constraint(parameter) schema: {
ast: SchemaAST.AST;
Type: unknown;
Encoded: unknown;
DecodingServices: unknown;
EncodingServices: unknown;
Iso: unknown;
}
schema.Constraint["ast"]: SchemaAST.ASTast)
}Referenced by 1 symbols