Skip to content

Commit cee068e

Browse files
authored
Modify Python and TypeScript quickstarts to work around known nested snippets issue (#23)
1 parent af412db commit cee068e

File tree

3 files changed

+59
-28
lines changed

3 files changed

+59
-28
lines changed

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

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,36 @@ Generate a Python SDK by following the instructions on this page.
2020

2121
<Markdown src="/products/sdks/snippets/option-2-asyncapi.mdx"/>
2222

23-
<Markdown src="/products/sdks/snippets/option-3-fern-def.mdx"/>
23+
<Accordion title="Option 3: Fern Definition">
24+
25+
<Markdown src="/products/sdks/snippets/option-3-fern-def.mdx"/>
26+
27+
2. Add the config option `outputSourceFiles: true` to
28+
`generators.yml`. This ensures your SDK contains source files in
29+
your preferred SDK language instead of compiled output.
30+
31+
```yaml {11-12}
32+
# yaml-language-server: $schema=https://schema.buildwithfern.dev/generators-yml.json
33+
default-group: local
34+
groups:
35+
local:
36+
generators:
37+
- name: fernapi/fern-typescript-node-sdk
38+
output:
39+
location: local-file-system
40+
path: ../sdks/typescript
41+
version: <Markdown src="/snippets/version-number.mdx"/>
42+
config:
43+
outputSourceFiles: true
44+
```
45+
46+
<Note>`fern init` creates a default configuration that includes the
47+
TypeScript Node SDK generator. The `local` group containing this
48+
generator only generates if you run fern generate without specifying a
49+
group, or if you explicitly target it with `fern generate --group
50+
local`. In subsequent steps, you'll add an additional generator for your
51+
preferred SDK language.</Note>
52+
</Accordion>
2453

2554
</AccordionGroup>
2655

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,38 @@ Generate a TypeScript SDK by following the instructions on this page.
1818
<Markdown src="/products/sdks/snippets/option-1-openapi.mdx"/>
1919

2020
<Markdown src="/products/sdks/snippets/option-2-asyncapi.mdx"/>
21+
22+
<Accordion title="Option 3: Fern Definition">
2123

2224
<Markdown src="/products/sdks/snippets/option-3-fern-def.mdx"/>
2325

26+
2. Add the config option `outputSourceFiles: true` to
27+
`generators.yml`. This ensures your SDK contains source files in
28+
your preferred SDK language instead of compiled output.
29+
30+
```yaml {11-12}
31+
# yaml-language-server: $schema=https://schema.buildwithfern.dev/generators-yml.json
32+
default-group: local
33+
groups:
34+
local:
35+
generators:
36+
- name: fernapi/fern-typescript-node-sdk
37+
output:
38+
location: local-file-system
39+
path: ../sdks/typescript
40+
version: <Markdown src="/snippets/version-number.mdx"/>
41+
config:
42+
outputSourceFiles: true
43+
```
44+
45+
<Note>`fern init` creates a default configuration that includes the
46+
TypeScript Node SDK generator. The `local` group containing this
47+
generator only generates if you run fern generate without specifying a
48+
group, or if you explicitly target it with `fern generate --group
49+
local`. In subsequent steps, you'll add an additional generator for your
50+
preferred SDK language.</Note>
51+
</Accordion>
52+
2453
</AccordionGroup>
2554

2655
<Markdown src="/products/sdks/snippets/pass-fern-check.mdx"/>
Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<Accordion title="Option 3: Fern Definition">
21
1. Initialize the Fern folder using the Fern Definition by running the following command:
32

43
```bash
@@ -28,29 +27,3 @@
2827

2928
{/* TODO: show what generators.yml looks like, link out to configuration.md */}
3029

31-
2. Add the config option `outputSourceFiles: true` to
32-
`generators.yml`. This ensures your SDK contains source files in
33-
your preferred SDK language instead of compiled output.
34-
35-
```yaml {11-12}
36-
# yaml-language-server: $schema=https://schema.buildwithfern.dev/generators-yml.json
37-
default-group: local
38-
groups:
39-
local:
40-
generators:
41-
- name: fernapi/fern-typescript-node-sdk
42-
output:
43-
location: local-file-system
44-
path: ../sdks/typescript
45-
version: <Markdown src="/snippets/version-number.mdx"/>
46-
config:
47-
outputSourceFiles: true
48-
```
49-
50-
<Note>`fern init` creates a default configuration that includes the
51-
TypeScript Node SDK generator. The `local` group containing this
52-
generator only generates if you run fern generate without specifying a
53-
group, or if you explicitly target it with `fern generate --group
54-
local`. In subsequent steps, you'll add an additional generator for your
55-
preferred SDK language.</Note>
56-
</Accordion>

0 commit comments

Comments
 (0)