Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,15 @@ Required and optional properties always render as separate groups. You can't mix

## Customizing the API Reference

### Nested object fields

Nested object fields render as indented branches with a connector line and a breadcrumb showing each field's full path. To render them as bordered cards instead, set [`layout.api-reference-layout`](/learn/docs/configuration/site-level-settings#layoutapi-reference-layout) to `cards`. The setting applies site-wide.

```yaml title="docs.yml"
layout:
api-reference-layout: cards
```

### Renaming sections

By default, section display names come from tag names in your OpenAPI spec.
Expand Down
10 changes: 10 additions & 0 deletions fern/products/docs/pages/navigation/site-level-settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,7 @@ layout:
hide-nav-links: true
hide-feedback: true
changelog-layout: timeline
api-reference-layout: indented
show-nav-availability-badges: true
```

Expand Down Expand Up @@ -656,6 +657,15 @@ layout:
Individual changelogs can override this setting with the `layout` frontmatter property in their [overview page](/learn/docs/configuration/changelogs#add-an-overview-page-optional).
</ParamField>

<ParamField path="layout.api-reference-layout" type="string" required={false} default="indented" toc={true}>
Sets how nested object fields are rendered in the [API Reference](/learn/docs/api-references/generate-api-ref). Can be `indented` or `cards`.

- `indented` (default) — each nested level is an indented branch with a connector line and a breadcrumb showing the field's full path, so the depth and location of a field stay visible while reading. Breadcrumb segments link to the levels above them.
- `cards` — each nested level is a bordered card.

Schemas with several levels of nesting benefit most from `indented`, where card borders otherwise stack into hard-to-follow frames.
</ParamField>

<ParamField path="layout.show-nav-availability-badges" type="boolean" required={false} default="false" toc={true}>
If set to true, availability badges (Beta, Deprecated, etc.) are rendered inline next to navigation items in the sidebar (in addition to the badge rendered automatically in the page header).
</ParamField>
Expand Down
Loading