Skip to content

A union type resolves to its first non-null member

The rule

Normative: this is the rule
  1. Where a property's type is an array of types, its lane MUST be derived from the first member that is not null.
  2. An array that is empty, or that holds only null, MUST resolve to the sink.
  3. Every member MUST itself be a JSON Schema type.

Why

Recorded under OPEN-25.

Rule identifiers are permanent and are never renumbered. Each implementation publishes its own standing against these rules; this specification does not.spec 1.0 · SCH-9 · changed in spec 1.0