Skip to content

Commit fceb172

Browse files
docs: document reserved folder names (fern, apis, changelog) (#3597)
Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com>
1 parent 6eb67a3 commit fceb172

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

fern/products/api-def/pages/project-structure.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ For the other specification formats ([OpenAPI](/api-definitions/openapi/overview
6565

6666
## Multiple APIs
6767

68-
Fern supports two approaches for working with multiple API definitions:
68+
Fern supports two approaches for working with multiple API definitions. Both require an `apis` folder — this folder must use that exact name.
69+
6970

7071
1. **Separate SDKs for each API** - Each API generates its own independent set of SDK packages (e.g., `@company/user-api`, `@company/payments-api` or versioned like `@company/sdk-v1`, `@company/sdk-v2`)
7172
2. **Combined SDKs from multiple APIs** - Multiple APIs merge into a single SDK package with optional namespacing (e.g., `client.users`, `client.payments` or versioned like `client.v1`, `client.v2`)

fern/products/docs/pages/getting-started/project-structure.mdx

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,27 @@ This page provides an overview of the file and folder structure of a Fern Docs p
2020

2121
A Fern Docs project has the following top-level folders:
2222

23-
- `pages`: Contains the Markdown (MDX) files that make up your documentation.
24-
- `assets`: Contains any images or videos used in your documentation.
23+
- `pages`: Contains the Markdown (MDX) files that make up your documentation. This folder can use any name.
24+
- `assets`: Contains any images or videos used in your documentation. This folder can use any name.
2525
- `docs.yml`: Defines the navigation, theme, and hosting details of your documentation.
2626
- `openapi` or `definition/`: Contains your API specification files (if you have an API Reference section).
2727
- `generators.yml`: Required for OpenAPI to reference your spec location. Also used to configure SDK generation. Not required for Fern Definition docs-only projects.
2828
- `fern.config.json`: The configuration file specifying your organization name and CLI version.
2929

30+
## Reserved folder names
31+
32+
Some folders in a Fern project have reserved names and must be named exactly as shown:
33+
34+
| Folder | Required name | When it's used |
35+
| --- | --- | --- |
36+
| `fern` | `fern` | Always. The root folder for every Fern project. |
37+
| `apis` | `apis` | Multi-API workspaces that contain more than one API definition. |
38+
| `changelog` | `changelog` | Projects that include a [changelog](/learn/docs/configuration/changelogs). |
39+
40+
<Warning>
41+
Renaming these folders causes Fern to not recognize them. Always use the exact names listed above.
42+
</Warning>
43+
3044
## Pages folder
3145

3246
The `pages` folder contains the Markdown (MDX) files that make up your documentation. Each MDX file represents a page in your documentation.
@@ -177,7 +191,7 @@ To generate [API Reference](/docs/api-references/generate-api-ref) documentation
177191
</Folder>
178192
</Files>
179193

180-
Reference each API in `docs.yml` using `api-name` that matches the folder name. To see this in practice, check out [Vapi's Fern configuration](https://github.com/VapiAI/docs/tree/main/fern/apis).
194+
The `apis` folder must use this exact name. Reference each API in `docs.yml` using `api-name` that matches the subfolder name. To see this in practice, check out [Vapi's Fern configuration](https://github.com/VapiAI/docs/tree/main/fern/apis).
181195

182196
</Accordion>
183197
</AccordionGroup>
@@ -196,6 +210,6 @@ The `fern.config.json` file stores your organization name and the Fern CLI versi
196210

197211
<Info>
198212
When working with a locally installed CLI, set `version` to `"*"`. See [Install Fern CLI locally](/cli-api-reference/cli-reference/overview#install-fern-cli-locally) for details.
199-
</Info>
213+
</Info>
200214

201215

fern/products/docs/pages/navigation/changelogs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Keep a Changelog
33
subtitle: Record the notable changes to your project
44
---
55

6-
Keep a record of how your project has changed by writing changelog entries that users can sort by tag. The changelog will automatically populate with the files contained within the `changelog` folder.
6+
Keep a record of how your project has changed by writing changelog entries that users can sort by tag. The changelog will automatically populate with the files contained within the `changelog` folder. This folder must be named `changelog` exactly — Fern won't recognize it under any other name.
77

88
<Frame
99
caption="Keep your users updated as your project evolves"

0 commit comments

Comments
 (0)