Skip to content

Commit 37565d3

Browse files
committed
Add --deep flag to all fern generate commands in documentation
1 parent c08e7e3 commit 37565d3

File tree

13 files changed

+69
-57
lines changed

13 files changed

+69
-57
lines changed

fern/products/cli-api-reference/pages/cli-get-started.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ fern generate --docs --preview # Preview documentation changes
6868
fern generate --docs # Generate and publish documentation
6969

7070
# SDK Development
71-
fern init # Start new SDK project
72-
fern check # Validate API definition
73-
fern generate --preview # Preview SDKs in .preview/ folder
74-
fern generate # Generate default SDK group
75-
fern generate --group ts-sdk # Generate specific SDK group
71+
fern init # Start new SDK project
72+
fern check # Validate API definition
73+
fern generate --deep --preview # Preview SDKs in .preview/ folder
74+
fern generate --deep # Generate default SDK group
75+
fern generate --deep --group ts-sdk # Generate specific SDK group
7676
```
7777

7878
<Note>
@@ -105,18 +105,18 @@ The "default SDK group" refers to the group marked as default in your `generator
105105
```bash
106106
fern init
107107
```
108-
108+
109109
2. Configure your generators in [configuration options](/learn/sdks/introduction/configuration)
110-
110+
111111
3. Generate SDKs:
112112
```bash
113-
fern generate --preview # Preview changes locally
114-
fern generate --group python-sdk --preview # Preview specific SDK group
115-
fern generate # Publish to production
113+
fern generate --deep --preview # Preview changes locally
114+
fern generate --deep --group python-sdk --preview # Preview specific SDK group
115+
fern generate --deep # Publish to production
116116
```
117117

118118
<Tip>
119-
During development, use `--preview` to test your changes locally before publishing.
119+
During development, use `--preview` to test your changes locally before publishing.
120120
The preview SDK will be generated into the `.preview/` folder.
121121
</Tip>
122122
</Accordion>

fern/products/cli-api-reference/pages/commands.mdx

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -174,47 +174,59 @@ hideOnThisPage: true
174174

175175
<CodeBlock title="terminal">
176176
```bash
177-
fern generate [--group <group>] [--api <api>] [--version <version>] [--preview]
177+
fern generate [--deep] [--group <group>] [--api <api>] [--version <version>] [--preview]
178178
```
179179
</CodeBlock>
180180

181+
### deep
182+
183+
Use `--deep` to enable deep generation mode, which is required for SDK generation with the latest CLI version. This flag ensures that all nested types and dependencies are fully resolved during generation.
184+
185+
```bash
186+
# Generate SDK with deep mode
187+
fern generate --deep --group ts-sdk
188+
189+
# Generate with deep mode and API specification
190+
fern generate --deep --group ts-sdk --api your-api-name
191+
```
192+
181193
### preview
182194

183195
Use `--preview` to test SDK changes locally before publishing. This is especially useful during development:
184196
- Generates SDK into a local `.preview/` folder
185197
- Allows quick iteration on your Fern definition
186198
- No changes are published to package managers or GitHub
187-
199+
188200
```bash
189201
# Preview all SDKs
190-
fern generate --preview
191-
202+
fern generate --deep --preview
203+
192204
# Preview specific SDK group
193-
fern generate --group python-sdk --preview
205+
fern generate --deep --group python-sdk --preview
194206
```
195207

196208
### group
197209

198210
Use `--group <group>` to filter to a specific group within `generators.yml`. Required unless you have a `default-group` declared.
199211

200212
```bash
201-
fern generate --group internal
213+
fern generate --deep --group internal
202214
```
203215

204216
### api
205217

206218
Use `--api <api>` to specify the API for SDK generation.
207219

208220
```bash
209-
fern generate --api public-api
221+
fern generate --deep --api public-api
210222
```
211223

212224
### version
213225

