Fern automatically generates interactive API reference documentation from your API specification. This starter template includes a sample Plant Store API to demonstrate the feature.
Fern supports multiple API specification formats:
Place your API specification file in the fern/ directory and reference it in your docs.yml navigation:
Fern parses your specification and generates:
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.
For advanced API Explorer features like auto-populating API keys, see the API Explorer documentation.
Control how your API reference appears using the api configuration in docs.yml:
You can also add custom content to API reference pages, organize endpoints into groups, customize section names, and control which endpoints are visible.
For detailed customization options, see the API reference documentation.
If you generate SDKs with Fern, code snippets automatically appear in your API reference showing how to call each endpoint using your SDK:
For more information on SDK generation, see the SDK documentation.