Interface: ToJsonSchemaOptions
The options of the conversion of a schema into a JSON Schema
Properties
definitions?
optionaldefinitions?:Record<string,JSONSchema>
An object receiving the shared schemas (the schemas given an id with .id()), by id. The JSON Schema refers to them with $ref (#/$defs/<id>, #/definitions/<id> in draft 04, #/components/schemas/<id> in OpenAPI); the JSON Schema versions also embed them in the root $defs (definitions). An OpenAPI schema object cannot hold them: the OpenAPI targets return them in the root key schemas of the result as well, both to be moved by the caller into the components.schemas of its document.
dialect?
optionaldialect?:boolean
Whether the JSON Schema declares its version with $schema (JSON Schema versions only, not OpenAPI).
Default
falsepreferences?
optionalpreferences?:ValidationOptions
The validation options the schema is used with: they decide which unknown keys are accepted (additionalProperties) and which keys are required.
Default
the validation options of lakutata (unknown keys allowed, keys optional)target?
optionaltarget?:JsonSchemaTarget
The JSON Schema version to write.
Default
'draft-2020-12'