SchemaGenerationSettings

public final class SchemaGenerationSettings

Settings for SchemaGeneration. Values fall back through three levels: document → SDK → built-in default. Writes target the document only when set on a document's settings, otherwise the SDK globally when set on SdkSettings.

Functions

Link copied to clipboard
public final boolean getAllowDiscriminatedUnions()
Enable discriminated unions: variant object types expressed as anyOf with a shared constant discriminator field per variant.
Link copied to clipboard
public final boolean getAllowEnums()
Enable enum constraints for fields with a small closed set of known values.
Link copied to clipboard
public final boolean getAllowNullable()
Enable nullable fields in the generated schema.
Link copied to clipboard
public final boolean getAllowPatterns()
Enable regex pattern constraints on string fields.
Link copied to clipboard
public final boolean getAllowStringFormats()
Enable string format annotations (for example, date-time or uuid), restricted to the formats the target dialect documents as supported.
Link copied to clipboard
public final SchemaCompatibility getCompatibility()
Target dialect preset applied on top of the individual knobs.
Link copied to clipboard
public final boolean getIncludeConstraints()
Also generate cross-field constraint rules encoding the logical relationships of the document type (for example, a subtotal equaling the sum of line item amounts), as standard JsonLogic expressions (jsonlogic.com).
Link copied to clipboard
public final int getMaxArrayItems()
When greater than zero, bounds the number of items of arrays in the generated schema.
Link copied to clipboard
public final int getMaxFields()
Maximum total number of properties across the whole generated schema, counting nested objects and union variants.
Link copied to clipboard
public final int getMaxNestingDepth()
Maximum object nesting depth of the generated schema.
Link copied to clipboard
public final int getMaxRetries()
How many times to retry the vision model when its output is invalid — unparseable JSON or a draft that fails meta-schema validation.
Link copied to clipboard
public final void setAllowDiscriminatedUnions(boolean value)
Enable discriminated unions: variant object types expressed as anyOf with a shared constant discriminator field per variant.
Link copied to clipboard
public final void setAllowEnums(boolean value)
Enable enum constraints for fields with a small closed set of known values.
Link copied to clipboard
public final void setAllowNullable(boolean value)
Enable nullable fields in the generated schema.
Link copied to clipboard
public final void setAllowPatterns(boolean value)
Enable regex pattern constraints on string fields.
Link copied to clipboard
public final void setAllowStringFormats(boolean value)
Enable string format annotations (for example, date-time or uuid), restricted to the formats the target dialect documents as supported.
Link copied to clipboard
public final void setCompatibility(SchemaCompatibility value)
Target dialect preset applied on top of the individual knobs.
Link copied to clipboard
public final void setIncludeConstraints(boolean value)
Also generate cross-field constraint rules encoding the logical relationships of the document type (for example, a subtotal equaling the sum of line item amounts), as standard JsonLogic expressions (jsonlogic.com).
Link copied to clipboard
public final void setMaxArrayItems(int value)
When greater than zero, bounds the number of items of arrays in the generated schema.
Link copied to clipboard
public final void setMaxFields(int value)
Maximum total number of properties across the whole generated schema, counting nested objects and union variants.
Link copied to clipboard
public final void setMaxNestingDepth(int value)
Maximum object nesting depth of the generated schema.
Link copied to clipboard
public final void setMaxRetries(int value)
How many times to retry the vision model when its output is invalid — unparseable JSON or a draft that fails meta-schema validation.