SchemaCompatibility

Target dialect for a generated JSON Schema. Structured-output modes of the major LLM providers each accept a different subset of JSON Schema; the selected value acts as a preset filter applied on top of the individual knobs — the effective rule is the stricter of the knob and the dialect limit, and features the dialect rejects are never emitted regardless of the knobs.

Entries

Link copied to clipboard

Emit only the intersection accepted by all major structured-output modes (OpenAI strict mode, Anthropic strict tool use, Gemini, and grammar-constrained local inference engines). Nullability uses type arrays, unions use anyOf, every object sets additionalProperties: false with all properties required, nesting is capped at five levels, and size constraints such as maxItems are expressed as description text instead of constraint keywords. This is the default and the safest choice when the consuming provider is not known up front.

Link copied to clipboard

Target OpenAI Structured Outputs (strict mode). Unlocks constraint keywords OpenAI supports (minItems/maxItems, string lengths, numeric ranges, pattern) while enforcing its documented rejections (no oneOf/allOf, no patternProperties, five-level nesting cap, all properties required, additionalProperties: false).

Link copied to clipboard

Target Anthropic structured outputs / strict tool use. Enforces its documented rejections: no recursion, no maxItems or string-length or numeric-range constraints (expressed as description text instead), string formats limited to the documented whitelist, and additionalProperties: false on every object.

Link copied to clipboard

Target Google Gemini structured output (JSON Schema path). Unions use anyOf only — Gemini silently ignores oneOf/allOf, so they are never emitted. Constraint keywords Gemini documents (minItems/maxItems, lengths, numeric ranges) are allowed.

Link copied to clipboard

No dialect filter. The schema is shaped by the individual knobs only and may use any standard JSON Schema feature the knobs enable. Use when the schema is consumed by a validator rather than an LLM structured-output mode.

Functions

Link copied to clipboard
public static SchemaCompatibility valueOf(String name)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard
public static Array<SchemaCompatibility> values()

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.