How to document a schema
- Paste a JSON Schema, open a file, or load one from your stash.
- Read the preview. Objects with nested properties can be expanded and collapsed, and types that come from
$reflink to their definition. - Switch to Markdown to copy the text, or download it as a
.mdfile for a README, wiki or pull request.
The root schema gets the first table, then each entry in $defs or definitions gets its own section. Arrays of objects list their item properties with [] paths (for example items[].sku), and oneOf/anyOf branches appear as numbered options. Deprecated properties are marked, and readOnly, writeOnly, defaults and examples are shown with the constraints.
FAQ
What does the Markdown export look like?
A heading with the schema title and description, a property table for the root, and a section per definition. Nested properties are listed with dotted paths such as address.city, and $ref types link to their section.
How are $refs shown?
A property that uses $ref shows the referenced definition as its type, with a link to that definition’s own table. Definitions are documented once, which also keeps recursive schemas finite.
Where do the descriptions come from?
From each schema’s description, or its title when there is no description. Constraints such as formats, length and number limits, enums, defaults and examples are listed in their own column.