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
+17-36Lines changed: 17 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,6 +87,10 @@ groups:
87
87
github:
88
88
repository: company/user-api-typescript
89
89
```
90
+
<Info>
91
+
You can use this same pattern for API versioning. See [Versioned APIs](#versioned-apis) below.
92
+
</Info>
93
+
90
94
</Accordion>
91
95
<Accordion title="Combined SDKs from multiple APIs">
92
96
@@ -131,56 +135,33 @@ When supporting multiple API versions, you can publish them as separate packages
131
135
132
136
#### Option 1: Separate packages for each API version
133
137
134
-
Use this approach when you want each API version to be independently installable (e.g., `@company/sdk-v1`, `@company/sdk-v2`).
138
+
Use this approach when you want each API version to be independently installable (e.g., `@company/sdk-v1`, `@company/sdk-v2`). This use case follows the [Separate SDKs for each API](#separate-sdks-for-each-api) pattern.
135
139
136
140
```bash
137
-
# Each API version in its own directory
138
-
v1-sdk/
139
-
└─ fern/
140
-
├─ fern.config.json
141
-
├─ generators.yml
142
-
└─ v1/
143
-
└─ openapi.yml
144
-
v2-sdk/
145
-
└─ fern/
146
-
├─ fern.config.json
147
-
├─ generators.yml
148
-
└─ v2/
149
-
└─ openapi.yml
141
+
fern/
142
+
├─ fern.config.json
143
+
└─ apis/
144
+
├─ v1/
145
+
│ ├─ generators.yml # Configures v1 SDKs
146
+
│ └─ openapi.yml
147
+
└─ v2/
148
+
├─ generators.yml # Configures v2 SDKs
149
+
└─ openapi.yml
150
150
```
151
151
152
-
Each API version must have its own `generators.yml` file:
0 commit comments