From 87a98eeb5d5d2f394d3ff0578f30014a847f38d3 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 14 Apr 2026 19:25:20 +0000 Subject: [PATCH 1/3] docs: document api:apiName link syntax for API Reference sections Co-Authored-By: Anar Kafkas --- .../pages/api-references/api-ref-content.mdx | 2 +- .../docs/pages/changelog/2026-04-14.mdx | 12 +++++++++++- .../writing-content/markdown-basics.mdx | 2 +- fern/snippets/api-link-syntax.mdx | 18 +++++++++++++++--- 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/fern/products/docs/pages/api-references/api-ref-content.mdx b/fern/products/docs/pages/api-references/api-ref-content.mdx index bd15c5264..1292a3d6f 100644 --- a/fern/products/docs/pages/api-references/api-ref-content.mdx +++ b/fern/products/docs/pages/api-references/api-ref-content.mdx @@ -53,7 +53,7 @@ service: -## Linking to API endpoints +## API link syntax diff --git a/fern/products/docs/pages/changelog/2026-04-14.mdx b/fern/products/docs/pages/changelog/2026-04-14.mdx index a582d63a4..8f8d43e43 100644 --- a/fern/products/docs/pages/changelog/2026-04-14.mdx +++ b/fern/products/docs/pages/changelog/2026-04-14.mdx @@ -1,5 +1,5 @@ --- -tags: ["ai-features"] +tags: ["ai-features", "api-reference", "mdx"] --- ## AI search model update @@ -7,3 +7,13 @@ tags: ["ai-features"] Ask Fern now uses [Claude 4.6 Sonnet](https://www.anthropic.com/news/claude-sonnet-4-6) and [Claude 4.5 Haiku](https://www.anthropic.com/news/claude-haiku-4-5). + +## Link to API Reference sections with `api:` syntax + +The `api:` link syntax supports linking to the root of an API Reference section in addition to individual endpoints. Use `api:apiName` to create a link that resolves to the landing page of a specific API Reference at build time. + +```mdx Markdown +Explore the [Plant Store API](api:plant-store) reference. +``` + + diff --git a/fern/products/docs/pages/component-library/writing-content/markdown-basics.mdx b/fern/products/docs/pages/component-library/writing-content/markdown-basics.mdx index 9034c9886..c7c42e998 100644 --- a/fern/products/docs/pages/component-library/writing-content/markdown-basics.mdx +++ b/fern/products/docs/pages/component-library/writing-content/markdown-basics.mdx @@ -63,7 +63,7 @@ Read the [Introduction](/learn/sdks/overview/introduction). ``` -### Link to an API endpoint +### API link syntax diff --git a/fern/snippets/api-link-syntax.mdx b/fern/snippets/api-link-syntax.mdx index 8311e994b..6dfb2c0bd 100644 --- a/fern/snippets/api-link-syntax.mdx +++ b/fern/snippets/api-link-syntax.mdx @@ -1,6 +1,6 @@ -Use the `api:` link syntax to link to an API endpoint in any Markdown content rendered by Fern. Fern resolves the link to the correct URL at build time, so you don't have to hardcode slugs. +Use the `api:` link syntax to link to an API endpoint or API Reference section in any Markdown content rendered by Fern. Fern resolves the link to the correct URL at build time, so you don't have to hardcode slugs. -The format is `api:METHOD/path`, where `METHOD` is an HTTP method (`GET`, `POST`, `PUT`, `PATCH`, `DELETE`) and `/path` is the endpoint path from your API definition. If your project has [multiple APIs](/learn/docs/api-references/generate-api-ref#include-more-than-one-api-reference), prefix the link with the API name: `api:API-NAME:METHOD/path`. +To link to a specific endpoint, use `api:METHOD/path`, where `METHOD` is an HTTP method (`GET`, `POST`, `PUT`, `PATCH`, `DELETE`) and `/path` is the endpoint path from your API definition. If your project has [multiple APIs](/learn/docs/api-references/generate-api-ref#include-more-than-one-api-reference), prefix the link with the API name: `api:API-NAME:METHOD/path`. For example: @@ -14,4 +14,16 @@ View the [Current user information](api:mcp-tools:GET/api/fern-docs/whoami) endp -Path parameters are also supported. Include them in the endpoint path with curly braces, such as `api:GET/v2/payments/{paymentId}`. \ No newline at end of file +Path parameters are also supported. Include them in the endpoint path with curly braces, such as `api:GET/v2/payments/{paymentId}`. + +To link to the root of an API Reference section, use `api:apiName`, where `apiName` matches the API name in your `generators.yml` file. This is useful when your project has multiple APIs and you want to link to the landing page of a specific API Reference. + +```mdx Markdown +Explore the [Plant Store API](api:plant-store) reference. +``` + +
+
+ Explore the [Plant Store API](api:plant-store) reference. +
+
From 3bbe2b2e7c730ae2fbb3c44657790a1d32db3e01 Mon Sep 17 00:00:00 2001 From: Devin Logan Date: Wed, 15 Apr 2026 11:43:57 -0400 Subject: [PATCH 2/3] streamline text, add structure --- .../docs/pages/changelog/2026-04-14.mdx | 2 +- fern/snippets/api-link-syntax.mdx | 25 ++++++------------- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/fern/products/docs/pages/changelog/2026-04-14.mdx b/fern/products/docs/pages/changelog/2026-04-14.mdx index 8f8d43e43..fa17fa381 100644 --- a/fern/products/docs/pages/changelog/2026-04-14.mdx +++ b/fern/products/docs/pages/changelog/2026-04-14.mdx @@ -10,7 +10,7 @@ Ask Fern now uses [Claude 4.6 Sonnet](https://www.anthropic.com/news/claude-sonn ## Link to API Reference sections with `api:` syntax -The `api:` link syntax supports linking to the root of an API Reference section in addition to individual endpoints. Use `api:apiName` to create a link that resolves to the landing page of a specific API Reference at build time. +The `api:` link syntax now supports linking to the root of an API Reference section. Use `api:apiName` to create a link that resolves to the landing page of a specific API Reference at build time. This is useful when your project has multiple APIs. ```mdx Markdown Explore the [Plant Store API](api:plant-store) reference. diff --git a/fern/snippets/api-link-syntax.mdx b/fern/snippets/api-link-syntax.mdx index 6dfb2c0bd..f825c5415 100644 --- a/fern/snippets/api-link-syntax.mdx +++ b/fern/snippets/api-link-syntax.mdx @@ -1,29 +1,20 @@ -Use the `api:` link syntax to link to an API endpoint or API Reference section in any Markdown content rendered by Fern. Fern resolves the link to the correct URL at build time, so you don't have to hardcode slugs. +Use `api:` link syntax to link to API endpoints or API Reference sections in any Markdown content. Fern resolves these links at build time, so you don't need to hardcode slugs. -To link to a specific endpoint, use `api:METHOD/path`, where `METHOD` is an HTTP method (`GET`, `POST`, `PUT`, `PATCH`, `DELETE`) and `/path` is the endpoint path from your API definition. If your project has [multiple APIs](/learn/docs/api-references/generate-api-ref#include-more-than-one-api-reference), prefix the link with the API name: `api:API-NAME:METHOD/path`. +#### Link to an endpoint -For example: +Use `api:METHOD/path`, where `METHOD` is an HTTP method (`GET`, `POST`, `PUT`, `PATCH`, `DELETE`) and `/path` is the endpoint path from your API definition. Path parameters use curly braces, such as `api:GET/v2/payments/{paymentId}`. + +For projects with [multiple APIs](/learn/docs/api-references/generate-api-ref#include-more-than-one-api-reference), prefix with the API name: `api:API-NAME:METHOD/path`. ```mdx Markdown View the [Current user information](api:mcp-tools:GET/api/fern-docs/whoami) endpoint. ``` -
-
- View the [Current user information](api:mcp-tools:GET/api/fern-docs/whoami) endpoint. -
-
+### Link to the root of an API Reference section -Path parameters are also supported. Include them in the endpoint path with curly braces, such as `api:GET/v2/payments/{paymentId}`. +Use `api:apiName`, where `apiName` matches the API name in your `generators.yml` file. This is useful when your project has multiple APIs and you want to link to the root landing page of a specific API Reference. -To link to the root of an API Reference section, use `api:apiName`, where `apiName` matches the API name in your `generators.yml` file. This is useful when your project has multiple APIs and you want to link to the landing page of a specific API Reference. ```mdx Markdown Explore the [Plant Store API](api:plant-store) reference. -``` - -
-
- Explore the [Plant Store API](api:plant-store) reference. -
-
+``` \ No newline at end of file From 66a8dbb83c370db4d35d9eb3f8d956402b0004ac Mon Sep 17 00:00:00 2001 From: Devin Logan Date: Wed, 15 Apr 2026 11:47:55 -0400 Subject: [PATCH 3/3] nit: accordions --- fern/snippets/api-link-syntax.mdx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/fern/snippets/api-link-syntax.mdx b/fern/snippets/api-link-syntax.mdx index f825c5415..1e818c71e 100644 --- a/fern/snippets/api-link-syntax.mdx +++ b/fern/snippets/api-link-syntax.mdx @@ -1,6 +1,7 @@ Use `api:` link syntax to link to API endpoints or API Reference sections in any Markdown content. Fern resolves these links at build time, so you don't need to hardcode slugs. -#### Link to an endpoint + + Use `api:METHOD/path`, where `METHOD` is an HTTP method (`GET`, `POST`, `PUT`, `PATCH`, `DELETE`) and `/path` is the endpoint path from your API definition. Path parameters use curly braces, such as `api:GET/v2/payments/{paymentId}`. @@ -9,12 +10,14 @@ For projects with [multiple APIs](/learn/docs/api-references/generate-api-ref#in ```mdx Markdown View the [Current user information](api:mcp-tools:GET/api/fern-docs/whoami) endpoint. ``` - -### Link to the root of an API Reference section + + Use `api:apiName`, where `apiName` matches the API name in your `generators.yml` file. This is useful when your project has multiple APIs and you want to link to the root landing page of a specific API Reference. ```mdx Markdown Explore the [Plant Store API](api:plant-store) reference. -``` \ No newline at end of file +``` + + \ No newline at end of file