(
document: MultiDocument,
options?: Schema.ToJsonSchemaOptions
): JsonSchema.MultiDocument<"draft-2020-12">Converts a MultiDocument to a Draft 2020-12 JSON Schema multi-document.
When to use
Use when you need to export related schema representation documents together so shared definitions stay in multi-document JSON Schema form.
Gotchas
JSON Schema generation is best-effort. Some Effect schema representation semantics cannot be represented exactly in JSON Schema, and importing an emitted JSON Schema may produce equivalent approximations rather than the original representation shapes.
export const const toJsonSchemaMultiDocument: (
document: MultiDocument,
options?: Schema.ToJsonSchemaOptions
) => JsonSchema.MultiDocument<"draft-2020-12">
Converts a
MultiDocument
to a Draft 2020-12 JSON Schema
multi-document.
When to use
Use when you need to export related schema representation documents together
so shared definitions stay in multi-document JSON Schema form.
Gotchas
JSON Schema generation is best-effort. Some Effect schema representation
semantics cannot be represented exactly in JSON Schema, and importing an
emitted JSON Schema may produce equivalent approximations rather than the
original representation shapes.
toJsonSchemaMultiDocument: (
document: MultiDocument(parameter) document: {
representations: readonly [Representation, ...Array<Representation>];
references: References;
}
document: type MultiDocument = {
readonly representations: readonly [
Representation,
...Array<Representation>
]
readonly references: References
}
One or more
Representation
s sharing a common
References
map.
When to use
Use when you use
fromASTs
to create this from multiple Schema ASTs,
toCodeDocument
to generate TypeScript code, and
toJsonSchemaMultiDocument
to convert to JSON Schema.
MultiDocument,
options: Schema.ToJsonSchemaOptionsoptions?: import SchemaSchema.type Schema.ToJsonSchemaOptions = /*unresolved*/ anyToJsonSchemaOptions
) => import JsonSchemaJsonSchema.type JsonSchema.MultiDocument = /*unresolved*/ anyMultiDocument<"draft-2020-12"> = import InternalRepresentationInternalRepresentation.function toJsonSchemaMultiDocument(
multiDocument: SchemaRepresentation.MultiDocument,
options?: Schema.ToJsonSchemaOptions
): JsonSchema.MultiDocument<"draft-2020-12">
toJsonSchemaMultiDocument