Skip to content
Merged
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
18 changes: 10 additions & 8 deletions fern/snippets/multiple-apis.mdx
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
The fern folder can house multiple API definitions. When you have multiple APIs, nest your definition files within an `apis` folder.
The fern folder can house multiple API definitions. When you have multiple APIs, nest your definition files within a top-level `apis` folder.

Each API must also have a separate `generators.yml` file that specifies the location of the API definition and configures SDK generation.
Each API must have a separate `generators.yml` file that specifies the location of the API definition and configures SDK generation.

Below is an example of what a fern folder containing multiple APIs might look like. Your exact structure might vary depending on your organization's conventions and needs – the important part is that each API has its own `generators.yml` file.

```bash
fern/
├─ fern.config.json
├─ generators.yml # Optional: top-level configuration for all APIs
└─ apis/
└─ first-api/ # First API
├─ generators.yml # Required: points to API spec
└─ openapi/
├─ openapi.yml # API Definition file
└─ spec-folder/ # definition, openapi, asyncapi, etc.
├─ generators.yml # Required: points to API spec and configures SDKs
└─ spec-file.yml # API Definition file
└─ second-api/ # Second API
├─ generators.yml # Required: points to API spec
└─ openapi/
├─ openapi.yml # API Definition file
└─ spec-folder/ # definition, openapi, asyncapi, etc.
├─ generators.yml # Required: points to API spec and configures SDKs
└─ spec-file.yml # API Definition file
```