JSON Schema support
This release uses JSON Schema 2020-12 and supports the following subset for generation. A valid schema must also fit within the service’s compilation limits.
Structural values
| Feature | Generation support |
|---|---|
Boolean, null, finite enum and const | Supported |
| Declared object properties and required keys | Supported within compiler limits |
| Bounded arrays | Supported within compiler limits |
| Open strings and numbers | Supported with execution token budgets |
| Numeric bounds over finite choices | Supported |
| One-sided integer bounds | Supported: minimum, maximum and exclusive bounds |
| Arbitrary bounds on open fractional numbers | Not included in the verified generation forms below |
| Bounded integer ranges | Supported when the finite range fits compiler limits |
| Conditional and composed finite fields | See the keyword coverage below |
Local nonrecursive $defs / $ref | Supported JSON Pointer references |
| Recursive, dynamic or external references | Not supported |
| Dynamic property synthesis | Not supported |
type: number does not make an arbitrary minimum, maximum or multipleOf constraint supported for open generation. Use finite allowed values when they match the task.
Conditions and composition
These constraints apply to the generated output, not directly to request input or application state.
For fields narrowed by a branch, declare initial choices with explicit enum or const values. The linked guides provide complete schemas for this supported form.
| Construct | Generation coverage |
|---|---|
if, then, else | Finite field conditions, including nested branches and conditional presence. |
dependentRequired | Presence of a declared property requires companion properties; the trigger is presence, not truthiness. |
dependentSchemas | Not included in this release’s supported generation subset. |
allOf | Intersect compatible finite constraints, including multiple conditional rules; also supported string intersections. |
anyOf | Finite alternatives; one or more branches may match. |
oneOf | Finite alternatives; exactly one branch must match. |
not | Exclude values or combinations within a declared finite domain. |
Read Conditional outputs for complete examples of conditional fields and dependencies. Combine constraints covers alternatives and exclusions; Reuse schema definitions covers local references. Valid schemas can still exceed compilation limits; cross-field rules coupled to open-ended values are not supported in this release.
Strings
| Constraint | Behavior |
|---|---|
minLength, maxLength | Decoded Unicode character count; character bounds up to 4,096 |
pattern | Regular subset: literals, classes, ranges, negation, groups, alternation, repetition, outer anchors and search semantics |
| Character escapes | ASCII \d and \w, ECMA whitespace, supported Unicode properties |
allOf | Intersection of supported string assertions |
Backreferences, lookarounds, interior anchors, named groups and inline flags are unsupported. Arbitrary anyOf, oneOf and not combinations over open strings are also unsupported. Combining otherwise supported constraints may exceed compilation limits.
Formats during generation
date, time, date-time, duration, uuid, ipv4, json-pointer and relative-json-pointer are supported. Format assertions are enabled by default.
Dates obey Gregorian calendar rules. RFC 3339 time and date-time include a timezone, optional fractional seconds and valid offset/leap-second relationships. IPv4 enforces octet ranges without leading-zero octets. JSON pointers enforce valid escapes.
Generated email, hostname, IPv6, URI/IRI and regex-format strings are not supported in this release. A validator accepting supplied values of those formats does not establish generation support.
Execution extensions
Only these x-runtime annotations are approved in this release:
| Annotation | Supported use |
|---|---|
formatAssertions | Root Boolean; enables format assertions by default. |
requestSchema | Root JSON Schema that validates the supplied input, parameters, state and user context before generation. |
stateSchema | Root JSON Schema that validates the resulting state snapshot. It does not validate the initial request. |
eligibleWhen | A request-context predicate controlling whether a field is allowed. Required fields must retain a legal value. |
choices | Per-value eligibleWhen conditions on finite choices. |
propertyOrder | On an object schema: an array listing every declared property exactly once, in generation order. |
switch | Ordered cases over an output value, with a required default. See switches. |
forEach, bind | Repeat a template result for each supplied item and bind its constants or descriptions. See for-each loops. |
label_permutations | One finite string field, with {"scope":"/input/responses"} selecting an object whose keys match the enum. |
probabilities | Boolean on the field: true returns probabilities; false or omission disables them. Works with or without label_permutations. Legacy "all"/"none" remain accepted. |
The candidate probabilities guide shows a finite string choice without label permutations. Probability collection preserves ordinary token-by-token selection; it does not replace the answer with the candidate having the highest complete-label probability. See Reduce label bias for the separate permutation setting and its scope rules.
For the finite-choice eligibility shown in the guides, put x-runtime inside the controlled field's schema, alongside type or enum. choices.<value>.eligibleWhen controls whether that value is available. Required fields must retain a legal value.
Eligibility predicates can refer to input, parameters, state and user_context. They cannot depend on the generated output. For example, {"contains":[{"ref":"user_context/scopes"},"documents:publish"]} checks exact scope membership. Missing scopes do not grant that permission. Conditions using state shows each form separately, then combines eligibility with ordinary output conditions. Use state rules in OPA for richer relationships involving generated values.
Attach OPA through request-level policy or policy_id, independently of the output schema, for ordinary generation.
propertyOrder is a Struct extension, not a JSON Schema keyword. For an object declaring category and reason, use "x-runtime":{"propertyOrder":["category","reason"]} to generate the category first. Omitted, repeated or unknown property names are rejected. Without the annotation, properties use lexicographic order. Required and optional properties must both appear in the list; ordering does not make an optional property required. JSON consumers should still access values by key.
Exact source quotations
Use x-runtime.quote on a string with maxLength from 1 to 4,096 to return an exact contiguous excerpt from request input. Its ref is a JSON Pointer to a string under /input. The number, date, word, identifier, passage and span units are semantic hints; every quoted value is still a string. Unicode spelling, whitespace and punctuation are preserved.
Allow null explicitly when absence is valid. Put the annotation on array items to extract multiple strings, with maxItems no greater than 256. Source membership and the surrounding schema constraints both apply; neither guarantees that the selected information answers the question correctly. Quote requests cannot be combined with OPA policies. The source quoting guide includes a complete extraction example.
Unsupported schemas
Compilation fails for unsupported constructs or excessive complexity. The service does not silently remove constraints and retry unconstrained. Keep the original error and simplify the schema or select a supported representation.
Strict format checking can be disabled with root "x-runtime":{"formatAssertions":false}. Only use that when formats are intended as annotations rather than guarantees.