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
You can use either the OpenAPI definition, AsyncAPI definition, or Fern Definition to generate your SDK.
26
16
27
17
<AccordionGroup>
28
-
<Accordiontitle="Option 1: OpenAPI">
29
-
Initialize the Fern folder using your OpenAPI Specification. Run one of the following commands based on your spec's location.
30
-
31
-
<Tip>
32
-
Fern can handle both JSON and YML formats for OpenAPI specifications, and the --openapi flag accepts either format, so you can use whichever format your API spec is available in.
33
-
</Tip>
34
-
35
-
<Info>
36
-
`--organization <YourOrganization>` configures your organization name in `fern.config.json`. This is required in order to successfully generate your SDK.
This creates a `fern` folder in your current directory with the OpenAPI Specification. The exact folder structure might look different depending on your initial input files.
Initialize the Fern folder using your AsyncAPI Specification. Run one of the following commands based on your spec's location.
68
-
69
-
<Tip>
70
-
Fern can handle both JSON and YML formats for AsyncAPI specifications, and the --openapi flag accepts either format, so you can use whichever format your API spec is available in.
71
-
</Tip>
72
-
73
-
<Info>
74
-
`--organization <YourOrganization>` configures your organization name in `fern.config.json`. This is required in order to successfully generate your SDK.
This creates a `fern` folder in your current directory with the AsyncAPI Specification. The exact folder structure might look different depending on your initial input files.
1. Initialize the Fern folder using the Fern Definition by running the following command:
107
-
108
-
```bash
109
-
fern init --organization <YourOrganization>
110
-
```
111
-
112
-
<Info>
113
-
`--organization <YourOrganization>` configures your organization name in `fern.config.json`. This is required in order to successfully generate your SDK.
114
-
</Info>
115
-
116
-
This creates a `fern` folder in your current directory with the Fern Definition.
117
-
118
-
```bash
119
-
fern/
120
-
├─ fern.config.json # root-level configuration
121
-
├─ generators.yml # generators you're using
122
-
└─ definition/
123
-
├─ api.yml # API-level configuration
124
-
└─ imdb.yml # endpoints, types, and errors
125
-
```
126
-
127
-
<Note>
128
-
`imdb.yml` contains an example movies API. If you’re just generating an SDK for test purposes, you can leave this file as it is. To generate an SDK for your own API instead of the example movies API, replace `imdb.yml` with your own endpoints, types, and errors before proceeding with the rest of this page.
129
-
</Note>
130
-
131
-
{/* TODO: show want generators.yml looks like, link out to configuration.md */}
132
-
133
-
1. Add the config option `outputSourceFiles: true` to `generators.yml`. This ensures your SDK contains `.ts` files instead of compiled output.
29
+
1. Add the config option `outputSourceFiles: true` to `generators.yml`. This ensures your SDK contains `.ts` files instead of compiled output.
Initialize the Fern folder using your OpenAPI Specification. Run one of the following commands based on your spec's location.
2
+
3
+
<Tip>
4
+
Fern can handle both JSON and YML formats for OpenAPI specifications, and the --openapi flag accepts either format, so you can use whichever format your API spec is available in.
5
+
</Tip>
6
+
7
+
<Info>
8
+
`--organization <YourOrganization>` configures your organization name in `fern.config.json`. This is required in order to successfully generate your SDK.
This creates a `fern` folder in your current directory with the OpenAPI Specification. The exact folder structure might look different depending on your initial input files.
Initialize the Fern folder using your AsyncAPI Specification. Run one of the following commands based on your spec's location.
2
+
3
+
<Tip>
4
+
Fern can handle both JSON and YML formats for AsyncAPI specifications, and the --openapi flag accepts either format, so you can use whichever format your API spec is available in.
5
+
</Tip>
6
+
7
+
<Info>
8
+
`--organization <YourOrganization>` configures your organization name in `fern.config.json`. This is required in order to successfully generate your SDK.
This creates a `fern` folder in your current directory with the AsyncAPI Specification. The exact folder structure might look different depending on your initial input files.
1. Initialize the Fern folder using the Fern Definition by running the following command:
2
+
3
+
```bash
4
+
fern init --organization <YourOrganization>
5
+
```
6
+
7
+
<Info>
8
+
`--organization <YourOrganization>` configures your organization name in `fern.config.json`. This is required in order to successfully generate your SDK.
9
+
</Info>
10
+
11
+
This creates a `fern` folder in your current directory with the Fern Definition.
12
+
13
+
```bash
14
+
fern/
15
+
├─ fern.config.json # root-level configuration
16
+
├─ generators.yml # generators you're using
17
+
└─ definition/
18
+
├─ api.yml # API-level configuration
19
+
└─ imdb.yml # endpoints, types, and errors
20
+
```
21
+
22
+
<Note>
23
+
`imdb.yml` contains an example movies API. If you’re just generating an SDK for test purposes, you can leave this file as it is. To generate an SDK for your own API instead of the example movies API, replace `imdb.yml` with your own endpoints, types, and errors before proceeding with the rest of this page.
24
+
</Note>
25
+
26
+
{/* TODO: show want generators.yml looks like, link out to configuration.md */}
0 commit comments