You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fern/products/api-def/pages/project-structure.mdx
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,24 +4,24 @@ description: Describes the Fern folder structure
4
4
---
5
5
6
6
Configuring fern starts with the `fern` folder. The fern folder contains your API definitions,
7
-
generators, and your CLI version.
7
+
SDK generators, and your CLI version.
8
8
9
9
## Directory structure
10
10
11
-
When you run `fern init` (for the Fern Definition) or `fern init --spec-type path/to/spec`, your fern folder will be initialized with the following files:
11
+
When you run `fern init` (for the Fern Definition) or `fern init --spec-type path/to/spec` (for other specs), your fern folder is initialized with the following files:
12
12
13
13
```bash
14
14
fern/
15
-
├─ fern.config.json # Root-level configuration for entire Fern project
16
-
├─ generators.yml # Defines what SDKs and docs to generate from your API
├─ fern.config.json # Root-level config for entire Fern project
16
+
├─ generators.yml # Defines SDKs and docs to generate
17
+
└─ spec-folder/ # definition, openapi, asyncapi, etc.
18
18
└─ spec-file.yml # API specification file
19
19
```
20
20
21
21
<Info>
22
22
For Fern Definition, your API configuration is split across two files: `api.yml` for API-wide configuration and separate `.yml` files for your actual endpoint and type definitions. See [What is a Fern Definition?](/api-definitions/ferndef/overview) for more information.
23
23
24
-
For other specification formats (OpenAPI, AsyncAPI), you'll have a single self-contained specification file.
24
+
For the other specification formats ([OpenAPI](/api-definitions/openapi/overview), [AsyncAPI](/api-definitions/asyncapi/overview), [OpenRPC](/api-definitions/openrpc/overview), and [gRPC](/api-definitions/grpc/overview)), you'll have a single self-contained specification file.
25
25
</Info>
26
26
27
27
<AccordionGroup>
@@ -55,12 +55,12 @@ api:
55
55
56
56
The fern folder can house multiple API definitions. When you have multiple APIs, nest your definition files within an `apis` folder.
57
57
58
-
Each API must also have a separate `generators.yml` file that specifies the location of the API definition and contains information about that API's SDKs.
58
+
Each API must also have a separate `generators.yml` file that specifies the location of the API definition and configures SDK generation.
59
59
60
60
```bash
61
61
fern/
62
62
├─ fern.config.json
63
-
├─ generators.yml # Optional: contains top-level configuration for all APIs
63
+
├─ generators.yml # Optional: top-level configuration for all APIs
0 commit comments