Skip to content
Merged
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
93 changes: 44 additions & 49 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ai-search:
location:
- docs

title: Plant Store
title: Fern Docs Starter

layout:
searchbar-placement: header
Expand All @@ -19,85 +19,80 @@ tabs:
home:
display-name: Docs
icon: home
guides:
display-name: Guides
icon: book
API Reference:
display-name: API Reference
icon: puzzle

navigation:
- tab: home
layout:
- section: Get Started
- section: Get started
contents:
- page: Welcome
path: docs/pages/welcome.mdx
- tab: guides
layout:
- section: Get started
contents:
- page: Overview
path: docs/pages/get-started/overview.mdx
icon: fa-duotone fa-book-open
- page: Quickstart
path: docs/pages/get-started/quickstart.mdx
icon: fa-duotone fa-rocket
- section: Capabilities
contents:
- page: Plant management
path: docs/pages/capabilities/plant-management.mdx
icon: fa-duotone fa-seedling
- page: Order processing
path: docs/pages/capabilities/order-processing.mdx
icon: fa-duotone fa-cart-shopping
- page: Customer management
path: docs/pages/capabilities/customer-management.mdx
icon: fa-duotone fa-users
- page: Inventory tracking
path: docs/pages/capabilities/inventory-tracking.mdx
icon: fa-duotone fa-boxes-stacked
- section: Tutorials
contents:
- page: Searching for plants
path: docs/pages/tutorials/searching-plants.mdx
icon: fa-duotone fa-magnifying-glass
- page: Creating your first order
path: docs/pages/tutorials/first-order-tutorial.mdx
icon: fa-duotone fa-bag-shopping
- page: Managing plant inventory
path: docs/pages/tutorials/inventory-tutorial.mdx
icon: fa-duotone fa-clipboard-list
icon: fa-duotone fa-house
- page: Edit your docs
path: docs/pages/editing-your-docs.mdx
icon: fa-duotone fa-pen-to-square
- page: Write content
path: docs/pages/writing-content.mdx
icon: fa-duotone fa-file-lines
- page: Set up navigation
path: docs/pages/navigation.mdx
icon: fa-duotone fa-sitemap
- page: Customize your docs
path: docs/pages/customization.mdx
icon: fa-duotone fa-palette
- page: Support
path: docs/pages/support.mdx
icon: fa-duotone fa-headset
- section: Changelog
contents:
- changelog: docs/changelog
- tab: API Reference

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sbawabe want to add:

  • OpenAPI overrides (estimate of 30% of users use it)
  • an AsyncAPI spec (estimate of 10% of users use it)

layout:
- api: API Reference
- section: Overview
contents:
- page: API reference
path: docs/pages/api-reference-overview.mdx
icon: fa-duotone fa-book
- api: Plant Store API
layout:
- section: Plants
referenced-packages:
- plant
contents: []
- section: Users
referenced-packages:
- user
contents: []

navbar-links:
- type: minimal
text: Fork this repo
url: https://github.com/fern-api/docs-starter
- type: filled
text: Get a demo
url: https://buildwithfern.com/contact?utm_campaign=demo&utm_medium=plantstore&utm_source=navbar
text: Dashboard
url: https://dashboard.buildwithfern.com
- type: github
value: https://github.com/fern-api/fern

colors:
accentPrimary:
dark: "#81C784"
light: "#1B5E20"
accent-primary:
dark: "#70E155"
light: "#008700"
background:
dark: "#111113"
light: "#FFFFFF"

theme:
page-actions: toolbar
footer-nav: minimal

logo:
dark: docs/assets/logo-dark.svg
light: docs/assets/logo-light.svg
dark: docs/assets/logo.svg
light: docs/assets/logo.svg
height: 20
href: https://buildwithfern.com/?utm_campaign=demo&utm_medium=plantstore&utm_source=logo
href: https://buildwithfern.com

favicon: docs/assets/favicon.svg
11 changes: 11 additions & 0 deletions fern/docs/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
81 changes: 81 additions & 0 deletions fern/docs/pages/api-reference-overview.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
title: API reference
subtitle: Interactive documentation generated from your API specification
slug: api-reference
---

Fern automatically generates interactive API reference documentation from your API specification. This starter template includes a sample Plant Store API to demonstrate the feature.

## Supported specifications

Fern supports multiple API specification formats:

| Format | Description | Documentation |
|--------|-------------|---------------|
| **OpenAPI** | The most widely used REST API specification format (versions 2.0, 3.0, and 3.1) | [OpenAPI docs](https://buildwithfern.com/learn/api-definitions/openapi/overview) |
| **AsyncAPI** | For event-driven and message-based APIs | [AsyncAPI docs](https://buildwithfern.com/learn/api-definitions/asyncapi) |
| **gRPC** | Protocol buffer definitions for gRPC services | [gRPC docs](https://buildwithfern.com/learn/api-definitions/protobuf) |

## How it works

Place your API specification file in the `fern/` directory and reference it in your `docs.yml` navigation:

```yaml title="docs.yml"
navigation:
- section: Documentation
contents:
- page: Overview
path: docs/pages/overview.mdx
- api: API Reference
```

Fern parses your specification and generates:

- Endpoint documentation with request/response schemas
- Interactive API Explorer for testing endpoints
- Code snippets in multiple languages
- Type definitions and examples

## API Explorer

The API Explorer lets users test API endpoints directly in the documentation. Users can fill in parameters, send requests, and see responses without leaving the page.

<Note>
For advanced API Explorer features like auto-populating API keys, see the [API Explorer documentation](https://buildwithfern.com/learn/docs/api-references/api-explorer/overview).
</Note>

## Customizing the API reference

Control how your API reference appears using the `api` configuration in `docs.yml`:

```yaml title="docs.yml"
navigation:
- api: API Reference
api-name: plantstore
paginated: true
```

You can also add custom content to API reference pages, organize endpoints into groups, customize section names, and control which endpoints are visible.

<Note>
For detailed customization options, see the [API reference documentation](https://buildwithfern.com/learn/docs/api-references/generate-api-ref).
</Note>

## SDK code snippets

If you generate SDKs with Fern, code snippets automatically appear in your API reference showing how to call each endpoint using your SDK:

```yaml title="generators.yml"
groups:
python-sdk:
generators:
- name: fernapi/fern-python-sdk
version: 4.3.1
output:
location: pypi
package-name: plantstore
```

<Note>
For more information on SDK generation, see the [SDK documentation](https://buildwithfern.com/learn/sdks/overview/introduction).
</Note>
Loading