Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions fern/products/docs/pages/api-references/sdk-snippets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ navigation:
```
</CodeBlock>

<Note>
To display different package names for SDK users versus documentation users, [use overrides files](/api-definitions/overview/overrides#separate-overrides-for-sdks-and-docs).
</Note>

### Trigger generation

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!
Expand Down
16 changes: 15 additions & 1 deletion fern/products/docs/pages/getting-started/project-structure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,18 @@ title: Fern's Documentation
</Accordion>
</AccordionGroup>

<Note>
If you're using Fern for both API Reference documentation and SDKs, you'll use both `docs.yml` (the Docs configuration file) and `generators.yml` ([the SDK configuration file](/sdks/overview/github#generatorsyml)) to configure [how SDK code snippets appear](/docs/api-references/sdk-snippets) in your API reference documentation.

If you're only using Fern for API Reference docs, not SDKs, your `generators.yml` should simply link to your spec:

```yaml title="generators.yml"
api:
specs:
- openapi: ../openapi/openapi.json
```
</Note>


## `fern.config.json`

Expand All @@ -177,4 +189,6 @@ The `fern.config.json` file specifies your organization name and the version of
"version": "<Markdown src="/products/sdks/snippets/fern-config-json-version.mdx"/>"
}
```
</CodeBlock>
</CodeBlock>