Skip to content

DECLARATIVE-YAML-06: Declare array and nested object fields

Composite frontmatter — an array with an element schema (of) and a nested object with its own fields.

Builds on: DECLARATIVE-YAML-05: Toggle strict vs open frontmatter

The declarative YAML artifact, verbatim — no code required.

frontmatter:
fields:
tags:
type: array
of: { type: string }
min: 1
owner:
type: object
strict: true
fields:
name: { type: string }
email: { type: string, format: email }
  • typed() array -> z.array(compileSchema(of)) with .min
  • object -> compileObjectSchema(fields, strict)