JSON Schema anyOf Keyword

The value must match at least one of the listed schemas.

Syntax

{"anyOf": [{"type": "string"}, {"type": "null"}]}

Explanation

Use anyOf for optional types or flexible input shapes.