Skip to content

Commit e18e017

Browse files
authored
Document how to specify SDK version for snippets (Docs) (#788)
1 parent c6a7425 commit e18e017

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

fern/products/docs/pages/api-references/sdk-snippets.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,22 @@ navigation:
9292
To display different package names for SDK users versus documentation users, [use overrides files](/api-definitions/overview/overrides#separate-overrides-for-sdks-and-docs).
9393
</Note>
9494
95+
<Accordion title="Specify SDK versions (optional)">
96+
97+
You can specify which SDK version to use when generating code snippets.
98+
99+
<CodeBlock title="docs.yml">
100+
```yaml {4-6}
101+
navigation:
102+
- api: API Reference
103+
snippets:
104+
python:
105+
package: your-package-name # <--- needs to match the naming in generators.yml
106+
version: your-version number # SDK version to use for snippets
107+
```
108+
</CodeBlock>
109+
</Accordion>
110+
95111
### Trigger generation
96112
97113
As the final step, trigger your docs generation by running `fern generate --docs` locally or in CI/CD (i.e., GitHub Actions). The SDK snippets will now appear via a drop-down!

0 commit comments

Comments
 (0)