Skip to content

Commit e262a4d

Browse files
Add Mintlify integration page for Fern
- Create new integration page at fern/products/docs/pages/integrations/sdks/fern.mdx - Add navigation entry in docs.yml - Add Fern card to integrations overview page - Follow pattern from Speakeasy and Stainless integration pages Co-Authored-By: [email protected] <[email protected]>
1 parent 91ec5dd commit e262a4d

File tree

3 files changed

+76
-1
lines changed

3 files changed

+76
-1
lines changed

fern/products/docs/docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,9 @@ navigation:
269269
slug: analytics/mixpanel
270270
- page: Postman
271271
path: ./pages/integrations/postman.mdx
272+
- page: Fern
273+
path: ./pages/integrations/sdks/fern.mdx
274+
slug: sdks/fern
272275
- page: LaunchDarkly feature flags
273276
path: ./pages/integrations/feature-flags.mdx
274277
hidden: true

fern/products/docs/pages/integrations/overview.mdx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,14 @@ description: "Integrate with third party platforms for analytics, support, etc."
4747
iconSize={12}
4848
/>
4949

50+
<Card
51+
title="Fern"
52+
href="/docs/integrations/sdks/fern"
53+
horizontal
54+
icon={<img src="https://buildwithfern.com/_next/image?url=%2Fimages%2Flogo-green.png&w=48&q=75" />}
55+
iconSize={12}
56+
/>
57+
5058
</CardGroup>
5159

5260
## Enabling Analytics
@@ -99,4 +107,4 @@ are available during the workflow run.
99107

100108
<Markdown src="/snippets/enterprise-plan.mdx"/>
101109

102-
If you want to integrate with a third-party analytics or support platforms that Fern doesn't directly support, you can do so [using custom JS](/docs/customization/custom-css-js#custom-javascript).
110+
If you want to integrate with a third-party analytics or support platforms that Fern doesn't directly support, you can do so [using custom JS](/docs/customization/custom-css-js#custom-javascript).
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
title: "Fern"
3+
description: "Automate SDK code snippets in your API playground"
4+
---
5+
6+
Fern offers a publicly accessible URL with an OpenAPI spec enriched with code samples from generated SDKs. SDK usage snippets are automatically included in the [interactive playground](/docs/api-references/api-explorer) of Mintlify-powered documentation sites.
7+
8+
## Prerequisites
9+
10+
To integrate Mintlify with Fern, you'll need the following:
11+
12+
- A [Mintlify documentation repository](/docs/quickstart#creating-the-repository).
13+
- A Fern-generated API definition with SDK generators configured in [`generators.yml`](/sdks/reference/generators-yml).
14+
15+
## Setting up the integration
16+
17+
To integrate Fern with Mintlify, you must get your API's OpenAPI spec URL from Fern and update your `docs.json` configuration file.
18+
19+
### Get your OpenAPI spec URL from Fern
20+
21+
Fern automatically generates a publicly accessible OpenAPI spec enriched with SDK code samples. The URL follows this pattern:
22+
23+
```
24+
https://registry.buildwithfern.com/api-name/openapi/openapi.json
25+
```
26+
27+
Replace `api-name` with your Fern API name. You can find your API name in your `fern.config.json` file.
28+
29+
### Update your `docs.json` configuration file
30+
31+
Add the Fern OpenAPI spec URL to an **Anchors** or **Tabs** section in your `docs.json` file.
32+
33+
Add the OpenAPI spec URL to an anchor by updating the `anchor` field in your `docs.json` file as follows:
34+
35+
```json docs.json
36+
{
37+
"anchors": [
38+
{
39+
"name": "API Reference",
40+
// !mark
41+
"openapi": "https://registry.buildwithfern.com/api-name/openapi/openapi.json",
42+
"url": "api-reference",
43+
"icon": "square-terminal"
44+
}
45+
]
46+
}
47+
```
48+
49+
Add the OpenAPI spec URL to a tab by updating the `tab` field in the `docs.json` file as follows:
50+
51+
```json docs.json
52+
{
53+
"tabs": [
54+
{
55+
"name": "API Reference",
56+
"url": "api-reference",
57+
// !mark
58+
"openapi": "https://registry.buildwithfern.com/api-name/openapi/openapi.json"
59+
}
60+
]
61+
}
62+
```
63+
64+
Fern-generated code snippets can now be viewed in your API docs and interacted with in the playground.

0 commit comments

Comments
 (0)