214226
Use `--version` to specify a version for SDKs and documentation. Adherence to [semantic versioning](https://semver.org/) is advised.
215227

216228
```bash
217-
fern generate --version 2.11
229+
fern generate --deep --version 2.11
218230
```
219231

220232
</Accordion>

fern/products/sdks/guides/filter-your-endpoints-audiences.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ groups:
131131
### Generate your SDK
132132

133133
```bash
134-
fern generate --group sdk
134+
fern generate --deep --group sdk
135135
```
136136

137137
</Steps>
@@ -232,7 +232,7 @@ groups:
232232
### Generate your SDK
233233

234234
```bash
235-
fern generate --group sdk
235+
fern generate --deep --group sdk
236236
```
237237
</Steps>
238238
</Accordion>

fern/products/sdks/guides/setup-local-sdk-previews.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ as you develop:
99

1010
```bash
1111
# Preview all SDKs
12-
fern generate --preview
12+
fern generate --deep --preview
1313

1414
# Preview SDK for a specific language
15-
fern generate --group <language>-sdk --preview
15+
fern generate --deep --group <language>-sdk --preview
1616

1717
```
1818

@@ -50,7 +50,7 @@ groups:
5050
### Invoke the Fern CLI
5151
5252
```shell
53-
fern generate --group python-sdk --preview
53+
fern generate --deep --group python-sdk --preview
5454
```
5555

5656
### Preview your SDK

fern/products/sdks/overview/csharp/quickstart.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,22 @@ This command adds the following `group` to `generators.yml`:
4242
Run the following command to generate your SDK:
4343
4444
```bash
45-
fern generate --group csharp-sdk
45+
fern generate --deep --group csharp-sdk
4646
```
4747

4848
<Note>
4949
If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate:
5050

5151
```bash
52-
fern generate --group csharp-sdk --api your-api-name
53-
```
52+
fern generate --deep --group csharp-sdk --api your-api-name
53+
```
5454
</Note>
5555

5656
<Markdown src="/products/sdks/snippets/generate-sdk.mdx"/>
5757

5858
```bash
5959
fern/ # created by fern init
60-
sdks/ # created by fern generate --group csharp-sdk
60+
sdks/ # created by fern generate --deep --group csharp-sdk
6161
├─ csharp
6262
└─ src/
6363
├─ YourOrganizationApi.sln

fern/products/sdks/overview/go/quickstart.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,22 @@ This command adds the following `group` to `generators.yml`:
4242
Run the following command to generate your SDK:
4343
4444
```bash
45-
fern generate --group go-sdk
45+
fern generate --deep --group go-sdk
4646
```
4747

4848
<Note>
4949
If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate:
5050

5151
```bash
52-
fern generate --group go-sdk --api your-api-name
53-
```
52+
fern generate --deep --group go-sdk --api your-api-name
53+
```
5454
</Note>
5555

5656
<Markdown src="/products/sdks/snippets/generate-sdk.mdx"/>
5757

5858
```bash
5959
fern/ # created by fern init
60-
sdks/ # created by fern generate --group go-sdk
60+
sdks/ # created by fern generate --deep --group go-sdk
6161
├─ go
6262
├─ core/
6363
└─ go.mod

fern/products/sdks/overview/java/quickstart.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,22 @@ This command adds the following `group` to `generators.yml`:
4242
Run the following command to generate your SDK:
4343
4444
```bash
45-
fern generate --group java-sdk
45+
fern generate --deep --group java-sdk
4646
```
4747

4848
<Note>
4949
If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate:
5050

5151
```bash
52-
fern generate --group java-sdk --api your-api-name
53-
```
52+
fern generate --deep --group java-sdk --api your-api-name
53+
```
5454
</Note>
5555

5656
<Markdown src="/products/sdks/snippets/generate-sdk.mdx"/>
5757

5858
```bash
5959
fern/ # created by fern init
60-
sdks/ # created by fern generate --group java-sdk
60+
sdks/ # created by fern generate --deep --group java-sdk
6161
├─ java
6262
├─ YourOrganizationApiClient.java
6363
├─ core/

fern/products/sdks/overview/php/quickstart.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,27 +43,27 @@ This command adds the following `group` to `generators.yml`:
4343
Run the following command to generate your SDK:
4444
4545
```bash
46-
fern generate --group php-sdk
46+
fern generate --deep --group php-sdk
4747
```
4848

4949
<Note>
5050
If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate:
5151

5252
```bash
53-
fern generate --group php-sdk --api your-api-name
54-
```
53+
fern generate --deep --group php-sdk --api your-api-name
54+
```
5555
</Note>
5656

5757
<Markdown src="/products/sdks/snippets/generate-sdk.mdx"/>
5858

5959
```bash
6060
fern/ # created by fern init
61-
sdks/ # created by fern generate --group php-sdk
61+
sdks/ # created by fern generate --deep --group php-sdk
6262
├─ php
6363
└─ sdk/
6464
├─ src/
6565
├─ YourOrganizationClient.php
66-
└─ Types/
66+
└─ Types/
6767
└─ tests/
6868
└─ Core/
6969
```

fern/products/sdks/overview/postman/quickstart.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ groups:
4646
Run the following command:
4747
4848
```sh
49-
fern generate --group postman
49+
fern generate --deep --group postman
5050
```
5151

5252
<Note>
5353
If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate:
5454

5555
```bash
56-
fern generate --group postman --api your-api-name
56+
fern generate --deep --group postman --api your-api-name
5757
```
5858
</Note>
5959

fern/products/sdks/overview/python/quickstart.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,22 @@ This command adds the following `group` to `generators.yml`:
4242
Run the following command to generate your SDK:
4343
4444
```bash
45-
fern generate --group python-sdk
45+
fern generate --deep --group python-sdk
4646
```
4747

4848
<Note>
4949
If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate:
5050

5151
```bash
52-
fern generate --group python-sdk --api your-api-name
53-
```
52+
fern generate --deep --group python-sdk --api your-api-name
53+
```
5454
</Note>
5555

5656
<Markdown src="/products/sdks/snippets/generate-sdk.mdx"/>
5757

5858
```bash
5959
fern/ # created by fern init
60-
sdks/ # created by fern generate --group python-sdk
60+
sdks/ # created by fern generate --deep --group python-sdk
6161
├─ python
6262
├─ __init__.py
6363
├─ client.py

0 commit comments

Comments
 (0)