Skip to content

Commit 14f615f

Browse files
authored
Clarify how Docs/API Reference uses generators.yml (#585)
1 parent 9360693 commit 14f615f

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ navigation:
7777
```
7878
</CodeBlock>
7979
80+
<Note>
81+
To display different package names for SDK users versus documentation users, [use overrides files](/api-definitions/overview/overrides#separate-overrides-for-sdks-and-docs).
82+
</Note>
83+
8084
### Trigger generation
8185
8286
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!

fern/products/docs/pages/getting-started/project-structure.mdx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,18 @@ title: Fern's Documentation
165165
</Accordion>
166166
</AccordionGroup>
167167

168+
<Note>
169+
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.
170+
171+
If you're only using Fern for API Reference docs, not SDKs, your `generators.yml` should simply link to your spec:
172+
173+
```yaml title="generators.yml"
174+
api:
175+
specs:
176+
- openapi: ../openapi/openapi.json
177+
```
178+
</Note>
179+
168180

169181
## `fern.config.json`
170182

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

0 commit comments

Comments
 (0)