Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 3 additions & 0 deletions fern/products/docs/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ navigation:
slug: analytics/mixpanel
- page: Postman
path: ./pages/integrations/postman.mdx
- page: Fern
path: ./pages/integrations/sdks/fern.mdx
slug: sdks/fern
- page: LaunchDarkly feature flags
path: ./pages/integrations/feature-flags.mdx
hidden: true
Expand Down
10 changes: 9 additions & 1 deletion fern/products/docs/pages/integrations/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ description: "Integrate with third party platforms for analytics, support, etc."
iconSize={12}
/>

<Card
title="Fern"
href="/docs/integrations/sdks/fern"
horizontal
icon={<img src="https://buildwithfern.com/_next/image?url=%2Fimages%2Flogo-green.png&w=48&q=75" />}
iconSize={12}
/>

</CardGroup>

## Enabling Analytics
Expand Down Expand Up @@ -99,4 +107,4 @@ are available during the workflow run.

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

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).
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).
64 changes: 64 additions & 0 deletions fern/products/docs/pages/integrations/sdks/fern.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
title: "Fern"
description: "Automate SDK code snippets in your API playground"
---

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.

## Prerequisites

To integrate Mintlify with Fern, you'll need the following:

- A [Mintlify documentation repository](/docs/quickstart#creating-the-repository).
- A Fern-generated API definition with SDK generators configured in [`generators.yml`](/sdks/reference/generators-yml).

## Setting up the integration

To integrate Fern with Mintlify, you must get your API's OpenAPI spec URL from Fern and update your `docs.json` configuration file.

### Get your OpenAPI spec URL from Fern

Fern automatically generates a publicly accessible OpenAPI spec enriched with SDK code samples. The URL follows this pattern:

```
https://registry.buildwithfern.com/api-name/openapi/openapi.json
```

Replace `api-name` with your Fern API name. You can find your API name in your `fern.config.json` file.

### Update your `docs.json` configuration file

Add the Fern OpenAPI spec URL to an **Anchors** or **Tabs** section in your `docs.json` file.

Add the OpenAPI spec URL to an anchor by updating the `anchor` field in your `docs.json` file as follows:

```json docs.json
{
"anchors": [
{
"name": "API Reference",
// !mark
"openapi": "https://registry.buildwithfern.com/api-name/openapi/openapi.json",
"url": "api-reference",
"icon": "square-terminal"
}
]
}
```

Add the OpenAPI spec URL to a tab by updating the `tab` field in the `docs.json` file as follows:

```json docs.json
{
"tabs": [
{
"name": "API Reference",
"url": "api-reference",
// !mark
"openapi": "https://registry.buildwithfern.com/api-name/openapi/openapi.json"
}
]
}
```

Fern-generated code snippets can now be viewed in your API docs and interacted with in the playground.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[FernStyles.Current] Avoid time-relative terms like 'now' that become outdated

Loading