Skip to content

[I] JSONSchemaEmitterOptions

Json schema emitter options

PropertyTypeDescription
bundleId?stringWhen provided, bundle all the schemas into a single JSON Schema document with schemas under $defs. The provided id is the id of the root document and is also used for the file name.
emitAllModels?booleanWhen true, emit all model declarations to JSON Schema without requiring the @jsonSchema decorator.
emitAllRefs?booleanWhen true, emit all references as JSON Schema files, even if the referenced type does not have the @jsonSchema decorator or is not within a namespace with the @jsonSchema decorator.
file-type?"yaml" | "json"Serialize the schema as either yaml or json. Default yaml, if not specified infer from the output-file extension.
int64-strategy?"string" | "number"How to handle 64-bit integers on the wire. Options are: - string: Serialize as a string (widely interoperable) - number: Serialize as a number (not widely interoperable)
polymorphic-models-strategy?"ignore" | "oneOf" | "anyOf"Strategy for emitting models with the discriminator decorator. - ignore: Emit as regular object schema (default) - oneOf: Emit a oneOf schema with references to all derived models (closed union) - anyOf: Emit an anyOf schema with references to all derived models (open union)
seal-object-schemas?booleanIf true, then for models emitted as object schemas we default unevaluatedProperties to { not: {} }, if not explicitly specified elsewhere.