anyOf — the union keyword: a list of schemas; a value is valid if it matches any of them. the schema language's one composite construct. A union whose arms are all literals is a fixed set of choices ({anyOf: ["draft", "published"]}), which the editors show as a dropdown.
This document describes the schema/anyof type — a meta-schema variant. Its formal schema is attached (the schemaDefinition in this document's metadata), so the app can show it and create values of this type.
A union lists alternative schemas under anyOf; a value is valid if it matches any of them. When every arm is a literal, the union is a fixed set of choices — {"anyOf": ["draft", "published", "archived"]} — which the editors offer as a dropdown.
Shape
Depends on
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime