From 850d7a2fd38b0b1ba2d77f8517b94037cf872d44 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 7 Oct 2025 15:34:27 +0000 Subject: [PATCH] Visual Editor: Update --- fern/docs.yml | 143 +++--------------- fern/products/docs/pages/seo/redirects.mdx | 4 +- .../sdks/guides/customize-method-names.mdx | 137 ++++++++--------- 3 files changed, 89 insertions(+), 195 deletions(-) diff --git a/fern/docs.yml b/fern/docs.yml index e7f8c0ea0..72aa0aa9a 100644 --- a/fern/docs.yml +++ b/fern/docs.yml @@ -7,86 +7,71 @@ instances: owner: fern-api repo: docs branch: main - title: Fern Documentation - metadata: og:image: https://fern-docs.s3.us-east-2.amazonaws.com/fern-docs-og_image-compressed.png twitter:image: https://fern-docs.s3.us-east-2.amazonaws.com/fern-docs-og_image-compressed.png - products: - display-name: Home path: ./products/home/home.yml image: ./images/product-switcher/product-switcher-home-light.png - slug: - subtitle: Products that elevate your developer experience - + slug: null + subtitle: Products that elevate your developer experience - display-name: SDKs path: ./products/sdks/sdks.yml icon: fa-brands fa-codepen image: ./images/product-switcher/product-switcher-sdks-light.png slug: sdks subtitle: Generate client libraries in multiple languages - - display-name: Docs path: ./products/docs/docs.yml icon: fa-regular fa-browser image: ./images/product-switcher/product-switcher-docs-light.png slug: docs subtitle: Generate beautiful, interactive documentation websites - - display-name: Ask Fern path: ./products/ask-fern/ask-fern.yml - icon: fa-regular fa-magnifying-glass + icon: fa-regular fa-magnifying-glass image: ./images/product-switcher/product-switcher-askfern-light.png slug: ask-fern subtitle: Let users find answers in your documentation instantly - - display-name: CLI & API Reference subtitle: Manage and configure your Fern projects path: ./products/cli-api-reference/cli-api-reference.yml icon: fa-regular fa-terminal image: ./images/product-switcher/product-switcher-cliapi-light.png slug: cli-api-reference - - display-name: API Definitions path: ./products/api-def/api-def.yml icon: fa-regular fa-book image: ./images/product-switcher/openapi-definition-light.png slug: api-definitions - - display-name: OpenAPI path: ./products/api-def/openapi-def.yml icon: fa-regular fa-book image: ./images/product-switcher/openapi-definition-light.png slug: openapi-definition - - display-name: AsyncAPI path: ./products/api-def/asyncapi-def.yml icon: fa-regular fa-bolt image: ./images/product-switcher/asyncapi-light.png slug: asyncapi-definition - - display-name: OpenRPC path: ./products/api-def/openrpc-def.yml icon: fa-regular fa-code image: ./images/product-switcher/openrpc-light.png slug: openrpc-definition - - display-name: gRPC path: ./products/api-def/grpc-def.yml icon: fa-regular fa-plug image: ./images/product-switcher/grpc-light.png slug: grpc-definition - - display-name: Fern Definition path: ./products/api-def/ferndef-def.yml icon: fa-regular fa-seedling image: ./images/product-switcher/fern-definition-light.png slug: fern-definition - css: ./assets/styles.css - navbar-links: - type: minimal text: Slack community @@ -97,7 +82,6 @@ navbar-links: - type: filled text: Book a demo url: https://buildwithfern.com/contact - typography: bodyFont: name: GT-Planar @@ -112,78 +96,54 @@ typography: name: GT-Planar-Bold path: ./assets/GT-Planar-Bold.woff2 weight: 600 700 - logo: - href: / + href: / light: ./images/logo-primary.svg dark: ./images/logo-white.svg height: 20 colors: accent-primary: - dark: "#70E155" - light: "#008700" + dark: '#70E155' + light: '#008700' background: - dark: "#111113" - light: "#FFFFFF" - border: - dark: "#393A40" - light: "#E0E1E6" + dark: '#111113' + light: '#FFFFFF' + border: + dark: '#393A40' + light: '#E0E1E6' header-background: - dark: "#111113" - light: "#FFFFFF" + dark: '#111113' + light: '#FFFFFF' card-background: - dark: "#222325" - light: "#FFFFFF" + dark: '#222325' + light: '#FFFFFF' favicon: ./images/favicon_32.png - layout: page-width: 1504px header-height: 75px searchbar-placement: header tabs-placement: header - js: - path: ./footer-dist/output.js strategy: beforeInteractive - path: ./rive-animation.js strategy: afterInteractive - analytics: - # posthog: - # api-key: ${POSTHOG_API_KEY} gtm: container-id: GTM-55W3VNDW - experimental: mdx-components: - ./components - -# Redirects for new docs structure migration redirects: - - # ============================================================================ - # GENERAL REDIRECTS - # ============================================================================ - - # Main learn page redirect - source: /learn destination: /learn/home permanent: true - source: /learn/welcome destination: /learn/home permanent: true - - - # ============================================================================ - # SDK REDIRECTS - # ============================================================================ - - # SDK Features/Capabilities redirects - source: /learn/sdks/features/:slug* destination: /learn/sdks/capabilities/:slug* permanent: true - - # SDK Deep Dives - specific overrides for newer destinations - source: /learn/sdks/capabilities/method-names destination: /learn/sdks/deep-dives/customize-method-names permanent: true @@ -199,8 +159,6 @@ redirects: - source: /learn/sdks/capabilities/integration-tests destination: /learn/sdks/deep-dives/testing permanent: true - - # SDK Package Managers redirects - source: /learn/sdks/package-managers/:slug* destination: /learn/sdks/guides/publish-to-package-managers/:slug* permanent: true @@ -225,8 +183,6 @@ redirects: - source: /learn/sdks/guides/publish-to-package-managers/packagist destination: /learn/sdks/generators/php/publishing permanent: true - - # SDK Introduction redirects - source: /learn/sdks/introduction/configuration destination: /learn/sdks/introduction/language-support permanent: true @@ -254,23 +210,21 @@ redirects: - source: /learn/sdks/introduction/changelog/python/:slug* destination: /learn/sdks/generators/python/changelog/:slug* permanent: true - - source: /learn/sdks/introduction/changelog/csharp/:slug* + - source: /learn/sdks/introduction/changelog/csharp/:slug* destination: /learn/sdks/generators/csharp/changelog/:slug* permanent: true - source: /learn/sdks/introduction/changelog/go/:slug* destination: /learn/sdks/generators/go/changelog/:slug* permanent: true - - source: /learn/sdks/introduction/changelog/java/:slug* + - source: /learn/sdks/introduction/changelog/java/:slug* destination: /learn/sdks/generators/java/changelog/:slug* permanent: true - source: /learn/sdks/introduction/changelog/ruby/:slug* destination: /learn/sdks/generators/ruby/changelog/:slug* permanent: true - - source: /learn/sdks/introduction/changelog/php/:slug* + - source: /learn/sdks/introduction/changelog/php/:slug* destination: /learn/sdks/generators/php/changelog/:slug* permanent: true - - # SDK Capabilities - remaining general redirects (after specific overrides above) - source: /learn/sdks/capabilities/idiomatic-method-names destination: /learn/sdks/capabilities/method-names permanent: true @@ -289,12 +243,9 @@ redirects: - source: /learn/sdks/capabilities/merging-multiple-apis destination: /learn/sdks/capabilities/merging-apis permanent: true - # General SDK capabilities pattern (will catch any not specifically overridden above) - source: /learn/sdks/capabilities/:slug* destination: /learn/sdks/overview/introduction permanent: true - - # SDK Guides - specific cases first, then general pattern - source: /learn/sdks/guides/generate-your-first-sdk destination: /learn/sdks/overview/introduction permanent: true @@ -304,28 +255,18 @@ redirects: - source: /learn/sdks/guides/publish-to-package-managers/:slug* destination: /learn/sdks/generators/:slug* permanent: true - # General SDK guides pattern - source: /learn/sdks/getting-started/:slug* destination: /learn/sdks/overview/introduction permanent: true - source: /learn/sdks/guides/:slug* destination: /learn/sdks/overview/introduction permanent: true - - source: /learn/sdks/reference/generators-yml-reference destination: /learn/sdks/reference/generators-yml permanent: true - - # ============================================================================ - # DOCS REDIRECTS - # ============================================================================ - - # Building Your Docs redirects (older naming) - source: /learn/docs/building-your-docs/:slug* destination: /learn/docs/building-and-customizing-your-docs/:slug* permanent: true - - # Getting Started page redirects - specific cases first - source: /learn/docs/getting-started/customer-showcase destination: https://buildwithfern.com/customers permanent: true @@ -338,8 +279,6 @@ redirects: - source: /learn/docs/getting-started/publish-your-docs destination: /learn/docs/preview-publish/publishing-your-docs permanent: true - - # Building and Customizing Your Docs redirects - specific cases first - source: /learn/docs/building-and-customizing-your-docs/navigation destination: /learn/docs/navigation/overview permanent: true @@ -391,7 +330,6 @@ redirects: - source: /learn/docs/building-and-customizing-your-docs/search destination: /learn/docs/customization/search permanent: true - - source: /learn/docs/content/write-markdown destination: /learn/docs/writing-content/markdown permanent: true @@ -422,11 +360,9 @@ redirects: - source: /learn/docs/writing-content/code-blocks destination: /learn/docs/writing-content/components/code-blocks permanent: true - - source: /learn/docs/getting-started/changelog/:slug* destination: /learn/docs/changelog/:slug* permanent: true - - source: /learn/docs/api-references/api-explorer destination: /learn/docs/api-references/api-explorer/overview permanent: true @@ -442,12 +378,6 @@ redirects: - source: /learn/docs/customization/what-is-docs-yml destination: /learn/docs/configuration/what-is-docs-yml permanent: true - - # ============================================================================ - # CLI & API REFERENCE REDIRECTS - # ============================================================================ - - # CLI & API Reference specific redirects first - source: /learn/cli-api/cli-reference/get-started-with-fern-cli destination: /learn/cli-reference/overview permanent: true @@ -472,7 +402,6 @@ redirects: - source: /learn/cli-reference/options destination: /learn/cli-api-reference/cli-reference/options permanent: true - # CLI patterns - source: /learn/cli-api/cli-reference/:slug* destination: /learn/cli-reference/:slug* permanent: true @@ -485,12 +414,6 @@ redirects: - source: /learn/cli-reference/changelog/:slug* destination: /learn/cli-api-reference/cli-reference/changelog/:slug* permanent: true - - # ============================================================================ - # API DEFINITION REDIRECTS - # ============================================================================ - - # # API Definition OpenAPI specific redirects first - source: /learn/api-definition/openapi/endpoints/:slug* destination: /learn/api-definitions/openapi/endpoints/:slug* permanent: true @@ -521,31 +444,21 @@ redirects: - source: /learn/api-definitions/openapi/automatic-updates destination: /learn/api-definitions/openapi/sync-your-open-api-specification permanent: true - - # API Definition Fern specific redirects first - source: /learn/api-definition/fern/endpoints/:slug* destination: /learn/api-definitions/ferndef/endpoints/:slug* permanent: true - source: /learn/api-definition/fern/api-yml/:slug* destination: /learn/api-definitions/ferndef/api-yml/:slug* permanent: true - - source: /learn/api-definition/fern/:slug* + - source: /learn/api-definition/fern/:slug* destination: /learn/api-definitions/ferndef/:slug* permanent: true - - # # API Definition Introduction redirects - source: /learn/api-definition/introduction/what-is-an-api-definition destination: /learn/api-definitions/overview/what-is-an-api-definition permanent: true - source: /learn/api-definition/introduction/what-is-the-fern-folder destination: /learn/api-definitions/overview/project-structure permanent: true - - # ============================================================================ - # ASK FERN (AI SEARCH) REDIRECTS - # ============================================================================ - - # Ask Fern specific redirects first - source: /learn/ai-search/customer-showcase destination: /learn/ask-fern/customer-showcase permanent: true @@ -558,7 +471,6 @@ redirects: - source: /learn/ai-search/citations destination: /learn/ask-fern/citations permanent: true - # General Ask Fern patterns - source: /learn/ai-search/getting-started/:slug* destination: /learn/ask-fern/:slug* permanent: true @@ -580,12 +492,6 @@ redirects: - source: /learn/ask-fern/custom-prompting destination: /learn/ask-fern/configuration/custom-prompting permanent: true - - # ============================================================================ - # API REFERENCE REDIRECTS (Fern Public API) - # ============================================================================ - - # Fern Public API Reference redirects - source: /learn/api-reference/overview destination: /learn/cli-api-reference/api-reference/overview permanent: true @@ -595,10 +501,6 @@ redirects: - source: /learn/api-reference/tokens/:slug* destination: /learn/cli-api-reference/api-reference/tokens/:slug* permanent: true - - # ============================================================================ - # API REFERENCE REDIRECTS - # ============================================================================ - source: /learn/openapi-definition/empty-page destination: /learn/api-definitions/openapi/overview permanent: true @@ -629,12 +531,10 @@ redirects: - source: /learn/fern-definition/:slug* destination: /learn/api-definitions/ferndef/:slug* permanent: true - - # Redirect old others.mdx extension pages to overview pages - source: /learn/api-definitions/openapi/extensions/others destination: /learn/api-definitions/openapi/extensions/overview permanent: true - - source: /learn/api-definitions/asyncapi/extensions/others + - source: /learn/api-definitions/asyncapi/extensions/others destination: /learn/api-definitions/asyncapi/extensions/overview permanent: true - source: /learn/api-definitions/openrpc/extensions/others @@ -642,4 +542,5 @@ redirects: permanent: true - source: /learn/api-definitions/grpc/extensions/:slug* destination: /learn/api-definitions/overview/overrides#definition-specific-extensions - permanent: true \ No newline at end of file + permanent: true +navigation: [] diff --git a/fern/products/docs/pages/seo/redirects.mdx b/fern/products/docs/pages/seo/redirects.mdx index b06ae9a5e..68bec5d5a 100644 --- a/fern/products/docs/pages/seo/redirects.mdx +++ b/fern/products/docs/pages/seo/redirects.mdx @@ -11,7 +11,7 @@ subtitle: Set up the navigation for your documentation site built with Fern Docs You can add a link to an external page within your sidebar navigation with the following configuration: -```yaml title="docs.yml" +```yaml navigation: - section: Home contents: @@ -23,4 +23,4 @@ navigation: An external link within navigation - \ No newline at end of file + diff --git a/fern/products/sdks/guides/customize-method-names.mdx b/fern/products/sdks/guides/customize-method-names.mdx index 4c0035739..467aee479 100644 --- a/fern/products/sdks/guides/customize-method-names.mdx +++ b/fern/products/sdks/guides/customize-method-names.mdx @@ -9,7 +9,6 @@ code that matches your API's purpose. For example, instead of `client.postUsers` you can configure your SDK to read `client.users.create()`. - ## How it works for SDK users Here's how developers using your generated SDK would call the customized method @@ -82,76 +81,70 @@ For OpenAPI, use the `x-fern-sdk-group-name` and `x-fern-sdk-method-name` extens explicitly define your method name and grouping. - - -In the example below, Fern will generate a -method called `client.users.create()` for the `POST /users` endpoint. - -```yaml title="openapi.yaml" {4-5} -paths: - /users: - post: - x-fern-sdk-group-name: users - x-fern-sdk-method-name: create -``` - - By default, Fern uses your operation ID to generate method names. Format your - operation IDs like `{tag_name}_{operation_name}` (e.g., `users_get`) and Fern - will automatically generate `users.get()`. If your operation ID doesn't start - with a tag, Fern uses it directly as the method name. - - -### Top level methods - -If you omit the `x-fern-sdk-group-name` extension, then the generated SDK method -will live at the root of the client rather than nested under a resource group. -In the example below, Fern will generate a method called `client.send()`: - -```yaml title="openapi.yaml" {4} -paths: - /send: - post: - x-fern-sdk-method-name: send -``` - -### Multiple levels of nesting - - -See how merge.dev uses nested groups [here](https://github.com/merge-api/merge-node-client?tab=readme-ov-file#create-link-token). - - -If you add more than one `x-fern-sdk-group-name` extension, then the generated SDK will nest group names. -The order of the group names is preserved in the generated SDK method. - -In the example below, Fern will generate a method called `client.users.notifications.send()`: - -```yaml title="openapi.yaml" -paths: - /users/notifications: - post: - x-fern-sdk-group-name: - - users - - notifications - x-fern-sdk-method-name: send -``` - - - -In the example below, Fern will generate a method called `client.users.create()`: - -```yaml title="users.yml" {4, 6} -services: - http: - UsersService: - base-path: /users # This defines the group/namespace for the methods - endpoints: - create: # This defines the specific method name within the group - method: POST - path: "" -``` - - + + In the example below, Fern will generate a method called `client.users.create()` for the `POST /users` endpoint. + + ```yaml + paths: + /users: + post: + x-fern-sdk-group-name: users + x-fern-sdk-method-name: create + ``` + + + By default, Fern uses your operation ID to generate method names. Format your + operation IDs like `{tag_name}_{operation_name}` (e.g., `users_get`) and Fern + will automatically generate `users.get()`. If your operation ID doesn't start + with a tag, Fern uses it directly as the method name. + + + ### Top level methods + + If you omit the `x-fern-sdk-group-name` extension, then the generated SDK method will live at the root of the client rather than nested under a resource group. In the example below, Fern will generate a method called `client.send()`: + + ```yaml + paths: + /send: + post: + x-fern-sdk-method-name: send + ``` + + ### Multiple levels of nesting + + + See how merge.dev uses nested groups [here](https://github.com/merge-api/merge-node-client?tab=readme-ov-file#create-link-token). + + + If you add more than one `x-fern-sdk-group-name` extension, then the generated SDK will nest group names. The order of the group names is preserved in the generated SDK method. + + In the example below, Fern will generate a method called `client.users.notifications.send()`: + + ```yaml + paths: + /users/notifications: + post: + x-fern-sdk-group-name: + - users + - notifications + x-fern-sdk-method-name: send + ``` + + + + + In the example below, Fern will generate a method called `client.users.create()`: + + ```yaml + services: + http: + UsersService: + base-path: /users # This defines the group/namespace for the methods + endpoints: + create: # This defines the specific method name within the group + method: POST + path: "" + ``` + - -