Optional$schemaWhether to include the $schema header in the output.
Set to false when embedding in an OpenAPI spec.
OptionaldraftJSON Schema draft version to reference in the $schema header.
OptionalnameOptional hook called for every schema node before conversion.
When provided, the function receives each SchemaBuilder instance
encountered during recursive conversion (including nested ones inside
objects, arrays, and unions). If the function returns a non-null string,
conversion of that node is short-circuited and a
{ $ref: '#/components/schemas/<name>' } object is returned instead of
the full inline JSON Schema.
Return null to let conversion proceed normally.
Primarily used by @cleverbrush/server-openapi to emit $ref pointers
for schemas registered via .schemaName().
The schema node currently being converted.
The component name to reference, or null to inline.
Options accepted by toJsonSchema.