Data-model pages
APIs are half operations, half shapes. A data-model page documents one component schema from your spec: your prose about what the model means, followed by a generated fields section with types, constraints, and nested structure.
Declare the schema
---
title: The Pet model
openapi-schema: "Pet"
---
A pet is the store's core record. Names are not unique;
identity lives in the id.The value names a schema under your spec's components.schemas. The file-token form ("openapi.json Pet") is accepted here too, so migrated frontmatter works unchanged.
What renders
A document-shaped page (no request console; a model has no request): title, the schema's own description as the lede, your authored body, then the generated fields, required flags, enums, and nested objects expandable in place.
The rules
- One schema, one page; duplicates are a build error, first claim wins.
- Unknown names fail visibly: a schema that matches nothing renders a danger callout in place, so a renamed model cannot silently ship stale docs.
- Titles fall back: frontmatter
title, else the schema'stitle, else its name. - A page carrying both keys keeps the operation:
openapiwins overopenapi-schema, with a build warning.