07 Document

JSON Schema documentation

Turn a schema into tables people can read: every property with its type, whether it is required, its constraints and description. Export it as Markdown for a README or wiki.

Code editor. Press Escape, then Tab, to move focus out of the editor.

    Documentation

    How to document a schema

    1. Paste a JSON Schema, open a file, or load one from your stash.
    2. Read the preview. Objects with nested properties can be expanded and collapsed, and types that come from $ref link to their definition.
    3. Switch to Markdown to copy the text, or download it as a .md file 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.