The request will fail if you pass a JSON Schema that contains keywords or combinations of keywords that are not supported. The error message will specify the unsupported construct. Don’t hesitate to reach out to us to request support.
Quick reference
| Keyword | Status | Notes |
|---|---|---|
type | ✓ | string, number, integer, boolean, null, array, object |
minLength / maxLength | ✓ | Strings; counts characters |
pattern | ✓ | Most regex features; see unsupported patterns below |
format | ✓ | Strictly enforced at generation time. Supports: email, hostname, ipv4, uri, uri-reference, uuid, date, time, date-time, duration |
enum | ✓ | Works for any type |
const | ✓ | Works for any type |
minimum / maximum | ✓ | Numbers and integers |
exclusiveMinimum / exclusiveMaximum | ✓ | Numbers and integers |
multipleOf | ✓ | On integers |
items | ✓ | Homogeneous arrays (see note below) |
prefixItems | ✓ | Tuple validation (heterogeneous arrays) |
minItems / maxItems | ✓ | Array length |
required | ✓ | For object properties |
| Optional fields | ✓ | |
$defs + $ref | ✓ | Internal refs only (no external refs) |
| Recursive schemas | ✓ | Unlimited depth |
anyOf | ✓ | Including at the root |
allOf | ✓ | |
oneOf | ✓ | Treated as anyOf |
additionalProperties | ✓ | Defaults to false |
{} | ✓ | Arbitrary JSON |
{"type": "object"} | ✓ | Arbitrary object fields |
propertyNames | ✓ | |
not | ✓ | |
if / then / else | ✓ | |
dependentRequired | ✓ | |
patternProperties | ✓ | |
minProperties / maxProperties | ✓ | |
contains | - | Request support |
mincontains / maxcontains | - | Request support |
uniqueItems | - | Request support |
dependentSchemas | - | Request support |
unevaluatedProperties / unevaluatedItems | - | Request support |
$dynamicRef | - | Request support |
$dynamicAnchor | - | Request support |
items can also be used for tuple validation along with additionalItems per the draft 2019-09 specification. We recommend using prefixItems for tuple validation and items for homogeneous arrays or extra items beyond the prefixItems tuple.Unsupported regular expressions
Thepattern keyword supports most common regex features. The following are not supported:
- Word boundaries (
\b) - Backreferences (
\1,(?P=open)) - Conditional matches (
(?(1)a|b)) - Lookaheads (
foo(?=bar)) - Lookbehinds (
(?<=foo)bar) - Atomic groups (
(?>pattern)) - Recursion (
(?R),(?1)) - Named captures (
(?P<name>pattern)) - Inline modifiers (
(?i)case-insensitive) - Subroutines (
\g<1>) - Branch resets (
(?|pattern1|pattern2)) - Inline comments (
(?#comment)) - Code callouts (
(*MARK:name)) - Version checks (
(*VERSION)) - Whitespace-insensitive patterns (
(?x)pattern # comment)