From 5aafcc5b2e470492ab49b5460c4a673a8ddcf9dd Mon Sep 17 00:00:00 2001 From: Clay Tondreau Date: Wed, 5 Aug 2026 12:17:22 -0400 Subject: [PATCH 1/2] Fix broken internal links and clarify `fern export`, from reader feedback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Addresses issues surfaced by reader feedback and 404 analytics on buildwithfern.com/learn over the last 30 days. Broken /learn links (596 links across 158 files) Two readers reported that Ask AI handed them links that 404 — one noting the links were "missing the `/learn` subdomain that is present in all Fern docs links." The root cause is in the source: internal links were written product-root-relative (`/sdks/...`, `/docs/...`) instead of site-absolute (`/learn/sdks/...`). Docs are served under `/learn`, so these 404 for readers and get cited verbatim by Ask AI. Verified against the live site before and after: 404 https://buildwithfern.com/sdks/deep-dives/testing 200 https://buildwithfern.com/learn/sdks/deep-dives/testing All 136 distinct rewritten targets were confirmed to return 200. Links inside fenced code blocks and inline code spans are left alone, since those are illustrative — the ElevenLabs sample content in developer-tools/cursor.mdx and the pet/plant store demo API links are examples, not live cross-references. 404: /learn/api-definitions/protobuf Third most-hit 404. Protobuf content lives under gRPC, so this now redirects to /learn/api-definitions/grpc/overview. `fern export` code block marked unhelpful The flagged block listed the `.yml` and `.json` invocations on consecutive lines, reading as two commands to run rather than one choice of output format, and never said the path argument is the file being written. Both pages now state that the path is the output file and present the formats as alternatives. Also documents `--indent` (added in CLI 3.42.x, previously only in the changelog) and fixes the broken indentation that was rendering the export-openapi.mdx code block inside a stray blockquote. Co-Authored-By: Claude --- fern/docs.yml | 2 + .../ferndef/api-yml/global-configuration.mdx | 2 +- fern/products/api-def/ferndef/auth.mdx | 2 +- fern/products/api-def/ferndef/endpoints.mdx | 2 +- fern/products/api-def/ferndef/examples.mdx | 2 +- .../api-def/ferndef/export-openapi.mdx | 28 ++++-- fern/products/api-def/ferndef/webhooks.mdx | 2 +- fern/products/api-def/grpc/overview.mdx | 2 +- fern/products/api-def/openapi/automation.mdx | 2 +- .../api-def/openapi/extensions/examples.mdx | 2 +- .../openapi/extensions/global-headers.mdx | 2 +- fern/products/api-def/openapi/overview.mdx | 6 +- fern/products/api-def/openapi/webhooks.mdx | 2 +- .../products/api-def/pages/asyncapi-empty.mdx | 2 +- fern/products/api-def/pages/ferndef-empty.mdx | 2 +- fern/products/api-def/pages/grpc-empty.mdx | 2 +- fern/products/api-def/pages/openapi-empty.mdx | 2 +- fern/products/api-def/pages/openrpc-empty.mdx | 2 +- fern/products/api-def/pages/overrides.mdx | 2 +- .../api-def/pages/project-structure.mdx | 10 +- .../pages/what-is-an-api-definition.mdx | 8 +- .../cli-api-reference/pages/commands.mdx | 19 +++- .../api-references/customize-api-ref.mdx | 2 +- .../pages/api-references/http-snippets.mdx | 2 +- .../default-components/badges.mdx | 2 +- .../default-components/callouts.mdx | 2 +- .../default-components/code-blocks.mdx | 2 +- .../default-components/files.mdx | 8 +- .../default-components/overview.mdx | 52 +++++----- .../default-components/tabs.mdx | 2 +- .../customization/announcement-banner.mdx | 2 +- .../pages/customization/custom-css-js.mdx | 4 +- .../customization/custom-header-footer.mdx | 16 +-- .../docs/pages/getting-started/overview.mdx | 28 +++--- .../getting-started/project-structure.mdx | 8 +- .../docs/pages/getting-started/quickstart.mdx | 2 +- .../docs/pages/integrations/overview.mdx | 18 ++-- .../docs/pages/navigation/frontmatter.mdx | 4 +- .../docs/pages/navigation/products.mdx | 4 +- .../pages/navigation/site-level-settings.mdx | 10 +- .../docs/pages/navigation/versions.mdx | 4 +- .../preview-publish/publishing-your-docs.mdx | 4 +- fern/products/docs/pages/seo/redirects.mdx | 4 +- .../docs/snippets/default-version.mdx | 2 +- fern/products/home/pages/welcome.mdx | 98 +++++++++---------- fern/products/sdks/capabilities.mdx | 48 ++++----- fern/products/sdks/custom-code.mdx | 10 +- .../deep-dives/dynamic-authentication.mdx | 10 +- .../sdks/deep-dives/generated-sdk.mdx | 2 +- fern/products/sdks/deep-dives/self-hosted.mdx | 6 +- .../sdks/generators/csharp/quickstart.mdx | 2 +- .../sdks/generators/go/configuration.mdx | 2 +- .../sdks/generators/go/quickstart.mdx | 2 +- .../sdks/generators/java/configuration.mdx | 2 +- .../java/publishing-to-maven-central.mdx | 2 +- .../sdks/generators/java/quickstart.mdx | 2 +- .../sdks/generators/php/configuration.mdx | 2 +- .../sdks/generators/php/quickstart.mdx | 2 +- .../sdks/generators/python/configuration.mdx | 2 +- .../python/dynamic-authentication.mdx | 4 +- .../generators/python/publishing-to-pypi.mdx | 2 +- .../sdks/generators/python/quickstart.mdx | 2 +- .../sdks/generators/ruby/configuration.mdx | 2 +- .../sdks/generators/ruby/quickstart.mdx | 2 +- .../sdks/generators/swift/configuration.mdx | 2 +- .../generators/typescript/configuration.mdx | 8 +- .../generators/typescript/custom-code.mdx | 4 +- .../typescript/dynamic-authentication.mdx | 6 +- .../typescript/publishing-to-npm.mdx | 2 +- .../sdks/generators/typescript/quickstart.mdx | 2 +- .../generators/typescript/serde-layer.mdx | 2 +- fern/products/sdks/how-it-works.mdx | 2 +- fern/products/sdks/introduction.mdx | 50 +++++----- fern/products/sdks/project-structure.mdx | 6 +- .../reference/generators-yml-reference.mdx | 20 ++-- .../sdks/snippets/custom-code-callout.mdx | 2 +- .../sdks/snippets/github-publishing-mode.mdx | 2 +- fern/products/sdks/snippets/oauth-params.mdx | 2 +- .../products/sdks/snippets/readme-options.mdx | 16 +-- .../snippets/setup-fern-folder-callout.mdx | 2 +- fern/snippets/default-version.mdx | 2 +- fern/snippets/openapi-specs.mdx | 2 +- .../ferndef/api-yml/global-configuration.mdx | 2 +- .../zh/products/api-def/ferndef/auth.mdx | 2 +- .../zh/products/api-def/ferndef/endpoints.mdx | 2 +- .../zh/products/api-def/ferndef/examples.mdx | 2 +- .../api-def/ferndef/export-openapi.mdx | 2 +- .../zh/products/api-def/ferndef/webhooks.mdx | 2 +- .../zh/products/api-def/grpc/overview.mdx | 2 +- .../products/api-def/openapi/automation.mdx | 2 +- .../api-def/openapi/extensions/examples.mdx | 2 +- .../openapi/extensions/global-headers.mdx | 2 +- .../zh/products/api-def/openapi/overview.mdx | 6 +- .../zh/products/api-def/openapi/webhooks.mdx | 2 +- .../products/api-def/pages/asyncapi-empty.mdx | 2 +- .../products/api-def/pages/ferndef-empty.mdx | 2 +- .../zh/products/api-def/pages/grpc-empty.mdx | 2 +- .../products/api-def/pages/openapi-empty.mdx | 2 +- .../products/api-def/pages/openrpc-empty.mdx | 2 +- .../zh/products/api-def/pages/overrides.mdx | 2 +- .../api-def/pages/project-structure.mdx | 10 +- .../pages/what-is-an-api-definition.mdx | 8 +- .../cli-api-reference/pages/commands.mdx | 2 +- .../docs/pages/api-references/audiences.mdx | 2 +- .../api-references/customize-api-ref.mdx | 2 +- .../pages/api-references/http-snippets.mdx | 2 +- .../default-components/badges.mdx | 2 +- .../default-components/callouts.mdx | 2 +- .../default-components/code-blocks.mdx | 2 +- .../default-components/files.mdx | 8 +- .../default-components/overview.mdx | 50 +++++----- .../default-components/tabs.mdx | 2 +- .../customization/announcement-banner.mdx | 2 +- .../pages/customization/custom-css-js.mdx | 4 +- .../customization/custom-header-footer.mdx | 16 +-- .../customization/custom-react-components.mdx | 2 +- .../docs/pages/getting-started/overview.mdx | 28 +++--- .../getting-started/project-structure.mdx | 8 +- .../docs/pages/getting-started/quickstart.mdx | 2 +- .../docs/pages/integrations/overview.mdx | 14 +-- .../docs/pages/navigation/frontmatter.mdx | 4 +- .../docs/pages/navigation/products.mdx | 6 +- .../pages/navigation/site-level-settings.mdx | 8 +- .../docs/pages/navigation/versions.mdx | 4 +- .../preview-publish/publishing-your-docs.mdx | 4 +- .../zh/products/docs/pages/seo/redirects.mdx | 4 +- .../zh/products/home/pages/welcome.mdx | 98 +++++++++---------- .../zh/products/sdks/capabilities.mdx | 52 +++++----- .../zh/products/sdks/custom-code.mdx | 10 +- .../deep-dives/dynamic-authentication.mdx | 10 +- .../sdks/deep-dives/generated-sdk.mdx | 2 +- .../products/sdks/deep-dives/self-hosted.mdx | 6 +- .../generators/csharp/publishing-to-nuget.mdx | 2 +- .../sdks/generators/csharp/quickstart.mdx | 2 +- .../sdks/generators/go/configuration.mdx | 2 +- .../sdks/generators/go/quickstart.mdx | 2 +- .../sdks/generators/java/configuration.mdx | 2 +- .../java/publishing-to-maven-central.mdx | 2 +- .../sdks/generators/java/quickstart.mdx | 2 +- .../sdks/generators/php/configuration.mdx | 2 +- .../sdks/generators/php/quickstart.mdx | 2 +- .../sdks/generators/python/configuration.mdx | 2 +- .../python/dynamic-authentication.mdx | 4 +- .../generators/python/publishing-to-pypi.mdx | 2 +- .../sdks/generators/python/quickstart.mdx | 2 +- .../sdks/generators/ruby/configuration.mdx | 2 +- .../sdks/generators/ruby/quickstart.mdx | 2 +- .../sdks/generators/swift/configuration.mdx | 2 +- .../generators/typescript/configuration.mdx | 8 +- .../generators/typescript/custom-code.mdx | 4 +- .../typescript/dynamic-authentication.mdx | 6 +- .../typescript/publishing-to-npm.mdx | 2 +- .../generators/typescript/serde-layer.mdx | 2 +- .../zh/products/sdks/how-it-works.mdx | 2 +- .../zh/products/sdks/introduction.mdx | 50 +++++----- .../zh/products/sdks/project-structure.mdx | 6 +- .../reference/generators-yml-reference.mdx | 20 ++-- .../zh/snippets/default-version.mdx | 2 +- .../zh/snippets/openapi-specs.mdx | 2 +- 159 files changed, 600 insertions(+), 577 deletions(-) diff --git a/fern/docs.yml b/fern/docs.yml index 0dbe7a493e..14cd8adaa9 100644 --- a/fern/docs.yml +++ b/fern/docs.yml @@ -695,6 +695,8 @@ redirects: destination: /learn/api-definitions/grpc/overview - source: /learn/grpc-definition/:slug* destination: /learn/api-definitions/grpc/:slug* + - source: /learn/api-definitions/protobuf + destination: /learn/api-definitions/grpc/overview # FernDef (specifics before catchall — comparison-with-open-api was shadowed) - source: /learn/api-definition/fern/comparison-with-open-api diff --git a/fern/products/api-def/ferndef/api-yml/global-configuration.mdx b/fern/products/api-def/ferndef/api-yml/global-configuration.mdx index 7d1c1bbef1..3b11febb8e 100644 --- a/fern/products/api-def/ferndef/api-yml/global-configuration.mdx +++ b/fern/products/api-def/ferndef/api-yml/global-configuration.mdx @@ -21,7 +21,7 @@ headers: ``` -When you define global headers in your `api.yml`, you must [include them in your endpoint examples](/api-definitions/ferndef/examples#examples-with-headers). +When you define global headers in your `api.yml`, you must [include them in your endpoint examples](/learn/api-definitions/ferndef/examples#examples-with-headers). ## Global path parameters diff --git a/fern/products/api-def/ferndef/auth.mdx b/fern/products/api-def/ferndef/auth.mdx index 1d1a1e9d5a..add3f91105 100644 --- a/fern/products/api-def/ferndef/auth.mdx +++ b/fern/products/api-def/ferndef/auth.mdx @@ -247,7 +247,7 @@ service: response: TokenResponse ``` -If your OAuth server is hosted at a different URL than your main API, you can use [multi-URL environments](/api-definitions/ferndef/api-yml/environments#multiple-urls-per-environment) to specify separate base URLs for authentication and API calls. +If your OAuth server is hosted at a different URL than your main API, you can use [multi-URL environments](/learn/api-definitions/ferndef/api-yml/environments#multiple-urls-per-environment) to specify separate base URLs for authentication and API calls. With this, all of the OAuth logic happens automatically in the generated SDKs. As long as you configure these settings, your client will automatically retrieve an access token and refresh it as needed. diff --git a/fern/products/api-def/ferndef/endpoints.mdx b/fern/products/api-def/ferndef/endpoints.mdx index 90e4b4df12..52395fc844 100644 --- a/fern/products/api-def/ferndef/endpoints.mdx +++ b/fern/products/api-def/ferndef/endpoints.mdx @@ -33,7 +33,7 @@ Each service defines: ### Section display name -By default, section names in your API Reference come from service file names (e.g., `user.yml` becomes "User"). To override the display name of a section, [use the `section` property in your `docs.yml`](/docs/api-references/customize-api-reference-layout#renaming-sections). +By default, section names in your API Reference come from service file names (e.g., `user.yml` becomes "User"). To override the display name of a section, [use the `section` property in your `docs.yml`](/learn/docs/api-references/customize-api-reference-layout#renaming-sections). ### SDK method names diff --git a/fern/products/api-def/ferndef/examples.mdx b/fern/products/api-def/ferndef/examples.mdx index fe8dca6b72..928c5ad273 100644 --- a/fern/products/api-def/ferndef/examples.mdx +++ b/fern/products/api-def/ferndef/examples.mdx @@ -321,7 +321,7 @@ errors: ### Examples with headers -When you have [global headers defined in your `api.yml`](/api-definitions/ferndef/api-yml/global-headers#global-headers), you must include them in your examples: +When you have [global headers defined in your `api.yml`](/learn/api-definitions/ferndef/api-yml/global-headers#global-headers), you must include them in your examples: ```yml {15-16} service: diff --git a/fern/products/api-def/ferndef/export-openapi.mdx b/fern/products/api-def/ferndef/export-openapi.mdx index 8adae6c3d1..52b3698989 100644 --- a/fern/products/api-def/ferndef/export-openapi.mdx +++ b/fern/products/api-def/ferndef/export-openapi.mdx @@ -7,16 +7,24 @@ noindex: true -To prevent lock-in to the Fern Definition format, you can export your API definition to OpenAPI 3.1 at any time [using the `fern export` command](/cli-api-reference/cli-reference/commands#fern-export). +To prevent lock-in to the Fern Definition format, you can export your API definition to OpenAPI 3.1 at any time [using the `fern export` command](/learn/cli-api-reference/cli-reference/commands#fern-export). -If you have multiple APIs defined in your `fern/apis/` folder, use `--api` to specify which API to export. +The path argument is the **output file** to write. Use a `.yml` or `.json` extension to choose the format of the generated spec. + + +```bash +# Write the exported spec as YAML +fern export path/to/openapi.yml - - ```bash - fern export path/to/openapi.yml - fern export path/to/openapi.json +# ...or as JSON +fern export path/to/openapi.json +``` + + +If you have multiple APIs defined in your `fern/apis/` folder, use `--api` to specify which API to export. - # Specify API to export - fern export --api public-api path/to/openapi.yml - ``` - \ No newline at end of file + +```bash +fern export --api public-api path/to/openapi.yml +``` + \ No newline at end of file diff --git a/fern/products/api-def/ferndef/webhooks.mdx b/fern/products/api-def/ferndef/webhooks.mdx index 8c26059d03..3eda5e8d4f 100644 --- a/fern/products/api-def/ferndef/webhooks.mdx +++ b/fern/products/api-def/ferndef/webhooks.mdx @@ -87,7 +87,7 @@ navigation: - subpackage_api.newPlantWebhook # Format: subpackage_{name-of-api}.{webhook-event-name} ``` -For more information on how to configure your webhook reference in `docs.yml`, see [Generate your webhook reference](/docs/api-references/generate-webhook-ref). +For more information on how to configure your webhook reference in `docs.yml`, see [Generate your webhook reference](/learn/docs/api-references/generate-webhook-ref). ## SDK signature verification diff --git a/fern/products/api-def/grpc/overview.mdx b/fern/products/api-def/grpc/overview.mdx index aa488f9e96..171a4e3834 100644 --- a/fern/products/api-def/grpc/overview.mdx +++ b/fern/products/api-def/grpc/overview.mdx @@ -202,7 +202,7 @@ fern/ ``` -Create a `generators.yml` file in your fern directory and add a reference to your gRPC proto files. See [gRPC generators.yml reference](/api-definitions/grpc/generators-yml-reference) for complete configuration options. +Create a `generators.yml` file in your fern directory and add a reference to your gRPC proto files. See [gRPC generators.yml reference](/learn/api-definitions/grpc/generators-yml-reference) for complete configuration options. ```yaml title="generators.yml" # Your API definition diff --git a/fern/products/api-def/openapi/automation.mdx b/fern/products/api-def/openapi/automation.mdx index 4bc80cf057..12baeaf86f 100644 --- a/fern/products/api-def/openapi/automation.mdx +++ b/fern/products/api-def/openapi/automation.mdx @@ -20,7 +20,7 @@ Automatically pull your latest OpenAPI spec from a publicly available URL into y ``` - Create `.github/workflows/sync-openapi.yml` in your repository. This action uses [`fern api update`](/cli-api-reference/cli-reference/commands#fern-api-update) to pull the latest version of your OpenAPI spec from the `origin` field in your `generators.yml` file. + Create `.github/workflows/sync-openapi.yml` in your repository. This action uses [`fern api update`](/learn/cli-api-reference/cli-reference/commands#fern-api-update) to pull the latest version of your OpenAPI spec from the `origin` field in your `generators.yml` file. ```yml title=".github/workflows/sync-openapi.yml" name: Sync OpenAPI Specs # can be customized diff --git a/fern/products/api-def/openapi/extensions/examples.mdx b/fern/products/api-def/openapi/extensions/examples.mdx index 3f915df5fb..b91794d77d 100644 --- a/fern/products/api-def/openapi/extensions/examples.mdx +++ b/fern/products/api-def/openapi/extensions/examples.mdx @@ -20,7 +20,7 @@ The `request` and `response` values use different shapes: - `response` requires a nested `body` key containing the response body properties. - Examples must include any headers declared with the [`x-fern-global-headers` extension](/api-definitions/openapi/extensions/global-headers). Place them under `headers` alongside `path-parameters` and `request`. + Examples must include any headers declared with the [`x-fern-global-headers` extension](/learn/api-definitions/openapi/extensions/global-headers). Place them under `headers` alongside `path-parameters` and `request`. An endpoint with path parameters: diff --git a/fern/products/api-def/openapi/extensions/global-headers.mdx b/fern/products/api-def/openapi/extensions/global-headers.mdx index d684a1b423..8871edb6a3 100644 --- a/fern/products/api-def/openapi/extensions/global-headers.mdx +++ b/fern/products/api-def/openapi/extensions/global-headers.mdx @@ -30,7 +30,7 @@ x-fern-global-headers: ``` - When you define global headers using `x-fern-global-headers`, you must [include them in your `x-fern-examples`](/api-definitions/openapi/extensions/request-response-examples). + When you define global headers using `x-fern-global-headers`, you must [include them in your `x-fern-examples`](/learn/api-definitions/openapi/extensions/request-response-examples). ### Default values diff --git a/fern/products/api-def/openapi/overview.mdx b/fern/products/api-def/openapi/overview.mdx index 880fdbe6c9..7632d02cae 100644 --- a/fern/products/api-def/openapi/overview.mdx +++ b/fern/products/api-def/openapi/overview.mdx @@ -106,8 +106,8 @@ components: Follow these best practices to ensure your OpenAPI specification generates high-quality SDKs and documentation: -- **Organize with proper project structure.** Follow the instructions at [Project structure](/api-definitions/overview/project-structure) to clearly organize the directories that contain your definition and other related files. -- **Add `operationId` to endpoints.** Include a clear `operationId` for each endpoint to control the function names generated in your SDKs. (Or use [extensions to customize group and method names](/api-definitions/openapi/extensions/method-names).) +- **Organize with proper project structure.** Follow the instructions at [Project structure](/learn/api-definitions/overview/project-structure) to clearly organize the directories that contain your definition and other related files. +- **Add `operationId` to endpoints.** Include a clear `operationId` for each endpoint to control the function names generated in your SDKs. (Or use [extensions to customize group and method names](/learn/api-definitions/openapi/extensions/method-names).) - **Reference schemas instead of inlining.** Define reusable schemas in the `components/schemas` section and reference them with `$ref`. This promotes consistency, reduces duplication, and makes maintenance easier. ```yaml title="openapi.yml" {8, 14, 17-25} @@ -137,7 +137,7 @@ Follow these best practices to ensure your OpenAPI specification generates high- enum: [available, pending, sold] ``` -- **Use overlays and Fern extensions for customization.** Customize your specification using Fern [extensions](/api-definitions/openapi/extensions/overview) housed in an [overlay file](/api-definitions/openapi/overlays). This lets you modify generation behavior without changing your core OpenAPI definition. +- **Use overlays and Fern extensions for customization.** Customize your specification using Fern [extensions](/learn/api-definitions/openapi/extensions/overview) housed in an [overlay file](/learn/api-definitions/openapi/overlays). This lets you modify generation behavior without changing your core OpenAPI definition. Once your OpenAPI spec follows these practices, you're ready to set up your fern folder. diff --git a/fern/products/api-def/openapi/webhooks.mdx b/fern/products/api-def/openapi/webhooks.mdx index 2aef5ec0d3..a874ce9d5c 100644 --- a/fern/products/api-def/openapi/webhooks.mdx +++ b/fern/products/api-def/openapi/webhooks.mdx @@ -124,7 +124,7 @@ navigation: - subpackage_plants.newPlantWebhook # subpackage_{tag}.{webhook-event-name} ``` -For more information on how to configure your webhook reference in `docs.yml`, see [Generate your webhook reference](/docs/api-references/generate-webhook-ref). +For more information on how to configure your webhook reference in `docs.yml`, see [Generate your webhook reference](/learn/docs/api-references/generate-webhook-ref). ## SDK signature verification diff --git a/fern/products/api-def/pages/asyncapi-empty.mdx b/fern/products/api-def/pages/asyncapi-empty.mdx index a56ad602d3..0ad721d94d 100644 --- a/fern/products/api-def/pages/asyncapi-empty.mdx +++ b/fern/products/api-def/pages/asyncapi-empty.mdx @@ -4,4 +4,4 @@ description: This is an empty page used to redirect to the AsyncAPI Definition p --- -This page is empty. Please visit the [AsyncAPI Definition](/api-definitions/asyncapi/overview) page for more information. \ No newline at end of file +This page is empty. Please visit the [AsyncAPI Definition](/learn/api-definitions/asyncapi/overview) page for more information. \ No newline at end of file diff --git a/fern/products/api-def/pages/ferndef-empty.mdx b/fern/products/api-def/pages/ferndef-empty.mdx index 64df46958e..caa4042a40 100644 --- a/fern/products/api-def/pages/ferndef-empty.mdx +++ b/fern/products/api-def/pages/ferndef-empty.mdx @@ -4,4 +4,4 @@ description: This is an empty page used to redirect to the Fern Definition pages --- -This page is empty. Please visit the [Fern Definition](/api-definitions/ferndef/overview) page for more information. \ No newline at end of file +This page is empty. Please visit the [Fern Definition](/learn/api-definitions/ferndef/overview) page for more information. \ No newline at end of file diff --git a/fern/products/api-def/pages/grpc-empty.mdx b/fern/products/api-def/pages/grpc-empty.mdx index 9b946b7524..2a6e15c06c 100644 --- a/fern/products/api-def/pages/grpc-empty.mdx +++ b/fern/products/api-def/pages/grpc-empty.mdx @@ -4,4 +4,4 @@ description: This is an empty page used to redirect to the gRPC Definition pages --- -This page is empty. Please visit the [gRPC Definition](/api-definitions/grpc/overview) page for more information. \ No newline at end of file +This page is empty. Please visit the [gRPC Definition](/learn/api-definitions/grpc/overview) page for more information. \ No newline at end of file diff --git a/fern/products/api-def/pages/openapi-empty.mdx b/fern/products/api-def/pages/openapi-empty.mdx index a943a88052..444f611d3a 100644 --- a/fern/products/api-def/pages/openapi-empty.mdx +++ b/fern/products/api-def/pages/openapi-empty.mdx @@ -4,4 +4,4 @@ description: This is an empty page used to redirect to the OpenAPI Definition pa --- -This page is empty. Please visit the [OpenAPI Definition](/api-definitions/openapi/overview) page for more information. \ No newline at end of file +This page is empty. Please visit the [OpenAPI Definition](/learn/api-definitions/openapi/overview) page for more information. \ No newline at end of file diff --git a/fern/products/api-def/pages/openrpc-empty.mdx b/fern/products/api-def/pages/openrpc-empty.mdx index b89f574008..d286131e06 100644 --- a/fern/products/api-def/pages/openrpc-empty.mdx +++ b/fern/products/api-def/pages/openrpc-empty.mdx @@ -4,4 +4,4 @@ description: This is an empty page used to redirect to the OpenRPC Definition pa --- -This page is empty. Please visit the [OpenRPC Definition](/api-definitions/openrpc/overview) page for more information. \ No newline at end of file +This page is empty. Please visit the [OpenRPC Definition](/learn/api-definitions/openrpc/overview) page for more information. \ No newline at end of file diff --git a/fern/products/api-def/pages/overrides.mdx b/fern/products/api-def/pages/overrides.mdx index 47d7cd0cba..c42e98ffb9 100644 --- a/fern/products/api-def/pages/overrides.mdx +++ b/fern/products/api-def/pages/overrides.mdx @@ -22,7 +22,7 @@ Overrides are available for OpenAPI, AsyncAPI, and OpenRPC specifications. -[Create an `overrides.yml` file](/cli-api-reference/cli-reference/commands#fern-write-overrides) in the folder that contains your API definition: +[Create an `overrides.yml` file](/learn/cli-api-reference/cli-reference/commands#fern-write-overrides) in the folder that contains your API definition: ```bash {6} fern/ diff --git a/fern/products/api-def/pages/project-structure.mdx b/fern/products/api-def/pages/project-structure.mdx index 69e9f78b9c..59bf19e4b2 100644 --- a/fern/products/api-def/pages/project-structure.mdx +++ b/fern/products/api-def/pages/project-structure.mdx @@ -7,7 +7,7 @@ description: Describes the Fern folder structure Configuring fern starts with the `fern` folder, which contains your API definitions, SDK generators, and your CLI version. -Fern recommends a multi-repository structure with your fern folder in a source repository (containing your API definitions and generation configuration) and [each generated SDK in its own separate repository](/sdks/overview/project-structure). +Fern recommends a multi-repository structure with your fern folder in a source repository (containing your API definitions and generation configuration) and [each generated SDK in its own separate repository](/learn/sdks/overview/project-structure). ## Directory structure @@ -41,7 +41,7 @@ The `fern.config.json` file stores your organization name and the Fern CLI versi ``` - When working with a locally installed CLI, set `version` to `"*"`. See [Install Fern CLI locally](/cli-api-reference/cli-reference/overview#install-fern-cli-locally) for details. + When working with a locally installed CLI, set `version` to `"*"`. See [Install Fern CLI locally](/learn/cli-api-reference/cli-reference/overview#install-fern-cli-locally) for details. ### `generators.yml` @@ -54,18 +54,18 @@ api: - openapi: ./openapi/openapi.yml ``` -For SDK generation, `generators.yml` is required. Add a `groups` section to configure which SDKs to generate. See the [SDKs project structure](/sdks/overview/project-structure#generatorsyml) for details. +For SDK generation, `generators.yml` is required. Add a `groups` section to configure which SDKs to generate. See the [SDKs project structure](/learn/sdks/overview/project-structure#generatorsyml) for details. ### API definition file -For [OpenAPI](/api-definitions/openapi/overview), [AsyncAPI](/api-definitions/asyncapi/overview), [OpenRPC](/api-definitions/openrpc/overview), and [gRPC](/api-definitions/grpc/overview), you'll have a single self-contained specification file. +For [OpenAPI](/learn/api-definitions/openapi/overview), [AsyncAPI](/learn/api-definitions/asyncapi/overview), [OpenRPC](/learn/api-definitions/openrpc/overview), and [gRPC](/learn/api-definitions/grpc/overview), you'll have a single self-contained specification file. ## Where to store your API definition There are four common ways to manage your API definition: - **Commit directly into your Fern repository (recommended).** Check your API definition file into the same repository that contains your Fern configuration. This is the simplest approach if you don't maintain the definition elsewhere. -- **Sync from a source code repository.** Store your API definition in the same repo as your API source code and sync updates into your Fern repository. You can automate this with the [`fern api update`](/cli-api-reference/cli-reference/commands#fern-api-update) CLI command or the [sync-openapi GitHub Action](/learn/api-definitions/openapi/sync-your-open-api-specification). +- **Sync from a source code repository.** Store your API definition in the same repo as your API source code and sync updates into your Fern repository. You can automate this with the [`fern api update`](/learn/cli-api-reference/cli-reference/commands#fern-api-update) CLI command or the [sync-openapi GitHub Action](/learn/api-definitions/openapi/sync-your-open-api-specification). - **Host at a public URL.** Serve the definition from a publicly accessible endpoint and configure the [`origin`](/learn/sdks/reference/generators-yml#openapi) field in `generators.yml` so Fern can fetch it. This is useful when you want a single canonical definition that multiple consumers can reference. - **Reference from a remote git repository.** Point [`openapi`](/learn/sdks/reference/generators-yml#openapi), [`asyncapi`](/learn/sdks/reference/generators-yml#asyncapi), or proto [`root`](/learn/sdks/reference/generators-yml#root) to a file in an external git repository using the `git` sub-object. The CLI shallow-clones the repository at generation time, using your local git credential configuration. This is useful when spec files live in a private repo you don't want to copy. diff --git a/fern/products/api-def/pages/what-is-an-api-definition.mdx b/fern/products/api-def/pages/what-is-an-api-definition.mdx index b150b025b1..184d49719a 100644 --- a/fern/products/api-def/pages/what-is-an-api-definition.mdx +++ b/fern/products/api-def/pages/what-is-an-api-definition.mdx @@ -273,28 +273,28 @@ you can regenerate these artifacts to ensure they are always up-to-date. Client libraries in multiple languages that automatically stay in sync with your API. Interactive API docs with code examples and live testing capabilities. } - href="/docs/integrations/postman" + href="/learn/docs/integrations/postman" > Ready-to-use collection with pre-filled example requests and responses. } - href="/api-definitions/openapi/frameworks/fastapi" + href="/learn/api-definitions/openapi/frameworks/fastapi" > Pydantic models for FastAPI or controllers for your Spring Boot application. diff --git a/fern/products/cli-api-reference/pages/commands.mdx b/fern/products/cli-api-reference/pages/commands.mdx index fca845fbb4..be13bd1b3d 100644 --- a/fern/products/cli-api-reference/pages/commands.mdx +++ b/fern/products/cli-api-reference/pages/commands.mdx @@ -155,10 +155,14 @@ hideOnThisPage: true Use `fern export` to generate an OpenAPI spec for your API. This is useful when you've defined your API in a format other than OpenAPI (such as the [Fern Definition](/learn/api-definitions/ferndef/overview)) and need to export it for integration with other tools or services. + The path argument is the **output file** to write. Use a `.yml` or `.json` extension to choose the format of the generated spec. ```bash + # Write the exported spec as YAML fern export [--api ] path/to/openapi.yml + + # ...or as JSON fern export [--api ] path/to/openapi.json ``` @@ -167,10 +171,19 @@ hideOnThisPage: true Use `--api` to specify which API to export when you have multiple APIs defined in your `fern/apis/` folder. - + ```bash fern export --api public-api path/to/openapi.yml - fern export --api public-api path/to/openapi.json + ``` + + + ### indent + + Use `--indent` to set the indentation size, in spaces, of the generated spec. + + + ```bash + fern export --indent 4 path/to/openapi.yml ``` @@ -1037,7 +1050,7 @@ hideOnThisPage: true Pulls the latest OpenAPI spec from the specified `origin` in `generators.yml` and - updates the local spec. Alternatively, you can [automate this process by setting up a GitHub Action](/api-definitions/openapi/sync-your-open-api-specification). + updates the local spec. Alternatively, you can [automate this process by setting up a GitHub Action](/learn/api-definitions/openapi/sync-your-open-api-specification). ```bash diff --git a/fern/products/docs/pages/api-references/customize-api-ref.mdx b/fern/products/docs/pages/api-references/customize-api-ref.mdx index 8d646b99fc..1384e11034 100644 --- a/fern/products/docs/pages/api-references/customize-api-ref.mdx +++ b/fern/products/docs/pages/api-references/customize-api-ref.mdx @@ -123,7 +123,7 @@ navigation: ``` - You can alternatively customize tag display names directly in your spec (or overlays file) using the [`x-displayName` extension](/api-definitions/openapi/extensions/tag-display-names). + You can alternatively customize tag display names directly in your spec (or overlays file) using the [`x-displayName` extension](/learn/api-definitions/openapi/extensions/tag-display-names). ### Flattening sections diff --git a/fern/products/docs/pages/api-references/http-snippets.mdx b/fern/products/docs/pages/api-references/http-snippets.mdx index 517091f673..52188d4a9a 100644 --- a/fern/products/docs/pages/api-references/http-snippets.mdx +++ b/fern/products/docs/pages/api-references/http-snippets.mdx @@ -67,4 +67,4 @@ settings: ``` -This removes all HTTP snippet languages except cURL from the selector. cURL is always displayed and can't be removed via `docs.yml` configuration. To hide cURL, [use custom CSS](/docs/customization/custom-css-js#custom-css). +This removes all HTTP snippet languages except cURL from the selector. cURL is always displayed and can't be removed via `docs.yml` configuration. To hide cURL, [use custom CSS](/learn/docs/customization/custom-css-js#custom-css). diff --git a/fern/products/docs/pages/component-library/default-components/badges.mdx b/fern/products/docs/pages/component-library/default-components/badges.mdx index 2cf3a3ae45..7486b0b9c6 100644 --- a/fern/products/docs/pages/component-library/default-components/badges.mdx +++ b/fern/products/docs/pages/component-library/default-components/badges.mdx @@ -4,7 +4,7 @@ description: Display small labels for status, versions, and metadata inline with --- -Use the `` component to display small pieces of information, such as status indicators, categories, versions, or release dates. To display longer notes, use [callouts](/docs/writing-content/components/callouts). +Use the `` component to display small pieces of information, such as status indicators, categories, versions, or release dates. To display longer notes, use [callouts](/learn/docs/writing-content/components/callouts). ## Usage diff --git a/fern/products/docs/pages/component-library/default-components/callouts.mdx b/fern/products/docs/pages/component-library/default-components/callouts.mdx index b4a91f0103..490a6b1f4e 100644 --- a/fern/products/docs/pages/component-library/default-components/callouts.mdx +++ b/fern/products/docs/pages/component-library/default-components/callouts.mdx @@ -6,7 +6,7 @@ description: Learn how to use the Callout component to add warnings, tips, notes The `` component highlights important information, warnings, or tips in your documentation. Use callouts to emphasize critical details that readers shouldn't miss, such as breaking changes, prerequisites, or helpful best practices. -To display very short pieces of information like status indicators and version numbers, use [badges](/docs/writing-content/components/badges). +To display very short pieces of information like status indicators and version numbers, use [badges](/learn/docs/writing-content/components/badges). ## Usage diff --git a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx index 7c3c3cfa07..443643e807 100644 --- a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx +++ b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx @@ -548,7 +548,7 @@ Code blocks with the [same language](#supported-languages) automatically synchro - Code blocks automatically synchronize with [tabs in that same language](/docs/writing-content/components/tabs#language-synchronization). + Code blocks automatically synchronize with [tabs in that same language](/learn/docs/writing-content/components/tabs#language-synchronization). diff --git a/fern/products/docs/pages/component-library/default-components/files.mdx b/fern/products/docs/pages/component-library/default-components/files.mdx index 59992570b2..2b47bcd924 100644 --- a/fern/products/docs/pages/component-library/default-components/files.mdx +++ b/fern/products/docs/pages/component-library/default-components/files.mdx @@ -101,10 +101,10 @@ Add the `href` property to make files or folders clickable. This is useful for l
- - - - + + + + diff --git a/fern/products/docs/pages/component-library/default-components/overview.mdx b/fern/products/docs/pages/component-library/default-components/overview.mdx index 99e21bca62..9940f7068a 100644 --- a/fern/products/docs/pages/component-library/default-components/overview.mdx +++ b/fern/products/docs/pages/component-library/default-components/overview.mdx @@ -10,84 +10,84 @@ Fern includes 27 built-in components for creating interactive documentation. Sel Expandable sections for FAQs and collapsible content Linkable anchors for paragraphs, tables, and other content Sticky container for content positioned to the right of the page Small labels for status, versions, and metadata Interactive button component with multiple variants and intents Highlighted boxes for important information, warnings, and tips Visually distinct box with optional icons and links Code examples with syntax highlighting and interactive features Make text copyable with a click-to-copy button Download PDFs and other assets Endpoint request snippets from your API Reference Endpoint response snippets from your API Reference @@ -101,98 +101,98 @@ Fern includes 27 built-in components for creating interactive documentation. Sel Display interactive file tree structures with expandable folders Container for images with optional captions and backgrounds Font Awesome icons for visual elements Show or hide content based on instance, product, version, or user role Visual hierarchy with indentation and guide lines for nested content API parameter documentation with consistent formatting Copyable AI prompts that open in Cursor, Claude, or ChatGPT Interactive request builder for testing API endpoints Display any type definition from your API Reference Sequenced instructions with automatic numbering and anchor links Display data in rows and columns with optional sticky headers Tabbed interface for organizing related content Additional information displayed on hover Display different content based on version selection diff --git a/fern/products/docs/pages/component-library/default-components/tabs.mdx b/fern/products/docs/pages/component-library/default-components/tabs.mdx index a3036b5673..d09eb03830 100644 --- a/fern/products/docs/pages/component-library/default-components/tabs.mdx +++ b/fern/products/docs/pages/component-library/default-components/tabs.mdx @@ -107,7 +107,7 @@ Tabs with the [same language](/learn/docs/writing-content/components/code-blocks - Language-enabled tabs automatically synchronize with [code blocks in that same language](/docs/writing-content/components/code-blocks#language-synchronization). + Language-enabled tabs automatically synchronize with [code blocks in that same language](/learn/docs/writing-content/components/code-blocks#language-synchronization). diff --git a/fern/products/docs/pages/customization/announcement-banner.mdx b/fern/products/docs/pages/customization/announcement-banner.mdx index c0d1d15b62..f0a620bb0d 100644 --- a/fern/products/docs/pages/customization/announcement-banner.mdx +++ b/fern/products/docs/pages/customization/announcement-banner.mdx @@ -18,7 +18,7 @@ announcement: message: "🚀 New feature: Announcements are available! (Learn more) 🚀" ``` -The announcement message supports Markdown and HTML. You can include links, images, and other formatting, including [custom CSS](/docs/customization/custom-css-js#custom-css). +The announcement message supports Markdown and HTML. You can include links, images, and other formatting, including [custom CSS](/learn/docs/customization/custom-css-js#custom-css). ## Configuring announcements at multiple levels diff --git a/fern/products/docs/pages/customization/custom-css-js.mdx b/fern/products/docs/pages/customization/custom-css-js.mdx index 1b9f1ef665..12b69150f2 100644 --- a/fern/products/docs/pages/customization/custom-css-js.mdx +++ b/fern/products/docs/pages/customization/custom-css-js.mdx @@ -12,7 +12,7 @@ This page covers CSS and JavaScript customization: For server-rendered reusable elements in your MDX content, see [Custom React components](/learn/docs/customization/custom-react-components). To replace Fern's default header or footer, see [Custom header and footer](/learn/docs/customization/header-and-footer). -You can also [customize many things directly in your `docs.yml` file](/docs/configuration/site-level-settings), including colors, typography, navbar links, layout, analytics, and metadata. Try these built-in options first before adding custom code. +You can also [customize many things directly in your `docs.yml` file](/learn/docs/configuration/site-level-settings), including colors, typography, navbar links, layout, analytics, and metadata. Try these built-in options first before adding custom code. ## Custom CSS @@ -426,7 +426,7 @@ js: ### Common use cases - **Third-party integrations:** For tools not natively supported in `docs.yml`, add analytics, session recording, support widgets, or tag managers by pasting their embed snippets into your custom JS file. See [Integrating third-party tools](/learn/docs/integrations/overview#connect-other-integrations-via-custom-javascript) for supported tools and examples. -- **Custom search:** Implement custom search (also requires [your Algolia credentials](/docs/customization/search)) +- **Custom search:** Implement custom search (also requires [your Algolia credentials](/learn/docs/customization/search)) - **Scripts and widgets:** Insert any client-side scripts or embeddable widgets \ No newline at end of file diff --git a/fern/products/docs/pages/customization/custom-header-footer.mdx b/fern/products/docs/pages/customization/custom-header-footer.mdx index eb79723db2..0ddd648725 100644 --- a/fern/products/docs/pages/customization/custom-header-footer.mdx +++ b/fern/products/docs/pages/customization/custom-header-footer.mdx @@ -94,14 +94,14 @@ The following components are available on the `Fern` prop: | Component | Description | | --- | --- | -| `` | Your site [logo](/docs/configuration/site-level-settings#logo-configuration) as configured in `docs.yml`. Links to the homepage. You can target this component with `document.querySelector('#fern-header [data-fern-logo]')`. | -| `` | The [search](/docs/customization/search) bar, including the AI search trigger if enabled. | -| `` | Dropdown to switch between [products](/docs/configuration/products). | -| `` | Dropdown to switch between [versions](/docs/configuration/versions). | -| `` | Dropdown to switch the active [SDK language](/docs/configuration/site-level-settings#default-language). | -| `` | The [navigation links](/docs/configuration/site-level-settings#navbar-links-configuration) configured under `navbar-links` in `docs.yml`. | -| `` | The login/signup button for [authenticated docs](/docs/authentication/overview). | -| `` | Toggle between [light and dark mode](/docs/configuration/site-level-settings#theme-configuration). | +| `` | Your site [logo](/learn/docs/configuration/site-level-settings#logo-configuration) as configured in `docs.yml`. Links to the homepage. You can target this component with `document.querySelector('#fern-header [data-fern-logo]')`. | +| `` | The [search](/learn/docs/customization/search) bar, including the AI search trigger if enabled. | +| `` | Dropdown to switch between [products](/learn/docs/configuration/products). | +| `` | Dropdown to switch between [versions](/learn/docs/configuration/versions). | +| `` | Dropdown to switch the active [SDK language](/learn/docs/configuration/site-level-settings#default-language). | +| `` | The [navigation links](/learn/docs/configuration/site-level-settings#navbar-links-configuration) configured under `navbar-links` in `docs.yml`. | +| `` | The login/signup button for [authenticated docs](/learn/docs/authentication/overview). | +| `` | Toggle between [light and dark mode](/learn/docs/configuration/site-level-settings#theme-configuration). | | `` | Fern's built-in mobile sidebar toggle button. Shows a hamburger/close icon and opens the dismissible sidebar. Only visible on mobile viewports. | diff --git a/fern/products/docs/pages/getting-started/overview.mdx b/fern/products/docs/pages/getting-started/overview.mdx index fa32d48a66..9959d7b301 100644 --- a/fern/products/docs/pages/getting-started/overview.mdx +++ b/fern/products/docs/pages/getting-started/overview.mdx @@ -16,7 +16,7 @@ subtitle: Build beautiful, interactive documentation websites with Fern Docs. Cr

Build a docs site quickly by importing your existing styling and specs.

- +
Quickstart @@ -33,7 +33,7 @@ subtitle: Build beautiful, interactive documentation websites with Fern Docs. Cr
- +
Configure with ease @@ -55,7 +55,7 @@ subtitle: Build beautiful, interactive documentation websites with Fern Docs. Cr

Build your own components, enable Ask Fern, generate API references, and easily update your docs.

-
+
Flexible component library @@ -72,7 +72,7 @@ subtitle: Build beautiful, interactive documentation websites with Fern Docs. Cr
- +
Fern Editor @@ -89,7 +89,7 @@ subtitle: Build beautiful, interactive documentation websites with Fern Docs. Cr
- +
API Specs @@ -106,7 +106,7 @@ subtitle: Build beautiful, interactive documentation websites with Fern Docs. Cr
- +
AI features @@ -123,7 +123,7 @@ subtitle: Build beautiful, interactive documentation websites with Fern Docs. Cr
- +
Self-host your docs @@ -149,16 +149,16 @@ subtitle: Build beautiful, interactive documentation websites with Fern Docs. Cr Build a docs site by importing your existing styling and specs. -- [Quickstart](/docs/getting-started/quickstart): Set up a documentation site in under 5 minutes. -- [Configure with ease](/docs/configuration/site-level-settings): Use one simple file to generate documentation that fits your brand. +- [Quickstart](/learn/docs/getting-started/quickstart): Set up a documentation site in under 5 minutes. +- [Configure with ease](/learn/docs/configuration/site-level-settings): Use one simple file to generate documentation that fits your brand. ## Features Build your own components, enable Ask Fern, generate API references, and update your docs. -- [Flexible component library](/docs/writing-content/components/overview): Use pre-built or custom React components for a polished look. -- [Fern Editor](/docs/writing-content/fern-editor): Modify your documentation without touching code and publish to your GitHub. -- [Bring your own API spec](/docs/api-references/generate-api-ref): Use OpenAPI, AsyncAPI, gRPC, OpenRPC, and the Fern spec. -- [AI features](/docs/ai-features/overview): AI-native features including Ask Fern and AI-generated examples. -- [Self-host your docs](/docs/self-hosted/overview): Deploy on your own infrastructure to meet security or compliance requirements. +- [Flexible component library](/learn/docs/writing-content/components/overview): Use pre-built or custom React components for a polished look. +- [Fern Editor](/learn/docs/writing-content/fern-editor): Modify your documentation without touching code and publish to your GitHub. +- [Bring your own API spec](/learn/docs/api-references/generate-api-ref): Use OpenAPI, AsyncAPI, gRPC, OpenRPC, and the Fern spec. +- [AI features](/learn/docs/ai-features/overview): AI-native features including Ask Fern and AI-generated examples. +- [Self-host your docs](/learn/docs/self-hosted/overview): Deploy on your own infrastructure to meet security or compliance requirements. diff --git a/fern/products/docs/pages/getting-started/project-structure.mdx b/fern/products/docs/pages/getting-started/project-structure.mdx index 315611be89..0f99c28af0 100644 --- a/fern/products/docs/pages/getting-started/project-structure.mdx +++ b/fern/products/docs/pages/getting-started/project-structure.mdx @@ -65,7 +65,7 @@ The `docs.yml` file is the heart of your Fern documentation site. This configura Fern treats `.yml` and `.yaml` extensions identically. This applies to all YAML files in a Fern project, including `docs.yml`, `generators.yml`, and API specification files. -For complete configuration options, see the [`docs.yml` reference](/docs/configuration/site-level-settings). +For complete configuration options, see the [`docs.yml` reference](/learn/docs/configuration/site-level-settings). ```yml @@ -123,9 +123,9 @@ css: styles.css ## API definitions and `generators.yml` -To generate [API Reference](/docs/api-references/generate-api-ref) documentation, you need to provide your API definition. OpenAPI and AsyncAPI specs require a `generators.yml` file with an `api.specs` section. You can optionally add a `groups` section for SDK generation. +To generate [API Reference](/learn/docs/api-references/generate-api-ref) documentation, you need to provide your API definition. OpenAPI and AsyncAPI specs require a `generators.yml` file with an `api.specs` section. You can optionally add a `groups` section for SDK generation. -Using Fern for both API Reference docs and SDKs? You'll use `docs.yml` for your documentation settings and `generators.yml` to configure [SDK code snippets](/docs/api-references/sdk-snippets) in your API Reference. +Using Fern for both API Reference docs and SDKs? You'll use `docs.yml` for your documentation settings and `generators.yml` to configure [SDK code snippets](/learn/docs/api-references/sdk-snippets) in your API Reference. @@ -191,7 +191,7 @@ The `fern.config.json` file stores your organization name and the Fern CLI versi ``` - When working with a locally installed CLI, set `version` to `"*"`. See [Install Fern CLI locally](/cli-api-reference/cli-reference/overview#install-fern-cli-locally) for details. + When working with a locally installed CLI, set `version` to `"*"`. See [Install Fern CLI locally](/learn/cli-api-reference/cli-reference/overview#install-fern-cli-locally) for details. diff --git a/fern/products/docs/pages/getting-started/quickstart.mdx b/fern/products/docs/pages/getting-started/quickstart.mdx index d547889507..4f7a52847b 100644 --- a/fern/products/docs/pages/getting-started/quickstart.mdx +++ b/fern/products/docs/pages/getting-started/quickstart.mdx @@ -237,7 +237,7 @@ Build and publish a docs site with Fern. Follow the [Docs quickstart](https://bu - Before publishing, [preview your changes](/docs/preview-publish/preview-changes) in your local development environment or generate shareable preview links. + Before publishing, [preview your changes](/learn/docs/preview-publish/preview-changes) in your local development environment or generate shareable preview links. diff --git a/fern/products/docs/pages/integrations/overview.mdx b/fern/products/docs/pages/integrations/overview.mdx index 7cd3d03a16..1a6f74fdd6 100644 --- a/fern/products/docs/pages/integrations/overview.mdx +++ b/fern/products/docs/pages/integrations/overview.mdx @@ -13,7 +13,7 @@ Fern's [built-in web analytics](/learn/dashboard/metrics/web-analytics) reports } iconSize={12} @@ -21,7 +21,7 @@ Fern's [built-in web analytics](/learn/dashboard/metrics/web-analytics) reports } iconSize={12} @@ -29,7 +29,7 @@ Fern's [built-in web analytics](/learn/dashboard/metrics/web-analytics) reports @@ -39,7 +39,7 @@ Fern's [built-in web analytics](/learn/dashboard/metrics/web-analytics) reports } iconSize={12} @@ -53,7 +53,7 @@ Fern's [built-in web analytics](/learn/dashboard/metrics/web-analytics) reports } iconSize={12} @@ -61,7 +61,7 @@ Fern's [built-in web analytics](/learn/dashboard/metrics/web-analytics) reports } iconSize={12} @@ -75,7 +75,7 @@ Fern's [built-in web analytics](/learn/dashboard/metrics/web-analytics) reports } iconSize={12} @@ -83,7 +83,7 @@ Fern's [built-in web analytics](/learn/dashboard/metrics/web-analytics) reports } iconSize={12} @@ -133,7 +133,7 @@ If you use GitHub Workflows to trigger docs generation, the environment variable -You can integrate third-party tools that Fern doesn't natively support in `docs.yml` using [custom JavaScript](/docs/customization/custom-css-js#custom-javascript), as long as they support HTML tag-based installation. This works with tools like: +You can integrate third-party tools that Fern doesn't natively support in `docs.yml` using [custom JavaScript](/learn/docs/customization/custom-css-js#custom-javascript), as long as they support HTML tag-based installation. This works with tools like: - **Analytics:** Amplitude, Heap, Plausible - **Session recording:** Hotjar, LogRocket, Microsoft Clarity diff --git a/fern/products/docs/pages/navigation/frontmatter.mdx b/fern/products/docs/pages/navigation/frontmatter.mdx index 08393ddee7..d46d355fa5 100644 --- a/fern/products/docs/pages/navigation/frontmatter.mdx +++ b/fern/products/docs/pages/navigation/frontmatter.mdx @@ -8,7 +8,7 @@ description: Use frontmatter to set a variety of page properties and metadata. You can optionally use frontmatter to set each page's title, slug override, meta description, a URL to suggest edits to the page, and its OpenGraph image. You can also use frontmatter to disable certain page elements like the table of contents, on-page feedback, and page actions. - For advanced styling and functionality customizations beyond frontmatter options, see [custom CSS and JavaScript](/docs/customization/custom-css-js). + For advanced styling and functionality customizations beyond frontmatter options, see [custom CSS and JavaScript](/learn/docs/customization/custom-css-js). ## Frontmatter syntax @@ -378,7 +378,7 @@ This is useful when you want to set availability for individual pages without mo ## Changelog tags - For [changelog pages](/docs/configuration/changelogs) only. Tags allow users to filter changelog entries by specific categories. Define tags as an array of strings in the frontmatter. + For [changelog pages](/learn/docs/configuration/changelogs) only. Tags allow users to filter changelog entries by specific categories. Define tags as an array of strings in the frontmatter. diff --git a/fern/products/docs/pages/navigation/products.mdx b/fern/products/docs/pages/navigation/products.mdx index 958795c3dd..a0efbb61a0 100644 --- a/fern/products/docs/pages/navigation/products.mdx +++ b/fern/products/docs/pages/navigation/products.mdx @@ -274,7 +274,7 @@ If your product-specific `.yml` files for **versioned products** includes a `nav ### Add instance audiences -Control which versions and/or products appear in each [documentation instance](/docs/configuration/site-level-settings#instances-configuration) by tagging them with audiences. This enables separate sites for different user groups (e.g., internal developers, beta testers, public customers). +Control which versions and/or products appear in each [documentation instance](/learn/docs/configuration/site-level-settings#instances-configuration) by tagging them with audiences. This enables separate sites for different user groups (e.g., internal developers, beta testers, public customers). Content is filtered based on audience tags: @@ -317,7 +317,7 @@ products: -Instance audiences work alongside [API Reference audiences](/docs/api-references/audiences), which filter endpoints and schemas within your API documentation. You can use both features together: +Instance audiences work alongside [API Reference audiences](/learn/docs/api-references/audiences), which filter endpoints and schemas within your API documentation. You can use both features together: - **Instance audiences** - Control which products and versions appear in each instance - **API Reference audiences** - Control which endpoints and schemas appear within API References diff --git a/fern/products/docs/pages/navigation/site-level-settings.mdx b/fern/products/docs/pages/navigation/site-level-settings.mdx index ba8cc5d34a..ee8b0c0721 100644 --- a/fern/products/docs/pages/navigation/site-level-settings.mdx +++ b/fern/products/docs/pages/navigation/site-level-settings.mdx @@ -6,7 +6,7 @@ max-toc-depth: 2 --- -The `docs.yml` file is your primary tool for customizing colors, typography, layout, analytics, and more across your documentation site. Start here for most customization needs before considering [custom CSS and JavaScript](/docs/customization/custom-css-js) for advanced use cases. +The `docs.yml` file is your primary tool for customizing colors, typography, layout, analytics, and more across your documentation site. Start here for most customization needs before considering [custom CSS and JavaScript](/learn/docs/customization/custom-css-js) for advanced use cases. ### YAML Schema Validation @@ -155,7 +155,7 @@ instances: Specify which audiences this instance serves (e.g., internal developers, beta testers, public customers). - You can use audiences to control which versions and products appear in each documentation instance, enabling you to create separate sites for different user groups. Content is included when its audience tag matches the instance audience. Content without an audience tag is included by default. Learn more about configuring instance audiences for [products and/or versions](/docs/configuration/products#add-instance-audiences). + You can use audiences to control which versions and products appear in each documentation instance, enabling you to create separate sites for different user groups. Content is included when its audience tag matches the instance audience. Content without an audience tag is included by default. Learn more about configuring instance audiences for [products and/or versions](/learn/docs/configuration/products#add-instance-audiences). @@ -779,7 +779,7 @@ settings: - Controls the display of [HTTP snippets in the API Reference](/docs/api-references/http-snippets). HTTP snippets are enabled by default for all languages. + Controls the display of [HTTP snippets in the API Reference](/learn/docs/api-references/http-snippets). HTTP snippets are enabled by default for all languages. - Set to `false` to disable HTTP snippets completely - Provide a list of languages to enable snippets for specific languages only @@ -1048,7 +1048,7 @@ landing-page: Configure site-wide Open Graph and Twitter Card metadata to control how your documentation appears in social media previews and search results. - [Use the `keywords` property in a page's frontmatter](/docs/configuration/page-level-settings#seo-metadata). + [Use the `keywords` property in a page's frontmatter](/learn/docs/configuration/page-level-settings#seo-metadata). @@ -1337,7 +1337,7 @@ experimental: ``` - Controls dynamic SDK snippets that allow users to modify parameters and see code examples update in real time. Dynamic snippets are enabled by default and supported across all languages. Follow the [SDK snippets setup instructions](/docs/api-references/sdk-snippets) to configure. Set to false to use static SDK snippets instead. + Controls dynamic SDK snippets that allow users to modify parameters and see code examples update in real time. Dynamic snippets are enabled by default and supported across all languages. Follow the [SDK snippets setup instructions](/learn/docs/api-references/sdk-snippets) to configure. Set to false to use static SDK snippets instead. diff --git a/fern/products/docs/pages/navigation/versions.mdx b/fern/products/docs/pages/navigation/versions.mdx index 1505319d52..e9c82319ec 100644 --- a/fern/products/docs/pages/navigation/versions.mdx +++ b/fern/products/docs/pages/navigation/versions.mdx @@ -45,7 +45,7 @@ Version-specific `yml` files: -You can also have [multiple products, some versioned and some unversioned](/docs/configuration/products). +You can also have [multiple products, some versioned and some unversioned](/learn/docs/configuration/products). @@ -120,7 +120,7 @@ In this example, setting `slug: v3` produces URLs like `/docs/v3/getting-started -Control which versions appear in each [documentation instance](/docs/configuration/site-level-settings#instances-configuration) by tagging them with audiences. This enables separate sites for different user groups (e.g., internal developers, beta testers, public customers). +Control which versions appear in each [documentation instance](/learn/docs/configuration/site-level-settings#instances-configuration) by tagging them with audiences. This enables separate sites for different user groups (e.g., internal developers, beta testers, public customers). Content is filtered based on audience tags: diff --git a/fern/products/docs/pages/preview-publish/publishing-your-docs.mdx b/fern/products/docs/pages/preview-publish/publishing-your-docs.mdx index 1d4fcc7add..9c0badd4fc 100644 --- a/fern/products/docs/pages/preview-publish/publishing-your-docs.mdx +++ b/fern/products/docs/pages/preview-publish/publishing-your-docs.mdx @@ -182,11 +182,11 @@ To deploy to production, go to the **Actions** tab in your GitHub repository, se ## Hosting -When you publish your docs, Fern takes care of hosting them for you. You can also [publish your docs to a custom domain](/docs/preview-publish/setting-up-your-domain). +When you publish your docs, Fern takes care of hosting them for you. You can also [publish your docs to a custom domain](/learn/docs/preview-publish/setting-up-your-domain). ### Self-hosting your docs -If you need access to your docs offline or would like to host your docs on your own server, Fern [offers that option as well](/docs/self-hosted/overview). Self-hosted docs have limited access to certain features (including Ask Fern and analytics). +If you need access to your docs offline or would like to host your docs on your own server, Fern [offers that option as well](/learn/docs/self-hosted/overview). Self-hosted docs have limited access to certain features (including Ask Fern and analytics). ## Unpublishing your docs diff --git a/fern/products/docs/pages/seo/redirects.mdx b/fern/products/docs/pages/seo/redirects.mdx index 96dbec8083..95bd2af1f9 100644 --- a/fern/products/docs/pages/seo/redirects.mdx +++ b/fern/products/docs/pages/seo/redirects.mdx @@ -73,7 +73,7 @@ redirects: destination: / # Don't do this ``` -Instead, [enable automatic homepage redirects in your `docs.yml`](/docs/configuration/site-level-settings#settings-configuration) to send broken links to your homepage rather than showing a 404 page: +Instead, [enable automatic homepage redirects in your `docs.yml`](/learn/docs/configuration/site-level-settings#settings-configuration) to send broken links to your homepage rather than showing a 404 page: ```yaml title="docs.yml" settings: @@ -83,7 +83,7 @@ settings: -If you have [versions](/docs/configuration/versions) configured, your default version uses unversioned paths (`/docs/getting-started`), while other versions use versioned paths (`/docs/v2/getting-started`). Fern automatically handles version routing by redirecting broken versioned links to the default version and managing canonical URLs. +If you have [versions](/learn/docs/configuration/versions) configured, your default version uses unversioned paths (`/docs/getting-started`), while other versions use versioned paths (`/docs/v2/getting-started`). Fern automatically handles version routing by redirecting broken versioned links to the default version and managing canonical URLs. Avoid redirecting from unversioned to versioned URLs: diff --git a/fern/products/docs/snippets/default-version.mdx b/fern/products/docs/snippets/default-version.mdx index 2b29dc79e7..1da0f2953b 100644 --- a/fern/products/docs/snippets/default-version.mdx +++ b/fern/products/docs/snippets/default-version.mdx @@ -2,5 +2,5 @@ Versions appear in a dropdown on your site in the order listed in `docs.yml`. The first version in your `versions` list is the default version and uses unversioned paths like `example.com/getting-started`. Other versions use versioned paths like `example.com/v2/getting-started`. - Fern automatically handles version routing by [redirecting](/docs/seo/redirects) broken versioned links to the default version. Canonical URLs point to the unversioned path to consolidate SEO signals. To override this for version-specific pages, see [SEO metadata](/learn/docs/seo/setting-seo-metadata#canonical-url). + Fern automatically handles version routing by [redirecting](/learn/docs/seo/redirects) broken versioned links to the default version. Canonical URLs point to the unversioned path to consolidate SEO signals. To override this for version-specific pages, see [SEO metadata](/learn/docs/seo/setting-seo-metadata#canonical-url). diff --git a/fern/products/home/pages/welcome.mdx b/fern/products/home/pages/welcome.mdx index 0de8f47702..97413b4734 100644 --- a/fern/products/home/pages/welcome.mdx +++ b/fern/products/home/pages/welcome.mdx @@ -31,7 +31,7 @@ layout: custom {/* SDKs Card */}
- + SDKs Arrow right light Arrow right light @@ -52,37 +52,37 @@ layout: custom
Get started with: {/* TypeScript */} - + TypeScript {/* Python */} - + Python {/* Go */} - + Go {/* Java */} - + Java {/* C# */} - + C# {/* PHP */} - + PHP {/* Ruby */} Ruby - + Swift - + Rust Rust @@ -90,12 +90,12 @@ layout: custom {/* Action Buttons */}
- + Introduction Arrow right light Arrow right light - + Quickstart Arrow right light Arrow right light @@ -111,7 +111,7 @@ layout: custom {/* Docs Card */}
{/* Rive Animation */} - +
- + OpenAPI OpenAPI

OpenAPI

- + AsyncAPI AsyncAPI

AsyncAPI

- + OpenRPC OpenRPC

OpenRPC

- + gRPC gRPC @@ -267,42 +267,42 @@ layout: custom See our most recent product updates.

- + Docs - + TypeScript {/* Python */} - + Python {/* Go */} - + Go {/* Java */} - + Java {/* C# */} - + C# {/* PHP */} - + PHP {/* Ruby */} - + Ruby {/* Swift */} - + Swift {/* Rust */} - + Rust Rust @@ -384,23 +384,23 @@ layout: custom Generate client libraries in multiple languages. -Get started with: [TypeScript](/sdks/generators/typescript/quickstart), [Python](/sdks/generators/python/quickstart), [Go](/sdks/generators/go/quickstart), [Java](/sdks/generators/java/quickstart), [C#](/sdks/generators/csharp/quickstart), [PHP](/sdks/generators/php/quickstart), [Ruby](/learn/sdks/generators/ruby/quickstart), [Swift](/sdks/generators/swift/quickstart), [Rust](/sdks/generators/rust/quickstart) +Get started with: [TypeScript](/learn/sdks/generators/typescript/quickstart), [Python](/learn/sdks/generators/python/quickstart), [Go](/learn/sdks/generators/go/quickstart), [Java](/learn/sdks/generators/java/quickstart), [C#](/learn/sdks/generators/csharp/quickstart), [PHP](/learn/sdks/generators/php/quickstart), [Ruby](/learn/sdks/generators/ruby/quickstart), [Swift](/learn/sdks/generators/swift/quickstart), [Rust](/learn/sdks/generators/rust/quickstart) -- [Introduction](/sdks/overview/introduction) -- [Quickstart](/sdks/overview/quickstart) +- [Introduction](/learn/sdks/overview/introduction) +- [Quickstart](/learn/sdks/overview/quickstart) - [Customers](https://buildwithfern.com/showcase) ## Docs A beautiful, interactive documentation website. -- [Introduction](/docs/getting-started/overview) -- [Quickstart](/docs/getting-started/quickstart) -- [AI features](/docs/ai-features/overview) -- [Fern Editor](/docs/writing-content/fern-editor) -- [Bring your own API spec](/docs/api-references/generate-api-ref) -- [Gate docs by role](/docs/authentication/features/rbac) -- [Self-host your docs](/docs/self-hosted/overview) +- [Introduction](/learn/docs/getting-started/overview) +- [Quickstart](/learn/docs/getting-started/quickstart) +- [AI features](/learn/docs/ai-features/overview) +- [Fern Editor](/learn/docs/writing-content/fern-editor) +- [Bring your own API spec](/learn/docs/api-references/generate-api-ref) +- [Gate docs by role](/learn/docs/authentication/features/rbac) +- [Self-host your docs](/learn/docs/self-hosted/overview) - [Customers](https://buildwithfern.com/showcase#docs-customers.alldocs-features) ## Ask Fern @@ -415,14 +415,14 @@ AI search to find answers in your documentation instantly. Select one or more specs to generate SDKs and Docs. -- [OpenAPI](/api-definitions/openapi/overview) -- [AsyncAPI](/api-definitions/asyncapi/overview) -- [OpenRPC](/api-definitions/openrpc/overview) -- [gRPC](/api-definitions/grpc/overview) +- [OpenAPI](/learn/api-definitions/openapi/overview) +- [AsyncAPI](/learn/api-definitions/asyncapi/overview) +- [OpenRPC](/learn/api-definitions/openrpc/overview) +- [gRPC](/learn/api-definitions/grpc/overview) ## Community -- [Changelog](/docs/changelog): See the most recent product updates. +- [Changelog](/learn/docs/changelog): See the most recent product updates. - [GitHub](https://github.com/fern-api/fern): Follow progress and contribute to the codebase. - [X](https://x.com/buildwithfern): Get updates on the Fern platform. diff --git a/fern/products/sdks/capabilities.mdx b/fern/products/sdks/capabilities.mdx index ffb52c3973..537dc756f8 100644 --- a/fern/products/sdks/capabilities.mdx +++ b/fern/products/sdks/capabilities.mdx @@ -26,7 +26,7 @@ layout: overview - + Fine-tune SDK resources and method names

@@ -39,7 +39,7 @@ layout: overview - + Fail fast if payloads diverge from your schema

@@ -51,7 +51,7 @@ layout: overview

- + Fern SDKs include support for discriminated unions

@@ -95,7 +95,7 @@ layout: overview - + Paginate through API responses easily with offset, cursor, and link-based pagination.

@@ -108,7 +108,7 @@ layout: overview - + Fern supports OAuth as a first class citizen

@@ -121,7 +121,7 @@ layout: overview - + Automatically retry failed requests with exponential backoff

@@ -147,7 +147,7 @@ layout: overview - + Built-in protection against duplicate submissions

@@ -173,7 +173,7 @@ layout: overview - + Auto-generated and handwritten tests to ensure your SDK works in production

@@ -186,7 +186,7 @@ layout: overview - + No longer depend on manually written code snippets

@@ -199,7 +199,7 @@ layout: overview - + Extend the generated SDK to provide additional functionality

@@ -212,7 +212,7 @@ layout: overview - + Multiple API definitions. One SDK.

@@ -225,7 +225,7 @@ layout: overview - + Generate typed WebSocket clients with connection management and reconnection

@@ -246,22 +246,22 @@ Fern SDKs include the following capabilities: - **Strongly typed**: Move fast and break nothing with type safety. - **IDE support**: Rich autocomplete and inline documentation in your editor. [Learn more](/learn/sdks/deep-dives/sdk-user-features#ide-support-and-intellisense) -- **Idiomatic method names**: Fine-tune SDK resources and method names. [Learn more](/sdks/deep-dives/customize-method-names) -- **Schema validation**: Fail fast if payloads diverge from your schema. [Learn more](/sdks/deep-dives/testing#mock-server-tests) -- **Discriminated unions**: Support for discriminated unions. [Learn more](/api-definitions/ferndef/types#discriminated-unions) +- **Idiomatic method names**: Fine-tune SDK resources and method names. [Learn more](/learn/sdks/deep-dives/customize-method-names) +- **Schema validation**: Fail fast if payloads diverge from your schema. [Learn more](/learn/sdks/deep-dives/testing#mock-server-tests) +- **Discriminated unions**: Support for discriminated unions. [Learn more](/learn/api-definitions/ferndef/types#discriminated-unions) - **Multipart form data**: SDKs that handle multipart form data. - **Forward compatibility**: SDKs that are fault-tolerant as your API evolves. - **Automated releases**: Automatically detects API changes, regenerates SDKs, and publishes to registries. [Learn more](/learn/sdks/overview/autorelease) -- **Auto-pagination**: Paginate through API responses using offset, cursor, and link-based pagination. [Learn more](/sdks/deep-dives/auto-pagination) -- **OAuth token refresh**: First-class OAuth support. [Learn more](/sdks/reference/generators-yml#oauth) -- **Retries with backoff**: Automatically retry failed requests with exponential backoff. [Learn more](/sdks/deep-dives/retries-with-backoff) +- **Auto-pagination**: Paginate through API responses using offset, cursor, and link-based pagination. [Learn more](/learn/sdks/deep-dives/auto-pagination) +- **OAuth token refresh**: First-class OAuth support. [Learn more](/learn/sdks/reference/generators-yml#oauth) +- **Retries with backoff**: Automatically retry failed requests with exponential backoff. [Learn more](/learn/sdks/deep-dives/retries-with-backoff) - **Webhook signature verification**: Verify the signature of incoming webhook requests. [Learn more](/learn/sdks/deep-dives/webhook-signature-verification) -- **Idempotency headers**: Built-in protection against duplicate submissions. [Learn more](/sdks/deep-dives/idempotency) +- **Idempotency headers**: Built-in protection against duplicate submissions. [Learn more](/learn/sdks/deep-dives/idempotency) - **Server-sent events**: Stream JSON data from your server to your client, with opt-in access to [SSE metadata](/learn/sdks/deep-dives/sse-metadata) (event ID, event type, retry) and [automatic reconnection](/learn/sdks/deep-dives/sse-metadata#automatic-reconnection) for resumable endpoints. [Learn more](/learn/sdks/deep-dives/sse-metadata) -- **Testing**: Auto-generated and handwritten tests for your SDK. [Learn more](/sdks/deep-dives/testing) -- **Code snippets**: No longer depend on manually written code snippets. [Learn more](/docs/api-references/sdk-snippets) -- **Augment with custom code**: Extend the generated SDK with additional functionality. [Learn more](/sdks/overview/custom-code) -- **Merging multiple APIs**: Multiple API definitions, one SDK. [Learn more](/api-definitions/overview/project-structure#multiple-apis) -- **WebSockets**: Generate typed WebSocket clients with connection management and reconnection. [Learn more](/sdks/deep-dives/websocket-clients) +- **Testing**: Auto-generated and handwritten tests for your SDK. [Learn more](/learn/sdks/deep-dives/testing) +- **Code snippets**: No longer depend on manually written code snippets. [Learn more](/learn/docs/api-references/sdk-snippets) +- **Augment with custom code**: Extend the generated SDK with additional functionality. [Learn more](/learn/sdks/overview/custom-code) +- **Merging multiple APIs**: Multiple API definitions, one SDK. [Learn more](/learn/api-definitions/overview/project-structure#multiple-apis) +- **WebSockets**: Generate typed WebSocket clients with connection management and reconnection. [Learn more](/learn/sdks/deep-dives/websocket-clients) diff --git a/fern/products/sdks/custom-code.mdx b/fern/products/sdks/custom-code.mdx index 5e076c1581..f27e618ab3 100644 --- a/fern/products/sdks/custom-code.mdx +++ b/fern/products/sdks/custom-code.mdx @@ -94,11 +94,11 @@ To disable Replay, set `replay.enabled: false` at the top level of `generators.y Each SDK generator has its own conventions for adding custom code: how to extend the generated client, where helpers go, how to declare dependencies. See the guide for your language: - } href="/sdks/generators/typescript/custom-code" /> - } href="/sdks/generators/python/custom-code" /> + } href="/learn/sdks/generators/typescript/custom-code" /> + } href="/learn/sdks/generators/python/custom-code" /> } href="/learn/sdks/generators/go/custom-code" /> } href="/learn/sdks/generators/java/custom-code" /> - } href="/sdks/generators/csharp/custom-code" /> - } href="/sdks/generators/php/custom-code" /> - } href="/sdks/generators/ruby/custom-code" /> + } href="/learn/sdks/generators/csharp/custom-code" /> + } href="/learn/sdks/generators/php/custom-code" /> + } href="/learn/sdks/generators/ruby/custom-code" /> diff --git a/fern/products/sdks/deep-dives/dynamic-authentication.mdx b/fern/products/sdks/deep-dives/dynamic-authentication.mdx index b4a4c45c43..8bdc264e61 100644 --- a/fern/products/sdks/deep-dives/dynamic-authentication.mdx +++ b/fern/products/sdks/deep-dives/dynamic-authentication.mdx @@ -11,10 +11,10 @@ Your API may require dynamic authentication where credentials need to be generat Each language has its own recommended approach for implementing dynamic authentication: - + Use custom fetcher middleware to inject authentication logic in a single place for all requests. Supports JWT signing, OAuth token refresh, and more. - + Use method overrides to inject authentication logic for each API call. Supports JWT signing, OAuth token refresh, and more. @@ -52,6 +52,6 @@ When implementing dynamic authentication, keep these language-agnostic considera ## See also -- [Adding custom code](/sdks/overview/custom-code) - Learn more about extending generated SDKs -- [TypeScript custom code](/sdks/generators/typescript/custom-code) - TypeScript-specific customization guide -- [Python custom code](/sdks/generators/python/custom-code) - Python-specific customization guide +- [Adding custom code](/learn/sdks/overview/custom-code) - Learn more about extending generated SDKs +- [TypeScript custom code](/learn/sdks/generators/typescript/custom-code) - TypeScript-specific customization guide +- [Python custom code](/learn/sdks/generators/python/custom-code) - Python-specific customization guide diff --git a/fern/products/sdks/deep-dives/generated-sdk.mdx b/fern/products/sdks/deep-dives/generated-sdk.mdx index f440e3a059..ca163f78e9 100644 --- a/fern/products/sdks/deep-dives/generated-sdk.mdx +++ b/fern/products/sdks/deep-dives/generated-sdk.mdx @@ -76,7 +76,7 @@ Your SDK users can configure individual requests using language-specific options | Option | Description | Availability | |--------|-------------|--------------| | Timeouts | Configure request timeouts (default: 30 seconds for [C#](/learn/sdks/generators/csharp/configuration#default-timeout-in-milliseconds) and PHP, 60 seconds for all other languages) | All languages | -| [Retries](/sdks/deep-dives/retries-with-backoff) | Configure maximum retries (default: 2 with exponential backoff for 408, 429, and 5xx responses) | All languages except Ruby and Swift | +| [Retries](/learn/sdks/deep-dives/retries-with-backoff) | Configure maximum retries (default: 2 with exponential backoff for 408, 429, and 5xx responses) | All languages except Ruby and Swift | | Custom HTTP client | Override the default HTTP client for unsupported environments or custom requirements | TypeScript, Python, Java, PHP, and Swift | | [aiohttp transport](/learn/sdks/generators/python/aiohttp-support) | Opt into `aiohttp` as the async HTTP transport to resolve DNS concurrency bottlenecks | Python only | | Custom headers | Send additional headers with any request | TypeScript, Java, and Swift | diff --git a/fern/products/sdks/deep-dives/self-hosted.mdx b/fern/products/sdks/deep-dives/self-hosted.mdx index 609423a85c..08c931ef20 100644 --- a/fern/products/sdks/deep-dives/self-hosted.mdx +++ b/fern/products/sdks/deep-dives/self-hosted.mdx @@ -7,7 +7,7 @@ description: Fern supports self-hosting SDK generation so that you can run SDK g -Fern SDK generation [runs on Fern's infrastructure by default](/sdks/overview/how-it-works). Self-hosting allows you to run SDK generation on your own infrastructure. Use self-hosting if your organization: +Fern SDK generation [runs on Fern's infrastructure by default](/learn/sdks/overview/how-it-works). Self-hosting allows you to run SDK generation on your own infrastructure. Use self-hosting if your organization: - Operates without internet access - Has strict compliance or security requirements @@ -33,8 +33,8 @@ Each machine that runs `fern generate --local` needs: This page assumes that you have: -* An initialized `fern` folder. See [Set up the `fern` folder](/sdks/overview/quickstart). -* SDK generators configured in `generators.yml`. See language-specific quickstarts: [TypeScript](/sdks/generators/typescript/quickstart), [Python](/sdks/generators/python/quickstart), [Go](/sdks/generators/go/quickstart), [Java](/sdks/generators/java/quickstart), etc. +* An initialized `fern` folder. See [Set up the `fern` folder](/learn/sdks/overview/quickstart). +* SDK generators configured in `generators.yml`. See language-specific quickstarts: [TypeScript](/learn/sdks/generators/typescript/quickstart), [Python](/learn/sdks/generators/python/quickstart), [Go](/learn/sdks/generators/go/quickstart), [Java](/learn/sdks/generators/java/quickstart), etc. Self-hosted SDK generation allows you to output to your local file system or push directly to a GitHub repository you control. Follow these steps to set up and run local generation: diff --git a/fern/products/sdks/generators/csharp/quickstart.mdx b/fern/products/sdks/generators/csharp/quickstart.mdx index b1ff74e55e..0988ab7a17 100644 --- a/fern/products/sdks/generators/csharp/quickstart.mdx +++ b/fern/products/sdks/generators/csharp/quickstart.mdx @@ -59,7 +59,7 @@ fern generate --group csharp-sdk ``` - If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: + If you have multiple APIs, use the [`--api` flag](/learn/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: ```bash fern generate --group csharp-sdk --api your-api-name diff --git a/fern/products/sdks/generators/go/configuration.mdx b/fern/products/sdks/generators/go/configuration.mdx index e480de85fa..d82d4fc39d 100644 --- a/fern/products/sdks/generators/go/configuration.mdx +++ b/fern/products/sdks/generators/go/configuration.mdx @@ -59,7 +59,7 @@ When enabled, the generated SDK sends a single structured `User-Agent` header of -Generates [mock server (wire) tests](/sdks/deep-dives/testing#mock-server-tests) to verify that the SDK sends the correct HTTP requests and correctly handles responses per the API spec. When enabled, Docker is required as a runtime dependency to run the generated tests. +Generates [mock server (wire) tests](/learn/sdks/deep-dives/testing#mock-server-tests) to verify that the SDK sends the correct HTTP requests and correctly handles responses per the API spec. When enabled, Docker is required as a runtime dependency to run the generated tests. diff --git a/fern/products/sdks/generators/go/quickstart.mdx b/fern/products/sdks/generators/go/quickstart.mdx index f9a6154a17..4cf5fd1534 100644 --- a/fern/products/sdks/generators/go/quickstart.mdx +++ b/fern/products/sdks/generators/go/quickstart.mdx @@ -59,7 +59,7 @@ fern generate --group go-sdk ``` - If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: + If you have multiple APIs, use the [`--api` flag](/learn/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: ```bash fern generate --group go-sdk --api your-api-name diff --git a/fern/products/sdks/generators/java/configuration.mdx b/fern/products/sdks/generators/java/configuration.mdx index 1e8cb8e54f..7a914032f6 100644 --- a/fern/products/sdks/generators/java/configuration.mdx +++ b/fern/products/sdks/generators/java/configuration.mdx @@ -79,7 +79,7 @@ When enabled, generates public constructors for model types. -When enabled, generates [mock server (wire) tests](/sdks/deep-dives/testing#mock-server-tests) to verify that the SDK sends and receives HTTP requests as expected. +When enabled, generates [mock server (wire) tests](/learn/sdks/deep-dives/testing#mock-server-tests) to verify that the SDK sends and receives HTTP requests as expected. diff --git a/fern/products/sdks/generators/java/publishing-to-maven-central.mdx b/fern/products/sdks/generators/java/publishing-to-maven-central.mdx index c7df0ff56c..d7352786ef 100644 --- a/fern/products/sdks/generators/java/publishing-to-maven-central.mdx +++ b/fern/products/sdks/generators/java/publishing-to-maven-central.mdx @@ -16,7 +16,7 @@ page, you'll have a versioned package published on Maven Central. ## Configure Maven Central publication -You'll need to update your `generators.yml` file to configure the output location, target repository, and publishing mode. Your `generators.yml` [should live in your source repository](/sdks/overview/project-structure) (or on your local machine), not the repository that contains your Java SDK code. +You'll need to update your `generators.yml` file to configure the output location, target repository, and publishing mode. Your `generators.yml` [should live in your source repository](/learn/sdks/overview/project-structure) (or on your local machine), not the repository that contains your Java SDK code. diff --git a/fern/products/sdks/generators/java/quickstart.mdx b/fern/products/sdks/generators/java/quickstart.mdx index 31427dd822..82af101ba3 100644 --- a/fern/products/sdks/generators/java/quickstart.mdx +++ b/fern/products/sdks/generators/java/quickstart.mdx @@ -59,7 +59,7 @@ fern generate --group java-sdk ``` - If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: + If you have multiple APIs, use the [`--api` flag](/learn/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: ```bash fern generate --group java-sdk --api your-api-name diff --git a/fern/products/sdks/generators/php/configuration.mdx b/fern/products/sdks/generators/php/configuration.mdx index b330555d07..16b425ef76 100644 --- a/fern/products/sdks/generators/php/configuration.mdx +++ b/fern/products/sdks/generators/php/configuration.mdx @@ -31,7 +31,7 @@ Allows customization of the generated `composer.json` file contents. You can spe -When enabled, generates [mock server (wire) tests](/sdks/deep-dives/testing#mock-server-tests) to verify that the SDK sends and receives HTTP requests as expected. +When enabled, generates [mock server (wire) tests](/learn/sdks/deep-dives/testing#mock-server-tests) to verify that the SDK sends and receives HTTP requests as expected. diff --git a/fern/products/sdks/generators/php/quickstart.mdx b/fern/products/sdks/generators/php/quickstart.mdx index 70a9838580..f251a200d7 100644 --- a/fern/products/sdks/generators/php/quickstart.mdx +++ b/fern/products/sdks/generators/php/quickstart.mdx @@ -59,7 +59,7 @@ fern generate --group php-sdk ``` - If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: + If you have multiple APIs, use the [`--api` flag](/learn/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: ```bash fern generate --group php-sdk --api your-api-name diff --git a/fern/products/sdks/generators/python/configuration.mdx b/fern/products/sdks/generators/python/configuration.mdx index ab2ed0a281..12040ca7df 100644 --- a/fern/products/sdks/generators/python/configuration.mdx +++ b/fern/products/sdks/generators/python/configuration.mdx @@ -70,7 +70,7 @@ The default number of retries for failed requests in the generated SDK. Set to ` -When enabled, generates [mock server (wire) tests](/sdks/deep-dives/testing#mock-server-tests) to verify that the SDK sends and receives HTTP requests as expected. +When enabled, generates [mock server (wire) tests](/learn/sdks/deep-dives/testing#mock-server-tests) to verify that the SDK sends and receives HTTP requests as expected. diff --git a/fern/products/sdks/generators/python/dynamic-authentication.mdx b/fern/products/sdks/generators/python/dynamic-authentication.mdx index b821705192..4810341f87 100644 --- a/fern/products/sdks/generators/python/dynamic-authentication.mdx +++ b/fern/products/sdks/generators/python/dynamic-authentication.mdx @@ -145,5 +145,5 @@ This same pattern works for other dynamic authentication scenarios: ## See also -- [Adding custom code](/sdks/generators/python/custom-code) - Python-specific customization guide -- [Python configuration](/sdks/generators/python/configuration) - Full list of configuration options +- [Adding custom code](/learn/sdks/generators/python/custom-code) - Python-specific customization guide +- [Python configuration](/learn/sdks/generators/python/configuration) - Full list of configuration options diff --git a/fern/products/sdks/generators/python/publishing-to-pypi.mdx b/fern/products/sdks/generators/python/publishing-to-pypi.mdx index 9c08507c67..1f6de7383d 100644 --- a/fern/products/sdks/generators/python/publishing-to-pypi.mdx +++ b/fern/products/sdks/generators/python/publishing-to-pypi.mdx @@ -33,7 +33,7 @@ Default to OIDC authentication unless the user has a specific reason to use toke ## Configure SDK package settings -Update your `generators.yml` file to configure the package name, output location, and client naming for PyPI publishing. Your `generators.yml` [should live in your source repository](/sdks/overview/project-structure) (or on your local machine), not the repository that contains your Python SDK code. +Update your `generators.yml` file to configure the package name, output location, and client naming for PyPI publishing. Your `generators.yml` [should live in your source repository](/learn/sdks/overview/project-structure) (or on your local machine), not the repository that contains your Python SDK code. diff --git a/fern/products/sdks/generators/python/quickstart.mdx b/fern/products/sdks/generators/python/quickstart.mdx index 3bb852b730..6cb2c9b9f8 100644 --- a/fern/products/sdks/generators/python/quickstart.mdx +++ b/fern/products/sdks/generators/python/quickstart.mdx @@ -55,7 +55,7 @@ fern generate --group python-sdk ``` - If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: + If you have multiple APIs, use the [`--api` flag](/learn/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: ```bash fern generate --group python-sdk --api your-api-name diff --git a/fern/products/sdks/generators/ruby/configuration.mdx b/fern/products/sdks/generators/ruby/configuration.mdx index 5367712ed8..4a155245e3 100644 --- a/fern/products/sdks/generators/ruby/configuration.mdx +++ b/fern/products/sdks/generators/ruby/configuration.mdx @@ -51,7 +51,7 @@ The content supports template variables like `{{ packageName }}` that are replac -When enabled, generates [mock server (wire) tests](/sdks/deep-dives/testing#mock-server-tests) to verify that the SDK sends and receives HTTP requests as expected. +When enabled, generates [mock server (wire) tests](/learn/sdks/deep-dives/testing#mock-server-tests) to verify that the SDK sends and receives HTTP requests as expected. diff --git a/fern/products/sdks/generators/ruby/quickstart.mdx b/fern/products/sdks/generators/ruby/quickstart.mdx index 9e9edac83c..f1b5709a0b 100644 --- a/fern/products/sdks/generators/ruby/quickstart.mdx +++ b/fern/products/sdks/generators/ruby/quickstart.mdx @@ -59,7 +59,7 @@ fern generate --group ruby-sdk ``` - If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: + If you have multiple APIs, use the [`--api` flag](/learn/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: ```bash fern generate --group ruby-sdk --api your-api-name diff --git a/fern/products/sdks/generators/swift/configuration.mdx b/fern/products/sdks/generators/swift/configuration.mdx index 20b8c352c7..a084922c45 100644 --- a/fern/products/sdks/generators/swift/configuration.mdx +++ b/fern/products/sdks/generators/swift/configuration.mdx @@ -37,7 +37,7 @@ The default number of retries for failed requests. When not set, the generated S -Generates [mock server (wire) tests](/sdks/deep-dives/testing#mock-server-tests) to verify that the SDK sends the correct HTTP requests and correctly handles responses per the API spec. +Generates [mock server (wire) tests](/learn/sdks/deep-dives/testing#mock-server-tests) to verify that the SDK sends the correct HTTP requests and correctly handles responses per the API spec. diff --git a/fern/products/sdks/generators/typescript/configuration.mdx b/fern/products/sdks/generators/typescript/configuration.mdx index 1627630dae..7bf47bb8c6 100644 --- a/fern/products/sdks/generators/typescript/configuration.mdx +++ b/fern/products/sdks/generators/typescript/configuration.mdx @@ -21,7 +21,7 @@ groups: Allow fields that are not defined in object schemas. This only applies to serde. -See [TypeScript serde layer](/sdks/generators/typescript/serde-layer) for more information. +See [TypeScript serde layer](/learn/sdks/generators/typescript/serde-layer) for more information. @@ -391,7 +391,7 @@ Controls whether the serde layer is enabled for serialization/deserialization. When `noSerdeLayer: false`, the generated client includes custom serialization code that transforms property names to camelCase, validates requests/responses at runtime, and supports complex types. -See [TypeScript serde layer](/sdks/generators/typescript/serde-layer) for detailed guidance on when to enable this option. +See [TypeScript serde layer](/learn/sdks/generators/typescript/serde-layer) for detailed guidance on when to enable this option. @@ -440,7 +440,7 @@ config: email: developers@acmecorp.com ``` -You can also use `packageJson.exports` to register custom subpath exports (e.g. `import { myHelper } from "@acme/sdk/helper"`). The generator only auto-generates export entries for your API definition, so custom files need to be added manually—otherwise Node.js won't resolve subpath imports for them. See [Adding custom code](/sdks/generators/typescript/custom-code) for details. +You can also use `packageJson.exports` to register custom subpath exports (e.g. `import { myHelper } from "@acme/sdk/helper"`). The generator only auto-generates export entries for your API definition, so custom files need to be added manually—otherwise Node.js won't resolve subpath imports for them. See [Adding custom code](/learn/sdks/generators/typescript/custom-code) for details. @@ -536,7 +536,7 @@ The default is `web`. When `useBigInt` is set to `true`, a customized JSON serializer & deserializer is used that will preserve the precision of `bigint`'s, as opposed to the native `JSON.stringify` and `JSON.parse` function which converts `bigint`'s to number's losing precision. When combining `useBigInt` with our serialization layer (`noSerdeLayer: false`), both the request and response properties that are marked as `long` and `bigint` in OpenAPI/Fern spec, will consistently be `bigint`'s. -However, when disabling the serialization layer (`noSerdeLayer: true`), they will be typed as `number | bigint`. See [TypeScript serde layer](/sdks/generators/typescript/serde-layer) for more information. +However, when disabling the serialization layer (`noSerdeLayer: true`), they will be typed as `number | bigint`. See [TypeScript serde layer](/learn/sdks/generators/typescript/serde-layer) for more information. Here's an overview of what to expect from the generated types when combining `useBigInt` and `noSerdeLayer` with the following Fern definition: diff --git a/fern/products/sdks/generators/typescript/custom-code.mdx b/fern/products/sdks/generators/typescript/custom-code.mdx index 2bf6815d87..c355fb35c6 100644 --- a/fern/products/sdks/generators/typescript/custom-code.mdx +++ b/fern/products/sdks/generators/typescript/custom-code.mdx @@ -45,7 +45,7 @@ To get started adding custom code: -By default, the TypeScript generator only auto-generates `exports` entries in `package.json` for your API definition. If you want consumers to import your custom file via a dedicated subpath (e.g. `import { myHelper } from "@acme/sdk/helper"`), you must register it manually using [`packageJson.exports`](/sdks/generators/typescript/configuration#packagejson) in `generators.yml`: +By default, the TypeScript generator only auto-generates `exports` entries in `package.json` for your API definition. If you want consumers to import your custom file via a dedicated subpath (e.g. `import { myHelper } from "@acme/sdk/helper"`), you must register it manually using [`packageJson.exports`](/learn/sdks/generators/typescript/configuration#packagejson) in `generators.yml`: ```yaml {5-14} title="generators.yml" - name: fern-typescript-sdk @@ -137,7 +137,7 @@ The export key (e.g., `"./helper"`) determines the import path your users will u -To add packages that your custom code requires, use the [`extraDependencies`](/sdks/generators/typescript/configuration#extraDependencies) and [`extraDevDependencies`](/sdks/generators/typescript/configuration#extraDevDependencies) options in your `generators.yml`. +To add packages that your custom code requires, use the [`extraDependencies`](/learn/sdks/generators/typescript/configuration#extraDependencies) and [`extraDevDependencies`](/learn/sdks/generators/typescript/configuration#extraDevDependencies) options in your `generators.yml`. ```yaml {4-7} title="generators.yml" - name: fern-typescript-sdk diff --git a/fern/products/sdks/generators/typescript/dynamic-authentication.mdx b/fern/products/sdks/generators/typescript/dynamic-authentication.mdx index 3e43eec295..46ca09ac3d 100644 --- a/fern/products/sdks/generators/typescript/dynamic-authentication.mdx +++ b/fern/products/sdks/generators/typescript/dynamic-authentication.mdx @@ -46,7 +46,7 @@ Add the `jsonwebtoken` dependency using the `packageJson` config option so it ge "@types/jsonwebtoken": "^9.0.0" ``` -See the [TypeScript configuration page](/sdks/generators/typescript/configuration#packagejson) for all available packageJson options. +See the [TypeScript configuration page](/learn/sdks/generators/typescript/configuration#packagejson) for all available packageJson options. ### Create a custom fetcher with JWT signing @@ -204,5 +204,5 @@ This same pattern works for other dynamic authentication scenarios: ## See also -- [Adding custom code](/sdks/generators/typescript/custom-code) - TypeScript-specific customization guide -- [TypeScript configuration](/sdks/generators/typescript/configuration) - Full list of configuration options +- [Adding custom code](/learn/sdks/generators/typescript/custom-code) - TypeScript-specific customization guide +- [TypeScript configuration](/learn/sdks/generators/typescript/configuration) - Full list of configuration options diff --git a/fern/products/sdks/generators/typescript/publishing-to-npm.mdx b/fern/products/sdks/generators/typescript/publishing-to-npm.mdx index 520a624eb5..08f1543b7d 100644 --- a/fern/products/sdks/generators/typescript/publishing-to-npm.mdx +++ b/fern/products/sdks/generators/typescript/publishing-to-npm.mdx @@ -33,7 +33,7 @@ Default to OIDC authentication unless the user has a specific reason to use toke ## Configure SDK package settings -Update your `generators.yml` file to configure the package name, output location, and client naming for npm publishing. Your `generators.yml` [should live in your source repository](/sdks/overview/project-structure) (or on your local machine), not the repository that contains your TypeScript SDK code. +Update your `generators.yml` file to configure the package name, output location, and client naming for npm publishing. Your `generators.yml` [should live in your source repository](/learn/sdks/overview/project-structure) (or on your local machine), not the repository that contains your TypeScript SDK code. diff --git a/fern/products/sdks/generators/typescript/quickstart.mdx b/fern/products/sdks/generators/typescript/quickstart.mdx index 904f088d8d..3e28b66fd2 100644 --- a/fern/products/sdks/generators/typescript/quickstart.mdx +++ b/fern/products/sdks/generators/typescript/quickstart.mdx @@ -58,7 +58,7 @@ fern generate --group ts-sdk ``` - If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: + If you have multiple APIs, use the [`--api` flag](/learn/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate: ```bash fern generate --group ts-sdk --api your-api-name diff --git a/fern/products/sdks/generators/typescript/serde-layer.mdx b/fern/products/sdks/generators/typescript/serde-layer.mdx index 5fd6f1a406..ea562583f0 100644 --- a/fern/products/sdks/generators/typescript/serde-layer.mdx +++ b/fern/products/sdks/generators/typescript/serde-layer.mdx @@ -49,5 +49,5 @@ groups: useBigInt: true # Preserve precision for large numbers ``` -For the complete list of all TypeScript configuration options, go to [TypeScript configuration](/sdks/generators/typescript/configuration). +For the complete list of all TypeScript configuration options, go to [TypeScript configuration](/learn/sdks/generators/typescript/configuration). diff --git a/fern/products/sdks/how-it-works.mdx b/fern/products/sdks/how-it-works.mdx index b36d7a0c4e..81038b0cb2 100644 --- a/fern/products/sdks/how-it-works.mdx +++ b/fern/products/sdks/how-it-works.mdx @@ -6,7 +6,7 @@ description: Understand Fern's SDK generation process. Cloud-based workflow tran Fern combines your API specifications with generator configurations and custom code to produce SDKs in multiple languages. By default, SDK generation runs on Fern's managed cloud infrastructure. -Alternatively, [you can run SDK generation on your own infrastructure](/sdks/deep-dives/self-hosted) to meet specific security or compliance requirements. +Alternatively, [you can run SDK generation on your own infrastructure](/learn/sdks/deep-dives/self-hosted) to meet specific security or compliance requirements. ## Cloud generation workflow diff --git a/fern/products/sdks/introduction.mdx b/fern/products/sdks/introduction.mdx index a81d53d4c7..57ca62637b 100644 --- a/fern/products/sdks/introduction.mdx +++ b/fern/products/sdks/introduction.mdx @@ -16,7 +16,7 @@ description: Build multi-language SDKs with Fern's generator platform. Support T {/*

*/}
- + - + - + - + - + - +
PHP @@ -156,7 +156,7 @@ description: Build multi-language SDKs with Fern's generator platform. Support T
v
-
+ Changelog Changelog - + - +
Rust @@ -231,7 +231,7 @@ description: Build multi-language SDKs with Fern's generator platform. Support T
v
-
+ Changelog Changelog
@@ -276,15 +276,15 @@ description: Build multi-language SDKs with Fern's generator platform. Support T Generate client libraries in multiple languages from your API definition. -- [TypeScript](/sdks/generators/typescript/quickstart): Quickstart guide for generating a TypeScript SDK. -- [Python](/sdks/generators/python/quickstart): Quickstart guide for generating a Python SDK. -- [Go](/sdks/generators/go/quickstart): Quickstart guide for generating a Go SDK. -- [Java](/sdks/generators/java/quickstart): Quickstart guide for generating a Java SDK. -- [.NET](/sdks/generators/csharp/quickstart): Quickstart guide for generating a .NET SDK. -- [PHP](/sdks/generators/php/quickstart): Quickstart guide for generating a PHP SDK. +- [TypeScript](/learn/sdks/generators/typescript/quickstart): Quickstart guide for generating a TypeScript SDK. +- [Python](/learn/sdks/generators/python/quickstart): Quickstart guide for generating a Python SDK. +- [Go](/learn/sdks/generators/go/quickstart): Quickstart guide for generating a Go SDK. +- [Java](/learn/sdks/generators/java/quickstart): Quickstart guide for generating a Java SDK. +- [.NET](/learn/sdks/generators/csharp/quickstart): Quickstart guide for generating a .NET SDK. +- [PHP](/learn/sdks/generators/php/quickstart): Quickstart guide for generating a PHP SDK. - [Ruby](/learn/sdks/generators/ruby/quickstart): Quickstart guide for generating a Ruby SDK. -- [Swift](/sdks/generators/swift/quickstart): Quickstart guide for generating a Swift SDK. -- [Rust](/sdks/generators/rust/quickstart): Quickstart guide for generating a Rust SDK. +- [Swift](/learn/sdks/generators/swift/quickstart): Quickstart guide for generating a Swift SDK. +- [Rust](/learn/sdks/generators/rust/quickstart): Quickstart guide for generating a Rust SDK. - [C++](https://buildwithfern.com/book-demo?type=language-request): Request access for C++ SDK generation. - [Kotlin](https://buildwithfern.com/book-demo?type=language-request): Request access for Kotlin SDK generation. diff --git a/fern/products/sdks/project-structure.mdx b/fern/products/sdks/project-structure.mdx index ab1ec1435d..4aeaced495 100644 --- a/fern/products/sdks/project-structure.mdx +++ b/fern/products/sdks/project-structure.mdx @@ -62,7 +62,7 @@ The `fern.config.json` file stores your organization name and the Fern CLI versi ``` - When working with a locally installed CLI, set `version` to `"*"`. See [Install Fern CLI locally](/cli-api-reference/cli-reference/overview#install-fern-cli-locally) for details. + When working with a locally installed CLI, set `version` to `"*"`. See [Install Fern CLI locally](/learn/cli-api-reference/cli-reference/overview#install-fern-cli-locally) for details. ### `generators.yml` @@ -96,8 +96,8 @@ groups: See Cohere's [`generators.yml` file](https://github.com/cohere-ai/cohere-developer-experience/blob/23d6c541a01eb6b54dd9bb3588c805bb0e307713/fern/apis/sdks/generators.yml) and Vapi's [`generators.yml` file](https://github.com/VapiAI/docs/blob/9c674c2b16ba03e864e26673c5290c88048c9a7a/fern/apis/api/generators.yml). -See the [`generators.yml` reference page](/sdks/reference/generators-yml) for complete configuration options. +See the [`generators.yml` reference page](/learn/sdks/reference/generators-yml) for complete configuration options. ### API definition file -See [Project structure (API Definitions)](/api-definitions/overview/project-structure) for details on organizing your API definition files and working with multiple APIs. +See [Project structure (API Definitions)](/learn/api-definitions/overview/project-structure) for details on organizing your API definition files and working with multiple APIs. diff --git a/fern/products/sdks/reference/generators-yml-reference.mdx b/fern/products/sdks/reference/generators-yml-reference.mdx index 1fa9ebdb25..5692567e02 100644 --- a/fern/products/sdks/reference/generators-yml-reference.mdx +++ b/fern/products/sdks/reference/generators-yml-reference.mdx @@ -360,7 +360,7 @@ api: - Namespace for the specification. Useful for configuring a [single package with multiple API versions](/api-definitions/overview/project-structure#option-2-namespace-based-versioning). + Namespace for the specification. Useful for configuring a [single package with multiple API versions](/learn/api-definitions/overview/project-structure#option-2-namespace-based-versioning). @@ -664,23 +664,23 @@ groups: ``` -} href="/sdks/generators/typescript/configuration"> +} href="/learn/sdks/generators/typescript/configuration"> -} href="/sdks/generators/python/configuration"> +} href="/learn/sdks/generators/python/configuration"> -} href="/sdks/generators/go/configuration"> +} href="/learn/sdks/generators/go/configuration"> -} href="/sdks/generators/java/configuration"> +} href="/learn/sdks/generators/java/configuration"> -} href="/sdks/generators/csharp/configuration"> +} href="/learn/sdks/generators/csharp/configuration"> -} href="/sdks/generators/php/configuration"> +} href="/learn/sdks/generators/php/configuration"> -} href="/sdks/generators/ruby/configuration"> +} href="/learn/sdks/generators/ruby/configuration"> -} href="/sdks/generators/swift/configuration"> +} href="/learn/sdks/generators/swift/configuration"> -} href="/sdks/generators/rust/configuration"> +} href="/learn/sdks/generators/rust/configuration"> diff --git a/fern/products/sdks/snippets/custom-code-callout.mdx b/fern/products/sdks/snippets/custom-code-callout.mdx index 7cf2ce34a0..b05b180ead 100644 --- a/fern/products/sdks/snippets/custom-code-callout.mdx +++ b/fern/products/sdks/snippets/custom-code-callout.mdx @@ -1,2 +1,2 @@ -These steps cover adding a new custom file to the SDK. To preserve line-level edits to a generated file, use [Replay](/sdks/overview/custom-code#replay) instead. \ No newline at end of file +These steps cover adding a new custom file to the SDK. To preserve line-level edits to a generated file, use [Replay](/learn/sdks/overview/custom-code#replay) instead. \ No newline at end of file diff --git a/fern/products/sdks/snippets/github-publishing-mode.mdx b/fern/products/sdks/snippets/github-publishing-mode.mdx index 0951f9465c..bdaaba09a2 100644 --- a/fern/products/sdks/snippets/github-publishing-mode.mdx +++ b/fern/products/sdks/snippets/github-publishing-mode.mdx @@ -5,4 +5,4 @@ Optionally set the mode to control how Fern handles SDK publishing: - `mode: pull-request` (recommended): Fern generates code and creates a PR for you to review before release - `mode: push`: Fern generates code and pushes to a branch you specify for you to review before release -You can also configure other settings, like the reviewers or license. Refer to the [full `github` (`generators.yml`) reference](/sdks/reference/generators-yml#github) for more information. \ No newline at end of file +You can also configure other settings, like the reviewers or license. Refer to the [full `github` (`generators.yml`) reference](/learn/sdks/reference/generators-yml#github) for more information. \ No newline at end of file diff --git a/fern/products/sdks/snippets/oauth-params.mdx b/fern/products/sdks/snippets/oauth-params.mdx index 7fa5dc7bab..7af5476e78 100644 --- a/fern/products/sdks/snippets/oauth-params.mdx +++ b/fern/products/sdks/snippets/oauth-params.mdx @@ -1,6 +1,6 @@ - For OpenAPI, [OAuth must be configured in `generators.yml`](/api-definitions/openapi/authentication#oauth-client-credentials). + For OpenAPI, [OAuth must be configured in `generators.yml`](/learn/api-definitions/openapi/authentication#oauth-client-credentials). Configure OAuth 2.0 client credentials authentication. Optionally configure a `refresh-token` endpoint for token renewal without re-authentication. diff --git a/fern/products/sdks/snippets/readme-options.mdx b/fern/products/sdks/snippets/readme-options.mdx index 68b2ffbf88..613ab119a5 100644 --- a/fern/products/sdks/snippets/readme-options.mdx +++ b/fern/products/sdks/snippets/readme-options.mdx @@ -99,18 +99,18 @@ Define a custom section in the generated README for a specific SDK. | Language | Variable | Description | |----------|----------|-------------| - | TypeScript | `packageName` | Name of your package, as specified in the [`package-name` field](/sdks/generators/typescript/configuration#package-name) | - | Python | `packageName` | Name of your package, as specified in the [`package_name` field](/sdks/generators/python/configuration#package_name) | + | TypeScript | `packageName` | Name of your package, as specified in the [`package-name` field](/learn/sdks/generators/typescript/configuration#package-name) | + | Python | `packageName` | Name of your package, as specified in the [`package_name` field](/learn/sdks/generators/python/configuration#package_name) | | Go | `owner` | The owner of your Go module | - | Go | `repo` | The [repository](/sdks/generators/go/publishing#configure-output-location) where your Go module is published | + | Go | `repo` | The [repository](/learn/sdks/generators/go/publishing#configure-output-location) where your Go module is published | | Go | `version` | SDK version | - | Java | `group` | Maven `groupId` [from `coordinate` field](/sdks/generators/java/publishing#configure-maven-coordinate) | - | Java | `artifact` | Maven `artifactId` [from `coordinate` field](/sdks/generators/java/publishing#configure-maven-coordinate) | + | Java | `group` | Maven `groupId` [from `coordinate` field](/learn/sdks/generators/java/publishing#configure-maven-coordinate) | + | Java | `artifact` | Maven `artifactId` [from `coordinate` field](/learn/sdks/generators/java/publishing#configure-maven-coordinate) | | Java | `version` | SDK version | | C#/.NET | `packageName` | Name of your package, as specified in the [`package-id` field](/learn/sdks/generators/csharp/configuration#package-id) | - | PHP | `packageName` | Name of your package, as specified in the [`package-name` field](/sdks/generators/php/configuration#package-name) | - | Ruby | `packageName` | Name of your package, as specified in the [`package-name` field](/sdks/generators/ruby/configuration#package-name) | - | Swift | `gitUrl` | The [URL](/sdks/generators/swift/publishing#verify-package-availability) where your Swift package is published. For example, `https://github.com/fern-api/basic-swift-sdk` | + | PHP | `packageName` | Name of your package, as specified in the [`package-name` field](/learn/sdks/generators/php/configuration#package-name) | + | Ruby | `packageName` | Name of your package, as specified in the [`package-name` field](/learn/sdks/generators/ruby/configuration#package-name) | + | Swift | `gitUrl` | The [URL](/learn/sdks/generators/swift/publishing#verify-package-availability) where your Swift package is published. For example, `https://github.com/fern-api/basic-swift-sdk` | | Swift | `minVersion` | SDK version | diff --git a/fern/products/sdks/snippets/setup-fern-folder-callout.mdx b/fern/products/sdks/snippets/setup-fern-folder-callout.mdx index 001f5a9b62..5344ad7ce9 100644 --- a/fern/products/sdks/snippets/setup-fern-folder-callout.mdx +++ b/fern/products/sdks/snippets/setup-fern-folder-callout.mdx @@ -1,4 +1,4 @@ - This page assumes you have an initialized `fern` folder. See [Set up the `fern` folder](/sdks/overview/quickstart) if you haven't done this yet. + This page assumes you have an initialized `fern` folder. See [Set up the `fern` folder](/learn/sdks/overview/quickstart) if you haven't done this yet. \ No newline at end of file diff --git a/fern/snippets/default-version.mdx b/fern/snippets/default-version.mdx index 2b29dc79e7..1da0f2953b 100644 --- a/fern/snippets/default-version.mdx +++ b/fern/snippets/default-version.mdx @@ -2,5 +2,5 @@ Versions appear in a dropdown on your site in the order listed in `docs.yml`. The first version in your `versions` list is the default version and uses unversioned paths like `example.com/getting-started`. Other versions use versioned paths like `example.com/v2/getting-started`. - Fern automatically handles version routing by [redirecting](/docs/seo/redirects) broken versioned links to the default version. Canonical URLs point to the unversioned path to consolidate SEO signals. To override this for version-specific pages, see [SEO metadata](/learn/docs/seo/setting-seo-metadata#canonical-url). + Fern automatically handles version routing by [redirecting](/learn/docs/seo/redirects) broken versioned links to the default version. Canonical URLs point to the unversioned path to consolidate SEO signals. To override this for version-specific pages, see [SEO metadata](/learn/docs/seo/setting-seo-metadata#canonical-url). diff --git a/fern/snippets/openapi-specs.mdx b/fern/snippets/openapi-specs.mdx index ac63bedc4d..6310d0f933 100644 --- a/fern/snippets/openapi-specs.mdx +++ b/fern/snippets/openapi-specs.mdx @@ -76,7 +76,7 @@ api: - Namespace for the specification. Useful for configuring a [single package with multiple API versions](/api-definitions/overview/project-structure#option-2-namespace-based-versioning). + Namespace for the specification. Useful for configuring a [single package with multiple API versions](/learn/api-definitions/overview/project-structure#option-2-namespace-based-versioning). diff --git a/fern/translations/zh/products/api-def/ferndef/api-yml/global-configuration.mdx b/fern/translations/zh/products/api-def/ferndef/api-yml/global-configuration.mdx index 254e72809c..9ee226070e 100644 --- a/fern/translations/zh/products/api-def/ferndef/api-yml/global-configuration.mdx +++ b/fern/translations/zh/products/api-def/ferndef/api-yml/global-configuration.mdx @@ -18,7 +18,7 @@ headers: ``` -当您在 `api.yml` 中定义全局请求头时,必须[在端点示例中包含它们](/api-definitions/ferndef/examples#examples-with-headers)。 +当您在 `api.yml` 中定义全局请求头时,必须[在端点示例中包含它们](/learn/api-definitions/ferndef/examples#examples-with-headers)。 ## 全局路径参数 diff --git a/fern/translations/zh/products/api-def/ferndef/auth.mdx b/fern/translations/zh/products/api-def/ferndef/auth.mdx index 1190e368a0..387f003f5c 100644 --- a/fern/translations/zh/products/api-def/ferndef/auth.mdx +++ b/fern/translations/zh/products/api-def/ferndef/auth.mdx @@ -238,7 +238,7 @@ service: response: TokenResponse ``` -如果您的 OAuth 服务器托管在与主 API 不同的 URL 上,您可以使用[每个环境多 URL](/api-definitions/ferndef/api-yml/environments#multiple-urls-per-environment) 来为身份验证和 API 调用指定单独的基础 URL。 +如果您的 OAuth 服务器托管在与主 API 不同的 URL 上,您可以使用[每个环境多 URL](/learn/api-definitions/ferndef/api-yml/environments#multiple-urls-per-environment) 来为身份验证和 API 调用指定单独的基础 URL。 有了这些设置,所有 OAuth 逻辑会在生成的 SDK 中自动处理。只要您配置了这些设置,您的客户端将自动检索访问令牌并根据需要刷新它。 diff --git a/fern/translations/zh/products/api-def/ferndef/endpoints.mdx b/fern/translations/zh/products/api-def/ferndef/endpoints.mdx index 0060230985..ad2b1ce38a 100644 --- a/fern/translations/zh/products/api-def/ferndef/endpoints.mdx +++ b/fern/translations/zh/products/api-def/ferndef/endpoints.mdx @@ -30,7 +30,7 @@ noindex: true ### 节显示名称 -默认情况下,API 参考中的节名称来自服务文件名(例如,`user.yml` 变成"User")。要覆盖节的显示名称,[在您的 `docs.yml` 中使用 `section` 属性](/docs/api-references/customize-api-reference-layout#renaming-sections)。 +默认情况下,API 参考中的节名称来自服务文件名(例如,`user.yml` 变成"User")。要覆盖节的显示名称,[在您的 `docs.yml` 中使用 `section` 属性](/learn/docs/api-references/customize-api-reference-layout#renaming-sections)。 ### SDK 方法名称 diff --git a/fern/translations/zh/products/api-def/ferndef/examples.mdx b/fern/translations/zh/products/api-def/ferndef/examples.mdx index 958fe87e97..735546df66 100644 --- a/fern/translations/zh/products/api-def/ferndef/examples.mdx +++ b/fern/translations/zh/products/api-def/ferndef/examples.mdx @@ -315,7 +315,7 @@ errors: ### 包含请求头的示例 -当您在 `api.yml` 中[定义了全局请求头](/api-definitions/ferndef/api-yml/global-headers#global-headers)时,必须在示例中包含它们: +当您在 `api.yml` 中[定义了全局请求头](/learn/api-definitions/ferndef/api-yml/global-headers#global-headers)时,必须在示例中包含它们: ```yml {15-16} service: diff --git a/fern/translations/zh/products/api-def/ferndef/export-openapi.mdx b/fern/translations/zh/products/api-def/ferndef/export-openapi.mdx index a519b499e7..abbecbe547 100644 --- a/fern/translations/zh/products/api-def/ferndef/export-openapi.mdx +++ b/fern/translations/zh/products/api-def/ferndef/export-openapi.mdx @@ -4,7 +4,7 @@ description: 使用 fern export 命令将 Fern Definition 导出为 OpenAPI 3.1 noindex: true --- -为了防止锁定在 Fern Definition 格式中,您可以随时[使用 `fern export` 命令](/cli-api-reference/cli-reference/commands#fern-export)将您的 API 定义导出为 OpenAPI 3.1。 +为了防止锁定在 Fern Definition 格式中,您可以随时[使用 `fern export` 命令](/learn/cli-api-reference/cli-reference/commands#fern-export)将您的 API 定义导出为 OpenAPI 3.1。 如果您在 `fern/apis/` 文件夹中定义了多个 API,请使用 `--api` 指定要导出的 API。 diff --git a/fern/translations/zh/products/api-def/ferndef/webhooks.mdx b/fern/translations/zh/products/api-def/ferndef/webhooks.mdx index cb480a2745..f7ecc94afc 100644 --- a/fern/translations/zh/products/api-def/ferndef/webhooks.mdx +++ b/fern/translations/zh/products/api-def/ferndef/webhooks.mdx @@ -84,7 +84,7 @@ navigation: - subpackage_api.newPlantWebhook # Format: subpackage_{name-of-api}.{webhook-event-name} ``` -有关如何在 `docs.yml` 中配置 webhook 参考的更多信息,请参阅[生成您的 webhook 参考](/docs/api-references/generate-webhook-ref)。 +有关如何在 `docs.yml` 中配置 webhook 参考的更多信息,请参阅[生成您的 webhook 参考](/learn/docs/api-references/generate-webhook-ref)。 ## SDK 签名验证 diff --git a/fern/translations/zh/products/api-def/grpc/overview.mdx b/fern/translations/zh/products/api-def/grpc/overview.mdx index a894080c2d..07647bd87c 100644 --- a/fern/translations/zh/products/api-def/grpc/overview.mdx +++ b/fern/translations/zh/products/api-def/grpc/overview.mdx @@ -204,7 +204,7 @@ fern/ ``` -在您的 fern 目录中创建一个 `generators.yml` 文件,并添加对您的 gRPC proto 文件的引用。请参见 [gRPC generators.yml 参考](/api-definitions/grpc/generators-yml-reference)以获取完整的配置选项。 +在您的 fern 目录中创建一个 `generators.yml` 文件,并添加对您的 gRPC proto 文件的引用。请参见 [gRPC generators.yml 参考](/learn/api-definitions/grpc/generators-yml-reference)以获取完整的配置选项。 ```yaml title="generators.yml" # Your API definition diff --git a/fern/translations/zh/products/api-def/openapi/automation.mdx b/fern/translations/zh/products/api-def/openapi/automation.mdx index e4bf2b2ee5..6627419704 100644 --- a/fern/translations/zh/products/api-def/openapi/automation.mdx +++ b/fern/translations/zh/products/api-def/openapi/automation.mdx @@ -20,7 +20,7 @@ sidebar-title: 同步您的 OpenAPI 规范 ``` - 在您的仓库中创建 `.github/workflows/sync-openapi.yml`。此操作使用 [`fern api update`](/cli-api-reference/cli-reference/commands#fern-api-update) 从您的 `generators.yml` 文件中的 `origin` 字段拉取最新版本的 OpenAPI 规范。 + 在您的仓库中创建 `.github/workflows/sync-openapi.yml`。此操作使用 [`fern api update`](/learn/cli-api-reference/cli-reference/commands#fern-api-update) 从您的 `generators.yml` 文件中的 `origin` 字段拉取最新版本的 OpenAPI 规范。 ```yml title=".github/workflows/sync-openapi.yml" name: Sync OpenAPI Specs # 可以自定义 diff --git a/fern/translations/zh/products/api-def/openapi/extensions/examples.mdx b/fern/translations/zh/products/api-def/openapi/extensions/examples.mdx index 34b37d95b9..2a1558518f 100644 --- a/fern/translations/zh/products/api-def/openapi/extensions/examples.mdx +++ b/fern/translations/zh/products/api-def/openapi/extensions/examples.mdx @@ -15,7 +15,7 @@ Fern 使用 [AI 生成的示例](/learn/docs/ai-features/ai-examples) 自动生 `x-fern-examples` 是一个数组,其中每个元素可以包含关联的 `path-parameters`、`query-parameters`、`headers`、`request` 和 `response` 值。可选地,添加 `name` 字段为每个示例提供描述性标签。 -如果您[通过 `x-fern-global-headers` 扩展定义了全局标头](/api-definitions/openapi/extensions/global-headers),您必须在示例中包含这些标头。 +如果您[通过 `x-fern-global-headers` 扩展定义了全局标头](/learn/api-definitions/openapi/extensions/global-headers),您必须在示例中包含这些标头。 按以下方式构造 `request` 和 `response`: diff --git a/fern/translations/zh/products/api-def/openapi/extensions/global-headers.mdx b/fern/translations/zh/products/api-def/openapi/extensions/global-headers.mdx index f2ab7cbbfb..71f01a26be 100644 --- a/fern/translations/zh/products/api-def/openapi/extensions/global-headers.mdx +++ b/fern/translations/zh/products/api-def/openapi/extensions/global-headers.mdx @@ -30,7 +30,7 @@ x-fern-global-headers: ``` - 当您使用 `x-fern-global-headers` 定义全局请求头时,您必须[在 `x-fern-examples` 中包含它们](/api-definitions/openapi/extensions/request-response-examples)。 + 当您使用 `x-fern-global-headers` 定义全局请求头时,您必须[在 `x-fern-examples` 中包含它们](/learn/api-definitions/openapi/extensions/request-response-examples)。 ### 默认值 diff --git a/fern/translations/zh/products/api-def/openapi/overview.mdx b/fern/translations/zh/products/api-def/openapi/overview.mdx index d80082ee3a..9e302bc17a 100644 --- a/fern/translations/zh/products/api-def/openapi/overview.mdx +++ b/fern/translations/zh/products/api-def/openapi/overview.mdx @@ -104,8 +104,8 @@ components: 遵循这些最佳实践,确保您的 OpenAPI 规范生成高质量的 SDK 和文档: -- **使用合适的项目结构进行组织。** 按照[项目结构](/api-definitions/overview/project-structure)中的说明,清晰地组织包含您的定义和其他相关文件的目录。 -- **为端点添加 `operationId`。** 为每个端点包含清晰的 `operationId`,以控制在 SDK 中生成的函数名称。(或使用[扩展来自定义组和方法名称](/api-definitions/openapi/extensions/method-names)。) +- **使用合适的项目结构进行组织。** 按照[项目结构](/learn/api-definitions/overview/project-structure)中的说明,清晰地组织包含您的定义和其他相关文件的目录。 +- **为端点添加 `operationId`。** 为每个端点包含清晰的 `operationId`,以控制在 SDK 中生成的函数名称。(或使用[扩展来自定义组和方法名称](/learn/api-definitions/openapi/extensions/method-names)。) - **引用模式而不是内联。** 在 `components/schemas` 部分定义可重用的模式,并使用 `$ref` 引用它们。这促进了一致性,减少了重复,并使维护更容易。 ```yaml title="openapi.yml" {8, 14, 17-25} @@ -135,7 +135,7 @@ components: enum: [available, pending, sold] ``` -- **使用覆盖层和 Fern 扩展进行自定义。** 使用 Fern [扩展](/api-definitions/openapi/extensions/overview)来自定义您的规范,这些扩展保存在[覆盖层文件](/api-definitions/openapi/overlays)中。这使您能够修改生成行为,而不更改核心 OpenAPI 定义。 +- **使用覆盖层和 Fern 扩展进行自定义。** 使用 Fern [扩展](/learn/api-definitions/openapi/extensions/overview)来自定义您的规范,这些扩展保存在[覆盖层文件](/learn/api-definitions/openapi/overlays)中。这使您能够修改生成行为,而不更改核心 OpenAPI 定义。 一旦您的 OpenAPI 规范遵循这些实践,您就可以设置 fern 文件夹了。 diff --git a/fern/translations/zh/products/api-def/openapi/webhooks.mdx b/fern/translations/zh/products/api-def/openapi/webhooks.mdx index 2bd2d345d4..34333d03b9 100644 --- a/fern/translations/zh/products/api-def/openapi/webhooks.mdx +++ b/fern/translations/zh/products/api-def/openapi/webhooks.mdx @@ -124,7 +124,7 @@ navigation: - subpackage_plants.newPlantWebhook # subpackage_{tag}.{webhook-event-name} ``` -有关如何在 `docs.yml` 中配置 webhook 参考的更多信息,请参阅[生成 webhook 参考](/docs/api-references/generate-webhook-ref)。 +有关如何在 `docs.yml` 中配置 webhook 参考的更多信息,请参阅[生成 webhook 参考](/learn/docs/api-references/generate-webhook-ref)。 ## SDK 签名验证 diff --git a/fern/translations/zh/products/api-def/pages/asyncapi-empty.mdx b/fern/translations/zh/products/api-def/pages/asyncapi-empty.mdx index 4fd67a6684..241760434e 100644 --- a/fern/translations/zh/products/api-def/pages/asyncapi-empty.mdx +++ b/fern/translations/zh/products/api-def/pages/asyncapi-empty.mdx @@ -5,4 +5,4 @@ sidebar-title: AsyncAPI 定义重定向页面 --- -此页面为空。请访问 [AsyncAPI 定义](/api-definitions/asyncapi/overview) 页面获取更多信息。 \ No newline at end of file +此页面为空。请访问 [AsyncAPI 定义](/learn/api-definitions/asyncapi/overview) 页面获取更多信息。 \ No newline at end of file diff --git a/fern/translations/zh/products/api-def/pages/ferndef-empty.mdx b/fern/translations/zh/products/api-def/pages/ferndef-empty.mdx index 1e43825603..06a2db457d 100644 --- a/fern/translations/zh/products/api-def/pages/ferndef-empty.mdx +++ b/fern/translations/zh/products/api-def/pages/ferndef-empty.mdx @@ -5,4 +5,4 @@ sidebar-title: Fern 定义重定向页面 --- -此页面为空。请访问 [Fern 定义](/api-definitions/ferndef/overview) 页面获取更多信息。 \ No newline at end of file +此页面为空。请访问 [Fern 定义](/learn/api-definitions/ferndef/overview) 页面获取更多信息。 \ No newline at end of file diff --git a/fern/translations/zh/products/api-def/pages/grpc-empty.mdx b/fern/translations/zh/products/api-def/pages/grpc-empty.mdx index 0c8da60a77..b82a3b6e5f 100644 --- a/fern/translations/zh/products/api-def/pages/grpc-empty.mdx +++ b/fern/translations/zh/products/api-def/pages/grpc-empty.mdx @@ -5,4 +5,4 @@ sidebar-title: gRPC 定义重定向页面 --- -此页面为空。请访问 [gRPC 定义](/api-definitions/grpc/overview) 页面获取更多信息。 \ No newline at end of file +此页面为空。请访问 [gRPC 定义](/learn/api-definitions/grpc/overview) 页面获取更多信息。 \ No newline at end of file diff --git a/fern/translations/zh/products/api-def/pages/openapi-empty.mdx b/fern/translations/zh/products/api-def/pages/openapi-empty.mdx index 37aa061622..53afc6b79c 100644 --- a/fern/translations/zh/products/api-def/pages/openapi-empty.mdx +++ b/fern/translations/zh/products/api-def/pages/openapi-empty.mdx @@ -5,4 +5,4 @@ sidebar-title: OpenAPI 定义重定向页面 --- -此页面为空。请访问 [OpenAPI 定义](/api-definitions/openapi/overview) 页面获取更多信息。 \ No newline at end of file +此页面为空。请访问 [OpenAPI 定义](/learn/api-definitions/openapi/overview) 页面获取更多信息。 \ No newline at end of file diff --git a/fern/translations/zh/products/api-def/pages/openrpc-empty.mdx b/fern/translations/zh/products/api-def/pages/openrpc-empty.mdx index 24938a12c3..b67c095da0 100644 --- a/fern/translations/zh/products/api-def/pages/openrpc-empty.mdx +++ b/fern/translations/zh/products/api-def/pages/openrpc-empty.mdx @@ -5,4 +5,4 @@ sidebar-title: OpenRPC 定义重定向页面 --- -此页面为空。请访问 [OpenRPC 定义](/api-definitions/openrpc/overview) 页面获取更多信息。 \ No newline at end of file +此页面为空。请访问 [OpenRPC 定义](/learn/api-definitions/openrpc/overview) 页面获取更多信息。 \ No newline at end of file diff --git a/fern/translations/zh/products/api-def/pages/overrides.mdx b/fern/translations/zh/products/api-def/pages/overrides.mdx index 77ee9da680..89c99406f5 100644 --- a/fern/translations/zh/products/api-def/pages/overrides.mdx +++ b/fern/translations/zh/products/api-def/pages/overrides.mdx @@ -21,7 +21,7 @@ description: 使用单独的重写文件自定义您的 API 定义。 -在包含您的 API 定义的文件夹中[创建 `overrides.yml` 文件](/cli-api-reference/cli-reference/commands#fern-write-overrides): +在包含您的 API 定义的文件夹中[创建 `overrides.yml` 文件](/learn/cli-api-reference/cli-reference/commands#fern-write-overrides): ```bash {6} fern/ diff --git a/fern/translations/zh/products/api-def/pages/project-structure.mdx b/fern/translations/zh/products/api-def/pages/project-structure.mdx index fdbedb64ea..6c312d00f1 100644 --- a/fern/translations/zh/products/api-def/pages/project-structure.mdx +++ b/fern/translations/zh/products/api-def/pages/project-structure.mdx @@ -6,7 +6,7 @@ description: 描述 Fern 文件夹结构 配置 fern 从 `fern` 文件夹开始,该文件夹包含您的 API 定义、SDK 生成器和 CLI 版本。 -Fern 推荐使用多仓库结构,将您的 fern 文件夹放在源代码仓库中(包含您的 API 定义和生成配置),并[将每个生成的 SDK 放在各自独立的仓库中](/sdks/overview/project-structure)。 +Fern 推荐使用多仓库结构,将您的 fern 文件夹放在源代码仓库中(包含您的 API 定义和生成配置),并[将每个生成的 SDK 放在各自独立的仓库中](/learn/sdks/overview/project-structure)。 ## 目录结构 @@ -40,7 +40,7 @@ Fern 推荐使用多仓库结构,将您的 fern 文件夹放在源代码仓库 ``` - 使用本地安装的 CLI 时,将 `version` 设置为 `"*"`。有关详细信息,请参阅[本地安装 Fern CLI](/cli-api-reference/cli-reference/overview#install-fern-cli-locally)。 + 使用本地安装的 CLI 时,将 `version` 设置为 `"*"`。有关详细信息,请参阅[本地安装 Fern CLI](/learn/cli-api-reference/cli-reference/overview#install-fern-cli-locally)。 ### `generators.yml` @@ -53,18 +53,18 @@ api: - openapi: ./openapi/openapi.yml ``` -对于 SDK 生成,需要 `generators.yml` 文件。添加 `groups` 部分来配置要生成哪些 SDK。有关详细信息,请参阅 [SDK 项目结构](/sdks/overview/project-structure#generatorsyml)。 +对于 SDK 生成,需要 `generators.yml` 文件。添加 `groups` 部分来配置要生成哪些 SDK。有关详细信息,请参阅 [SDK 项目结构](/learn/sdks/overview/project-structure#generatorsyml)。 ### API 定义文件 -对于 [OpenAPI](/api-definitions/openapi/overview)、[AsyncAPI](/api-definitions/asyncapi/overview)、[OpenRPC](/api-definitions/openrpc/overview) 和 [gRPC](/api-definitions/grpc/overview),您将有一个自包含的规范文件。 +对于 [OpenAPI](/learn/api-definitions/openapi/overview)、[AsyncAPI](/learn/api-definitions/asyncapi/overview)、[OpenRPC](/learn/api-definitions/openrpc/overview) 和 [gRPC](/learn/api-definitions/grpc/overview),您将有一个自包含的规范文件。 ## 在何处存储您的 API 定义 管理 API 定义有三种常见方式: - **直接提交到您的 Fern 仓库(推荐)。** 将您的 API 定义文件检入包含 Fern 配置的同一仓库。如果您不在其他地方维护定义,这是最简单的方法。 -- **从源代码仓库同步。** 将您的 API 定义存储在与 API 源代码相同的仓库中,并将更新同步到您的 Fern 仓库。您可以使用 [`fern api update`](/cli-api-reference/cli-reference/commands#fern-api-update) CLI 命令或 [sync-openapi GitHub Action](/learn/api-definitions/openapi/sync-your-open-api-specification) 来自动化此过程。 +- **从源代码仓库同步。** 将您的 API 定义存储在与 API 源代码相同的仓库中,并将更新同步到您的 Fern 仓库。您可以使用 [`fern api update`](/learn/cli-api-reference/cli-reference/commands#fern-api-update) CLI 命令或 [sync-openapi GitHub Action](/learn/api-definitions/openapi/sync-your-open-api-specification) 来自动化此过程。 - **在公共 URL 托管。** 从可公开访问的端点提供定义,并在 `generators.yml` 中配置 [`origin`](/learn/sdks/reference/generators-yml#openapi) 字段,以便 Fern 可以获取它。当您希望有一个多个消费者可以引用的单一权威定义时,这很有用。 ## 多个 API diff --git a/fern/translations/zh/products/api-def/pages/what-is-an-api-definition.mdx b/fern/translations/zh/products/api-def/pages/what-is-an-api-definition.mdx index 1d1240957d..db9a7bd18f 100644 --- a/fern/translations/zh/products/api-def/pages/what-is-an-api-definition.mdx +++ b/fern/translations/zh/products/api-def/pages/what-is-an-api-definition.mdx @@ -269,28 +269,28 @@ Fern 集成了多种 API 定义格式: 多种语言的客户端库,自动与你的 API 保持同步。 包含代码示例和实时测试功能的交互式 API 文档。 } - href="/docs/integrations/postman" + href="/learn/docs/integrations/postman" > 预填充示例请求和响应的即用型集合。 } - href="/api-definitions/openapi/frameworks/fastapi" + href="/learn/api-definitions/openapi/frameworks/fastapi" > 适用于 FastAPI 的 Pydantic 模型或 Spring Boot 应用程序的控制器。 diff --git a/fern/translations/zh/products/cli-api-reference/pages/commands.mdx b/fern/translations/zh/products/cli-api-reference/pages/commands.mdx index 7e5fec6e1b..b1bf2620ee 100644 --- a/fern/translations/zh/products/cli-api-reference/pages/commands.mdx +++ b/fern/translations/zh/products/cli-api-reference/pages/commands.mdx @@ -774,7 +774,7 @@ hideOnThisPage: true - 从 `generators.yml` 中指定的 `origin` 拉取最新的 OpenAPI 规范并更新本地规范。或者,你可以[通过设置 GitHub Action 来自动化此过程](/api-definitions/openapi/sync-your-open-api-specification)。 + 从 `generators.yml` 中指定的 `origin` 拉取最新的 OpenAPI 规范并更新本地规范。或者,你可以[通过设置 GitHub Action 来自动化此过程](/learn/api-definitions/openapi/sync-your-open-api-specification)。 ```bash diff --git a/fern/translations/zh/products/docs/pages/api-references/audiences.mdx b/fern/translations/zh/products/docs/pages/api-references/audiences.mdx index 9a4e7eba22..c7a43688d5 100644 --- a/fern/translations/zh/products/docs/pages/api-references/audiences.mdx +++ b/fern/translations/zh/products/docs/pages/api-references/audiences.mdx @@ -22,7 +22,7 @@ navigation: ## 实例受众群体 -API 参考文档受众群体与[实例受众群体](/docs/configuration/products#add-instance-audiences)协同工作,实例受众群体控制哪些产品和版本出现在每个文档实例中。您可以将两个功能一起使用: +API 参考文档受众群体与[实例受众群体](/learn/docs/configuration/products#add-instance-audiences)协同工作,实例受众群体控制哪些产品和版本出现在每个文档实例中。您可以将两个功能一起使用: - **API 参考文档受众群体** - 控制在 API 参考文档中显示哪些端点和模式 - **实例受众群体** - 控制在每个实例中显示哪些产品和版本 diff --git a/fern/translations/zh/products/docs/pages/api-references/customize-api-ref.mdx b/fern/translations/zh/products/docs/pages/api-references/customize-api-ref.mdx index a82ba0bc68..4bd604f1e7 100644 --- a/fern/translations/zh/products/docs/pages/api-references/customize-api-ref.mdx +++ b/fern/translations/zh/products/docs/pages/api-references/customize-api-ref.mdx @@ -108,7 +108,7 @@ navigation: ``` - 您也可以使用 [`x-displayName` 扩展](/api-definitions/openapi/extensions/tag-display-names)直接在规范(或覆盖文件)中自定义标签显示名称。 + 您也可以使用 [`x-displayName` 扩展](/learn/api-definitions/openapi/extensions/tag-display-names)直接在规范(或覆盖文件)中自定义标签显示名称。 ### 扁平化章节 diff --git a/fern/translations/zh/products/docs/pages/api-references/http-snippets.mdx b/fern/translations/zh/products/docs/pages/api-references/http-snippets.mdx index 69d1c30e5a..d77b26706c 100644 --- a/fern/translations/zh/products/docs/pages/api-references/http-snippets.mdx +++ b/fern/translations/zh/products/docs/pages/api-references/http-snippets.mdx @@ -66,4 +66,4 @@ settings: ``` -这会从选择器中移除除 cURL 之外的所有 HTTP 代码片段语言。cURL 始终显示,无法通过 `docs.yml` 配置移除。要隐藏 cURL,请[使用自定义 CSS](/docs/customization/custom-css-js#custom-css)。 +这会从选择器中移除除 cURL 之外的所有 HTTP 代码片段语言。cURL 始终显示,无法通过 `docs.yml` 配置移除。要隐藏 cURL,请[使用自定义 CSS](/learn/docs/customization/custom-css-js#custom-css)。 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/badges.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/badges.mdx index f2e0ed3792..91bd103bb8 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/badges.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/badges.mdx @@ -5,7 +5,7 @@ sidebar-title: 徽章组件 --- -使用 `` 组件来显示小块信息,例如状态指示器、类别、版本或发布日期。要显示更长的注释,请使用[标注](/docs/writing-content/components/callouts)。 +使用 `` 组件来显示小块信息,例如状态指示器、类别、版本或发布日期。要显示更长的注释,请使用[标注](/learn/docs/writing-content/components/callouts)。 ## 用法 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/callouts.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/callouts.mdx index 091c2aa367..79b9872ab9 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/callouts.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/callouts.mdx @@ -6,7 +6,7 @@ sidebar-title: 提示框组件 `` 组件用于在文档中突出显示重要信息、警告或提示。使用提示框来强调读者不应错过的关键细节,如破坏性更改、先决条件或有用的最佳实践。 -要显示非常简短的信息(如状态指示器和版本号),请使用[标记](/docs/writing-content/components/badges)。 +要显示非常简短的信息(如状态指示器和版本号),请使用[标记](/learn/docs/writing-content/components/badges)。 ## 使用方法 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/code-blocks.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/code-blocks.mdx index 9bd7a9911e..d390606edf 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/code-blocks.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/code-blocks.mdx @@ -544,7 +544,7 @@ garden = store.getGarden(garden_id="456")
- 代码块会自动与[相同语言的标签页](/docs/writing-content/components/tabs#language-synchronization)同步。 + 代码块会自动与[相同语言的标签页](/learn/docs/writing-content/components/tabs#language-synchronization)同步。 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/files.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/files.mdx index 685918235d..11a8851366 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/files.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/files.mdx @@ -101,10 +101,10 @@ sidebar-title: 文件组件
- - - - + + + + diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/overview.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/overview.mdx index e8c36f3f2f..e4271e3ffc 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/overview.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/overview.mdx @@ -11,84 +11,84 @@ Fern 包含 26 个内置组件,用于创建交互式文档。选择下面的 用于常见问题和可折叠内容的可展开部分 为段落、表格和其他内容提供可链接的锚点 定位在页面右侧的内容粘性容器 用于状态、版本和元数据的小标签 具有多种变体和意图的交互式按钮组件 用于重要信息、警告和提示的突出显示框 带有可选图标和链接的视觉上独特的框 具有语法高亮和交互功能的代码示例 使文本可通过点击复制按钮进行复制 下载 PDF 和其他资源 来自您的 API 参考的端点请求片段 来自您的 API 参考的端点响应片段 @@ -102,91 +102,91 @@ Fern 包含 26 个内置组件,用于创建交互式文档。选择下面的 显示带有可展开文件夹的交互式文件树结构 带有可选标题和背景的图像容器 用于视觉元素的 Font Awesome 图标 根据实例、产品、版本或用户角色显示或隐藏内容 为嵌套内容提供缩进和引导线的视觉层次结构 具有一致格式的 API 参数文档 用于测试 API 端点的交互式请求构建器 显示来自您的 API 参考的任何类型定义 具有自动编号和锚点链接的顺序指令 在行和列中显示数据,带有可选的粘性标题 用于组织相关内容的选项卡界面 在悬停时显示的附加信息 根据版本选择显示不同内容 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/tabs.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/tabs.mdx index 7ab84a7a32..59dfa41f31 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/tabs.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/tabs.mdx @@ -108,7 +108,7 @@ description: 标签页组件支持以分页视图展示相关内容,并可在 - 启用了语言的标签页会自动与 [相同语言的代码块](/docs/writing-content/components/code-blocks#language-synchronization) 同步。 + 启用了语言的标签页会自动与 [相同语言的代码块](/learn/docs/writing-content/components/code-blocks#language-synchronization) 同步。 diff --git a/fern/translations/zh/products/docs/pages/customization/announcement-banner.mdx b/fern/translations/zh/products/docs/pages/customization/announcement-banner.mdx index 48614e6753..a20e32a311 100644 --- a/fern/translations/zh/products/docs/pages/customization/announcement-banner.mdx +++ b/fern/translations/zh/products/docs/pages/customization/announcement-banner.mdx @@ -11,7 +11,7 @@ announcement: message: "🚀 新功能:公告功能已上线!(了解更多) 🚀" ``` -公告消息支持 Markdown 和 HTML。您可以包含链接、图片和其他格式。可以使用[自定义 CSS](/docs/customization/custom-css-js#custom-css) 来自定义公告的样式。 +公告消息支持 Markdown 和 HTML。您可以包含链接、图片和其他格式。可以使用[自定义 CSS](/learn/docs/customization/custom-css-js#custom-css) 来自定义公告的样式。 ## 在多个级别配置公告 diff --git a/fern/translations/zh/products/docs/pages/customization/custom-css-js.mdx b/fern/translations/zh/products/docs/pages/customization/custom-css-js.mdx index d9daeb74f4..ceda05e937 100644 --- a/fern/translations/zh/products/docs/pages/customization/custom-css-js.mdx +++ b/fern/translations/zh/products/docs/pages/customization/custom-css-js.mdx @@ -13,7 +13,7 @@ sidebar-title: 完全自定义文档 对于 MDX 内容中的服务端渲染可重用元素,请参阅 [自定义 React 组件](/learn/docs/customization/custom-react-components)。要替换 Fern 的默认页眉或页脚,请参阅 [自定义页眉和页脚](/learn/docs/customization/header-and-footer)。 -你也可以[直接在 `docs.yml` 文件中自定义许多内容](/docs/configuration/site-level-settings),包括颜色、排版、导航栏链接、布局、分析和元数据。在添加自定义代码之前,请先尝试这些内置选项。 +你也可以[直接在 `docs.yml` 文件中自定义许多内容](/learn/docs/configuration/site-level-settings),包括颜色、排版、导航栏链接、布局、分析和元数据。在添加自定义代码之前,请先尝试这些内置选项。 ## 自定义 CSS @@ -417,5 +417,5 @@ js: ### 常见用例 - **第三方集成:** 对于 `docs.yml` 中不原生支持的工具,通过将嵌入代码片段粘贴到自定义 JS 文件中来添加分析、会话录制、支持小部件或标签管理器。参阅 [集成第三方工具](/learn/docs/integrations/overview#connect-other-integrations-via-custom-javascript) 获取支持的工具和示例。 -- **自定义搜索:** 实现自定义搜索(还需要[你的 Algolia 凭据](/docs/customization/search)) +- **自定义搜索:** 实现自定义搜索(还需要[你的 Algolia 凭据](/learn/docs/customization/search)) - **脚本和小部件:** 插入任何客户端脚本或可嵌入的小部件 \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/customization/custom-header-footer.mdx b/fern/translations/zh/products/docs/pages/customization/custom-header-footer.mdx index 407d865e4f..dd4a97ab0a 100644 --- a/fern/translations/zh/products/docs/pages/customization/custom-header-footer.mdx +++ b/fern/translations/zh/products/docs/pages/customization/custom-header-footer.mdx @@ -95,14 +95,14 @@ export default function CustomHeader({ Fern }) { | 组件 | 描述 | | --- | --- | -| `` | 您在 `docs.yml` 中配置的网站[标志](/docs/configuration/site-level-settings#logo-configuration)。链接到主页。您可以使用 `document.querySelector('#fern-header [data-fern-logo]')` 来定位此组件。 | -| `` | [搜索](/docs/customization/search)栏,如果启用的话包括 AI 搜索触发器。 | -| `` | 用于在[产品](/docs/configuration/products)之间切换的下拉菜单。 | -| `` | 用于在[版本](/docs/configuration/versions)之间切换的下拉菜单。 | -| `` | 用于切换活动 [SDK 语言](/docs/configuration/site-level-settings#default-language)的下拉菜单。 | -| `` | 在 `docs.yml` 的 `navbar-links` 下配置的[导航链接](/docs/configuration/site-level-settings#navbar-links-configuration)。 | -| `` | [身份验证文档](/docs/authentication/overview)的登录/注册按钮。 | -| `` | 在[明暗模式](/docs/configuration/site-level-settings#theme-configuration)之间切换。 | +| `` | 您在 `docs.yml` 中配置的网站[标志](/learn/docs/configuration/site-level-settings#logo-configuration)。链接到主页。您可以使用 `document.querySelector('#fern-header [data-fern-logo]')` 来定位此组件。 | +| `` | [搜索](/learn/docs/customization/search)栏,如果启用的话包括 AI 搜索触发器。 | +| `` | 用于在[产品](/learn/docs/configuration/products)之间切换的下拉菜单。 | +| `` | 用于在[版本](/learn/docs/configuration/versions)之间切换的下拉菜单。 | +| `` | 用于切换活动 [SDK 语言](/learn/docs/configuration/site-level-settings#default-language)的下拉菜单。 | +| `` | 在 `docs.yml` 的 `navbar-links` 下配置的[导航链接](/learn/docs/configuration/site-level-settings#navbar-links-configuration)。 | +| `` | [身份验证文档](/learn/docs/authentication/overview)的登录/注册按钮。 | +| `` | 在[明暗模式](/learn/docs/configuration/site-level-settings#theme-configuration)之间切换。 | | `` | Fern 内置的移动端侧边栏切换按钮。显示汉堡包/关闭图标并打开可关闭的侧边栏。仅在移动端视口上可见。 | diff --git a/fern/translations/zh/products/docs/pages/customization/custom-react-components.mdx b/fern/translations/zh/products/docs/pages/customization/custom-react-components.mdx index dd8b7a62a4..bbc5f5bd16 100644 --- a/fern/translations/zh/products/docs/pages/customization/custom-react-components.mdx +++ b/fern/translations/zh/products/docs/pages/customization/custom-react-components.mdx @@ -8,7 +8,7 @@ sidebar-title: 自定义 React 组件 您可以通过添加自定义 React 组件来扩展 Fern 的内置组件库。这允许您创建符合文档需求的独特交互式元素。组件采用服务端渲染,具有更好的 SEO 和性能表现,且不会出现布局偏移。 - 不要使用 React 组件来定义常量。请考虑使用[可重用片段](/docs/writing-content/reusable-snippets)。 + 不要使用 React 组件来定义常量。请考虑使用[可重用片段](/learn/docs/writing-content/reusable-snippets)。 ## MDX 中的自定义组件 diff --git a/fern/translations/zh/products/docs/pages/getting-started/overview.mdx b/fern/translations/zh/products/docs/pages/getting-started/overview.mdx index aacf05998f..b2265844b1 100644 --- a/fern/translations/zh/products/docs/pages/getting-started/overview.mdx +++ b/fern/translations/zh/products/docs/pages/getting-started/overview.mdx @@ -17,7 +17,7 @@ sidebar-title: Fern 文档

通过导入您现有的样式和规范来快速构建文档网站。

- +
快速开始 @@ -34,7 +34,7 @@ sidebar-title: Fern 文档
- +
轻松配置 @@ -56,7 +56,7 @@ sidebar-title: Fern 文档

构建您自己的组件,启用 Ask Fern,生成 API 参考,并轻松更新您的文档。

-
+
灵活的组件库 @@ -73,7 +73,7 @@ sidebar-title: Fern 文档
- +
Fern Editor @@ -90,7 +90,7 @@ sidebar-title: Fern 文档
- +
API 规范 @@ -107,7 +107,7 @@ sidebar-title: Fern 文档
- +
AI 功能 @@ -124,7 +124,7 @@ sidebar-title: Fern 文档
- +
自托管您的文档 @@ -150,16 +150,16 @@ sidebar-title: Fern 文档 通过导入您现有的样式和规范来构建文档网站。 -- [快速开始](/docs/getting-started/quickstart):在 5 分钟内建立一个文档网站。 -- [轻松配置](/docs/configuration/site-level-settings):使用一个简单的文件生成符合您品牌的文档。 +- [快速开始](/learn/docs/getting-started/quickstart):在 5 分钟内建立一个文档网站。 +- [轻松配置](/learn/docs/configuration/site-level-settings):使用一个简单的文件生成符合您品牌的文档。 ## 功能特性 构建您自己的组件,启用 Ask Fern,生成 API 参考,并更新您的文档。 -- [灵活的组件库](/docs/writing-content/components/overview):使用预构建或自定义 React 组件获得精美外观。 -- [Fern Editor](/docs/writing-content/fern-editor):无需编写代码即可修改您的文档并发布到 GitHub。 -- [使用您自己的 API 规范](/docs/api-references/generate-api-ref):支持 OpenAPI、AsyncAPI、gRPC、OpenRPC 和 Fern 规范。 -- [AI 功能](/docs/ai-features/overview):AI 原生功能,包括 Ask Fern 和 AI 生成的示例。 -- [自托管您的文档](/docs/self-hosted/overview):在您自己的基础设施上部署,满足安全或合规要求。 +- [灵活的组件库](/learn/docs/writing-content/components/overview):使用预构建或自定义 React 组件获得精美外观。 +- [Fern Editor](/learn/docs/writing-content/fern-editor):无需编写代码即可修改您的文档并发布到 GitHub。 +- [使用您自己的 API 规范](/learn/docs/api-references/generate-api-ref):支持 OpenAPI、AsyncAPI、gRPC、OpenRPC 和 Fern 规范。 +- [AI 功能](/learn/docs/ai-features/overview):AI 原生功能,包括 Ask Fern 和 AI 生成的示例。 +- [自托管您的文档](/learn/docs/self-hosted/overview):在您自己的基础设施上部署,满足安全或合规要求。 \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/getting-started/project-structure.mdx b/fern/translations/zh/products/docs/pages/getting-started/project-structure.mdx index 0c5b2344d2..8ffc0ed3d1 100644 --- a/fern/translations/zh/products/docs/pages/getting-started/project-structure.mdx +++ b/fern/translations/zh/products/docs/pages/getting-started/project-structure.mdx @@ -60,7 +60,7 @@ description: Fern 文档项目的文件和文件夹结构概述 `docs.yml` 文件是你的 Fern 文档站点的核心。此配置文件控制文档的导航结构、视觉设计、网站功能和托管设置。只有在 `docs.yml` 导航中引用的文件(或通过[`folder` 配置](/learn/docs/configuration/navigation#auto-populate-from-folder)发现的文件)才会包含在构建中——任何未引用的文件都会被忽略。 -有关完整的配置选项,请参阅 [`docs.yml` 参考](/docs/configuration/site-level-settings)。 +有关完整的配置选项,请参阅 [`docs.yml` 参考](/learn/docs/configuration/site-level-settings)。 ```yml @@ -118,9 +118,9 @@ css: styles.css ## API 定义和 `generators.yml` -要生成 [API 参考](/docs/api-references/generate-api-ref) 文档,你需要提供你的 API 定义。OpenAPI 和 AsyncAPI 规范需要一个带有 `api.specs` 部分的 `generators.yml` 文件。你可以选择性地添加一个 `groups` 部分用于 SDK 生成。 +要生成 [API 参考](/learn/docs/api-references/generate-api-ref) 文档,你需要提供你的 API 定义。OpenAPI 和 AsyncAPI 规范需要一个带有 `api.specs` 部分的 `generators.yml` 文件。你可以选择性地添加一个 `groups` 部分用于 SDK 生成。 -同时使用 Fern 进行 API 参考文档和 SDK?你将使用 `docs.yml` 进行文档设置,使用 `generators.yml` 配置 API 参考中的 [SDK 代码片段](/docs/api-references/sdk-snippets)。 +同时使用 Fern 进行 API 参考文档和 SDK?你将使用 `docs.yml` 进行文档设置,使用 `generators.yml` 配置 API 参考中的 [SDK 代码片段](/learn/docs/api-references/sdk-snippets)。 @@ -185,5 +185,5 @@ css: styles.css ``` - 当使用本地安装的 CLI 时,将 `version` 设置为 `"*"`。有关详细信息,请参阅 [本地安装 Fern CLI](/cli-api-reference/cli-reference/overview#install-fern-cli-locally)。 + 当使用本地安装的 CLI 时,将 `version` 设置为 `"*"`。有关详细信息,请参阅 [本地安装 Fern CLI](/learn/cli-api-reference/cli-reference/overview#install-fern-cli-locally)。 diff --git a/fern/translations/zh/products/docs/pages/getting-started/quickstart.mdx b/fern/translations/zh/products/docs/pages/getting-started/quickstart.mdx index d1ae0a6504..618c71928b 100644 --- a/fern/translations/zh/products/docs/pages/getting-started/quickstart.mdx +++ b/fern/translations/zh/products/docs/pages/getting-started/quickstart.mdx @@ -218,7 +218,7 @@ This guide covers the CLI path. A browser-based guided setup also exists at http - 在发布之前,在本地开发环境中[预览您的更改](/docs/preview-publish/preview-changes)或生成可共享的预览链接。 + 在发布之前,在本地开发环境中[预览您的更改](/learn/docs/preview-publish/preview-changes)或生成可共享的预览链接。 diff --git a/fern/translations/zh/products/docs/pages/integrations/overview.mdx b/fern/translations/zh/products/docs/pages/integrations/overview.mdx index 93170d64c5..e6aff43031 100644 --- a/fern/translations/zh/products/docs/pages/integrations/overview.mdx +++ b/fern/translations/zh/products/docs/pages/integrations/overview.mdx @@ -9,7 +9,7 @@ description: 将分析和支持工具连接到您的 Fern 文档。设置 PostHo } iconSize={12} @@ -17,7 +17,7 @@ description: 将分析和支持工具连接到您的 Fern 文档。设置 PostHo @@ -27,7 +27,7 @@ description: 将分析和支持工具连接到您的 Fern 文档。设置 PostHo } iconSize={12} @@ -35,7 +35,7 @@ description: 将分析和支持工具连接到您的 Fern 文档。设置 PostHo } iconSize={12} @@ -43,7 +43,7 @@ description: 将分析和支持工具连接到您的 Fern 文档。设置 PostHo } iconSize={12} @@ -51,7 +51,7 @@ description: 将分析和支持工具连接到您的 Fern 文档。设置 PostHo } iconSize={12} @@ -102,7 +102,7 @@ analytics: -对于 Fern 在 `docs.yml` 中没有原生支持的第三方工具,只要它们支持基于 HTML 标签的安装方式,您都可以通过 [自定义 JavaScript](/docs/customization/custom-css-js#custom-javascript) 进行集成。这适用于以下工具: +对于 Fern 在 `docs.yml` 中没有原生支持的第三方工具,只要它们支持基于 HTML 标签的安装方式,您都可以通过 [自定义 JavaScript](/learn/docs/customization/custom-css-js#custom-javascript) 进行集成。这适用于以下工具: - **分析:** Amplitude、Heap、Plausible - **会话录制:** Hotjar、LogRocket、Microsoft Clarity diff --git a/fern/translations/zh/products/docs/pages/navigation/frontmatter.mdx b/fern/translations/zh/products/docs/pages/navigation/frontmatter.mdx index 50b9dfe03d..160748f535 100644 --- a/fern/translations/zh/products/docs/pages/navigation/frontmatter.mdx +++ b/fern/translations/zh/products/docs/pages/navigation/frontmatter.mdx @@ -8,7 +8,7 @@ sidebar-title: 认证 您可以选择使用前置事项来设置每个页面的标题、完整路径覆盖、元描述、建议编辑页面的 URL 以及 OpenGraph 图片。您还可以使用前置事项来禁用某些页面元素,如目录、页面反馈和页面操作。 - 对于超出前置事项选项的高级样式和功能自定义,请参见 [自定义 CSS 和 JavaScript](/docs/customization/custom-css-js)。 + 对于超出前置事项选项的高级样式和功能自定义,请参见 [自定义 CSS 和 JavaScript](/learn/docs/customization/custom-css-js)。 ## 前置事项语法 @@ -483,7 +483,7 @@ availability: beta ## 更新日志标签 - 仅用于 [更新日志页面](/docs/configuration/changelogs)。标签允许用户按特定类别过滤更新日志条目。在前置事项中将标签定义为字符串数组。 + 仅用于 [更新日志页面](/learn/docs/configuration/changelogs)。标签允许用户按特定类别过滤更新日志条目。在前置事项中将标签定义为字符串数组。 \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/navigation/products.mdx b/fern/translations/zh/products/docs/pages/navigation/products.mdx index 2856c463e7..409e48fdcb 100644 --- a/fern/translations/zh/products/docs/pages/navigation/products.mdx +++ b/fern/translations/zh/products/docs/pages/navigation/products.mdx @@ -179,7 +179,7 @@ products: 您可以选择为内部产品添加版本。版本化和非版本化的产品可以在您的站点中并存。外部产品不支持版本。 -关于不使用产品的独立版本控制,请参阅我们的[版本控制指南](/docs/configuration/versions)。 +关于不使用产品的独立版本控制,请参阅我们的[版本控制指南](/learn/docs/configuration/versions)。 在下面的示例中,产品 A 是**非版本化的**,产品 B 是**版本化的**: @@ -273,7 +273,7 @@ versions: ### 添加实例受众 -通过为版本和/或产品标记受众,控制哪些版本和/或产品出现在每个[文档实例](/docs/configuration/site-level-settings#instances-configuration)中。这使得可以为不同用户群体(例如,内部开发者、beta 测试者、公共客户)提供单独的站点。 +通过为版本和/或产品标记受众,控制哪些版本和/或产品出现在每个[文档实例](/learn/docs/configuration/site-level-settings#instances-configuration)中。这使得可以为不同用户群体(例如,内部开发者、beta 测试者、公共客户)提供单独的站点。 内容根据受众标签进行过滤: @@ -316,7 +316,7 @@ products: -实例受众与 [API 参考受众](/docs/api-references/audiences)一起工作,后者过滤 API 文档中的端点和模式。您可以同时使用这两个功能: +实例受众与 [API 参考受众](/learn/docs/api-references/audiences)一起工作,后者过滤 API 文档中的端点和模式。您可以同时使用这两个功能: - **实例受众** - 控制哪些产品和版本出现在每个实例中 - **API 参考受众** - 控制哪些端点和模式出现在 API 参考中 diff --git a/fern/translations/zh/products/docs/pages/navigation/site-level-settings.mdx b/fern/translations/zh/products/docs/pages/navigation/site-level-settings.mdx index a23c8b2edd..8e95fe38b0 100644 --- a/fern/translations/zh/products/docs/pages/navigation/site-level-settings.mdx +++ b/fern/translations/zh/products/docs/pages/navigation/site-level-settings.mdx @@ -5,7 +5,7 @@ description: "了解如何使用 docs.yml 文件配置您的 Fern 文档网站 max-toc-depth: 2 --- -`docs.yml` 文件是您在文档网站中自定义颜色、字体、布局、分析等的主要工具。对于大多数自定义需求,请从这里开始,然后再考虑[自定义 CSS 和 JavaScript](/docs/customization/custom-css-js) 来满足高级使用场景。 +`docs.yml` 文件是您在文档网站中自定义颜色、字体、布局、分析等的主要工具。对于大多数自定义需求,请从这里开始,然后再考虑[自定义 CSS 和 JavaScript](/learn/docs/customization/custom-css-js) 来满足高级使用场景。 ### YAML 架构验证 @@ -147,7 +147,7 @@ instances: 指定此实例服务的受众(例如,内部开发者、测试用户、公共客户)。 - 您可以使用受众来控制每个文档实例中显示哪些版本和产品,从而为不同用户群体创建单独的网站。当内容的受众标签与实例受众匹配时,内容会被包含。没有受众标签的内容默认包含。了解更多关于为[产品和/或版本](/docs/configuration/products#add-instance-audiences)配置实例受众的信息。 + 您可以使用受众来控制每个文档实例中显示哪些版本和产品,从而为不同用户群体创建单独的网站。当内容的受众标签与实例受众匹配时,内容会被包含。没有受众标签的内容默认包含。了解更多关于为[产品和/或版本](/learn/docs/configuration/products#add-instance-audiences)配置实例受众的信息。 @@ -739,7 +739,7 @@ settings: - 控制 [API 参考中 HTTP 片段](/docs/api-references/http-snippets)的显示。默认情况下为所有语言启用 HTTP 片段。 + 控制 [API 参考中 HTTP 片段](/learn/docs/api-references/http-snippets)的显示。默认情况下为所有语言启用 HTTP 片段。 - 设置为 `false` 以完全禁用 HTTP 片段 - 提供语言列表以仅为特定语言启用片段 @@ -985,7 +985,7 @@ landing-page: 配置网站范围的 Open Graph 和 Twitter Card 元数据,控制您的文档在社交媒体预览和搜索结果中的显示方式。 - [在页面的 frontmatter 中使用 `keywords` 属性](/docs/configuration/page-level-settings#seo-metadata)。 + [在页面的 frontmatter 中使用 `keywords` 属性](/learn/docs/configuration/page-level-settings#seo-metadata)。 ```yaml docs.yml diff --git a/fern/translations/zh/products/docs/pages/navigation/versions.mdx b/fern/translations/zh/products/docs/pages/navigation/versions.mdx index f1469bd312..618511398c 100644 --- a/fern/translations/zh/products/docs/pages/navigation/versions.mdx +++ b/fern/translations/zh/products/docs/pages/navigation/versions.mdx @@ -45,7 +45,7 @@ fern/ -您也可以有[多个产品,一些有版本,一些没有版本](/docs/configuration/products)。 +您也可以有[多个产品,一些有版本,一些没有版本](/learn/docs/configuration/products)。 @@ -120,7 +120,7 @@ versions: -通过为版本打上受众标签,控制哪些版本显示在每个[文档实例](/docs/configuration/site-level-settings#instances-configuration)中。这使得可以为不同的用户群体(例如,内部开发者、beta 测试人员、公共客户)创建单独的站点。 +通过为版本打上受众标签,控制哪些版本显示在每个[文档实例](/learn/docs/configuration/site-level-settings#instances-configuration)中。这使得可以为不同的用户群体(例如,内部开发者、beta 测试人员、公共客户)创建单独的站点。 内容基于受众标签进行过滤: diff --git a/fern/translations/zh/products/docs/pages/preview-publish/publishing-your-docs.mdx b/fern/translations/zh/products/docs/pages/preview-publish/publishing-your-docs.mdx index 2409c1c425..3b32408259 100644 --- a/fern/translations/zh/products/docs/pages/preview-publish/publishing-your-docs.mdx +++ b/fern/translations/zh/products/docs/pages/preview-publish/publishing-your-docs.mdx @@ -183,11 +183,11 @@ jobs: ## 托管 -当您发布文档时,Fern 会为您托管它们。您也可以[将文档发布到自定义域名](/docs/preview-publish/setting-up-your-domain)。 +当您发布文档时,Fern 会为您托管它们。您也可以[将文档发布到自定义域名](/learn/docs/preview-publish/setting-up-your-domain)。 ### 自托管您的文档 -如果您需要离线访问文档或想在自己的服务器上托管文档,Fern [也提供该选项](/docs/self-hosted/overview)。自托管文档对某些功能的访问受限(包括 Ask Fern 和分析功能)。 +如果您需要离线访问文档或想在自己的服务器上托管文档,Fern [也提供该选项](/learn/docs/self-hosted/overview)。自托管文档对某些功能的访问受限(包括 Ask Fern 和分析功能)。 ## 取消发布您的文档 diff --git a/fern/translations/zh/products/docs/pages/seo/redirects.mdx b/fern/translations/zh/products/docs/pages/seo/redirects.mdx index f3b79aea6c..09cde0ddb2 100644 --- a/fern/translations/zh/products/docs/pages/seo/redirects.mdx +++ b/fern/translations/zh/products/docs/pages/seo/redirects.mdx @@ -74,7 +74,7 @@ redirects: destination: / # 不要这样做 ``` -相反,[在您的 `docs.yml` 中启用自动主页重定向](/docs/configuration/site-level-settings#settings-configuration),将损坏的链接发送到您的主页,而不是显示 404 页面: +相反,[在您的 `docs.yml` 中启用自动主页重定向](/learn/docs/configuration/site-level-settings#settings-configuration),将损坏的链接发送到您的主页,而不是显示 404 页面: ```yaml title="docs.yml" settings: @@ -84,7 +84,7 @@ settings: -如果您配置了[版本](/docs/configuration/versions),您的默认版本使用无版本路径(`/docs/getting-started`),而其他版本使用有版本路径(`/docs/v2/getting-started`)。Fern 通过将损坏的有版本链接重定向到默认版本并管理规范 URL 来自动处理版本路由。 +如果您配置了[版本](/learn/docs/configuration/versions),您的默认版本使用无版本路径(`/docs/getting-started`),而其他版本使用有版本路径(`/docs/v2/getting-started`)。Fern 通过将损坏的有版本链接重定向到默认版本并管理规范 URL 来自动处理版本路由。 避免从无版本 URL 重定向到有版本 URL: diff --git a/fern/translations/zh/products/home/pages/welcome.mdx b/fern/translations/zh/products/home/pages/welcome.mdx index 550b04424b..32f43f228b 100644 --- a/fern/translations/zh/products/home/pages/welcome.mdx +++ b/fern/translations/zh/products/home/pages/welcome.mdx @@ -31,7 +31,7 @@ layout: custom {/* SDKs Card */}
- + SDK Arrow right light Arrow right light @@ -52,37 +52,37 @@ layout: custom
开始使用: {/* TypeScript */} - + TypeScript {/* Python */} - + Python {/* Go */} - + Go {/* Java */} - + Java {/* C# */} - + C# {/* PHP */} - + PHP {/* Ruby */} Ruby - + Swift - + Rust Rust @@ -90,12 +90,12 @@ layout: custom {/* Action Buttons */}
- + 介绍 Arrow right light Arrow right light - + 快速开始 Arrow right light Arrow right light @@ -111,7 +111,7 @@ layout: custom {/* Docs Card */}
{/* Rive Animation */} - +
- + Github Preview Github Preview

OpenAPI

- + Github Preview Github Preview

AsyncAPI

- + Github Preview Github Preview

OpenRPC

- + Github Preview Github Preview @@ -267,42 +267,42 @@ layout: custom 查看我们最新的产品更新。

- + Docs - + TypeScript {/* Python */} - + Python {/* Go */} - + Go {/* Java */} - + Java {/* C# */} - + C# {/* PHP */} - + PHP {/* Ruby */} - + Ruby {/* Swift */} - + Swift {/* Rust */} - + Rust Rust @@ -384,23 +384,23 @@ layout: custom Generate client libraries in multiple languages. -Get started with: [TypeScript](/sdks/generators/typescript/quickstart), [Python](/sdks/generators/python/quickstart), [Go](/sdks/generators/go/quickstart), [Java](/sdks/generators/java/quickstart), [C#](/sdks/generators/csharp/quickstart), [PHP](/sdks/generators/php/quickstart), [Ruby](/learn/sdks/generators/ruby/quickstart), [Swift](/sdks/generators/swift/quickstart), [Rust](/sdks/generators/rust/quickstart) +Get started with: [TypeScript](/learn/sdks/generators/typescript/quickstart), [Python](/learn/sdks/generators/python/quickstart), [Go](/learn/sdks/generators/go/quickstart), [Java](/learn/sdks/generators/java/quickstart), [C#](/learn/sdks/generators/csharp/quickstart), [PHP](/learn/sdks/generators/php/quickstart), [Ruby](/learn/sdks/generators/ruby/quickstart), [Swift](/learn/sdks/generators/swift/quickstart), [Rust](/learn/sdks/generators/rust/quickstart) -- [Introduction](/sdks/overview/introduction) -- [Quickstart](/sdks/overview/quickstart) +- [Introduction](/learn/sdks/overview/introduction) +- [Quickstart](/learn/sdks/overview/quickstart) - [Customers](https://buildwithfern.com/showcase) ## Docs A beautiful, interactive documentation website. -- [Introduction](/docs/getting-started/overview) -- [Quickstart](/docs/getting-started/quickstart) -- [AI features](/docs/ai-features/overview) -- [Fern Editor](/docs/writing-content/fern-editor) -- [Bring your own API spec](/docs/api-references/generate-api-ref) -- [Control role-based access](/docs/authentication/features/rbac) -- [Self-host your docs](/docs/self-hosted/overview) +- [Introduction](/learn/docs/getting-started/overview) +- [Quickstart](/learn/docs/getting-started/quickstart) +- [AI features](/learn/docs/ai-features/overview) +- [Fern Editor](/learn/docs/writing-content/fern-editor) +- [Bring your own API spec](/learn/docs/api-references/generate-api-ref) +- [Control role-based access](/learn/docs/authentication/features/rbac) +- [Self-host your docs](/learn/docs/self-hosted/overview) - [Customers](https://buildwithfern.com/showcase#docs-customers.alldocs-features) ## Ask Fern @@ -415,14 +415,14 @@ AI search to find answers in your documentation instantly. Select one or more specs to generate SDKs and Docs. -- [OpenAPI](/api-definitions/openapi/overview) -- [AsyncAPI](/api-definitions/asyncapi/overview) -- [OpenRPC](/api-definitions/openrpc/overview) -- [gRPC](/api-definitions/grpc/overview) +- [OpenAPI](/learn/api-definitions/openapi/overview) +- [AsyncAPI](/learn/api-definitions/asyncapi/overview) +- [OpenRPC](/learn/api-definitions/openrpc/overview) +- [gRPC](/learn/api-definitions/grpc/overview) ## Community -- [Changelog](/docs/changelog): See the most recent product updates. +- [Changelog](/learn/docs/changelog): See the most recent product updates. - [GitHub](https://github.com/fern-api/fern): Follow progress and contribute to the codebase. - [X](https://x.com/buildwithfern): Get updates on the Fern platform. diff --git a/fern/translations/zh/products/sdks/capabilities.mdx b/fern/translations/zh/products/sdks/capabilities.mdx index e9f778b96d..e56e68c0ec 100644 --- a/fern/translations/zh/products/sdks/capabilities.mdx +++ b/fern/translations/zh/products/sdks/capabilities.mdx @@ -27,7 +27,7 @@ layout: overview - + 精细调整 SDK 资源和方法名称

@@ -40,7 +40,7 @@ layout: overview - + 当负载与您的模式不符时快速失败

@@ -52,7 +52,7 @@ layout: overview

- + Fern SDK 包含对判别联合的支持

@@ -96,7 +96,7 @@ layout: overview - + 通过偏移量、游标和基于链接的分页轻松浏览 API 响应。

@@ -109,7 +109,7 @@ layout: overview - + Fern 将 OAuth 作为一等公民支持

@@ -122,7 +122,7 @@ layout: overview - + 使用指数退避算法自动重试失败的请求

@@ -148,7 +148,7 @@ layout: overview - + 内置防止重复提交的保护

@@ -161,7 +161,7 @@ layout: overview - + 从服务器向客户端流式传输 JSON 数据(如聊天补全)

@@ -174,7 +174,7 @@ layout: overview - + 自动生成和手写测试,确保您的 SDK 在生产环境中正常工作

@@ -187,7 +187,7 @@ layout: overview - + 不再依赖手动编写的代码片段

@@ -200,7 +200,7 @@ layout: overview - + 扩展生成的 SDK 以提供额外功能

@@ -213,7 +213,7 @@ layout: overview - + 多个 API 定义,一个 SDK。

@@ -226,7 +226,7 @@ layout: overview - + 通过 WebSockets 发送和接收消息

@@ -247,21 +247,21 @@ Fern SDK 包含以下功能特性: - **强类型**:通过类型安全快速开发而不出错。 - **IDE 支持**:在编辑器中提供丰富的自动补全和内联文档。[了解更多](/learn/sdks/deep-dives/sdk-user-features#ide-support-and-intellisense) -- **惯用方法名**:精细调整 SDK 资源和方法名称。[了解更多](/sdks/deep-dives/customize-method-names) -- **模式验证**:当负载与您的模式不符时快速失败。[了解更多](/sdks/deep-dives/testing#mock-server-tests) -- **判别联合**:支持判别联合。[了解更多](/api-definitions/ferndef/types#discriminated-unions) +- **惯用方法名**:精细调整 SDK 资源和方法名称。[了解更多](/learn/sdks/deep-dives/customize-method-names) +- **模式验证**:当负载与您的模式不符时快速失败。[了解更多](/learn/sdks/deep-dives/testing#mock-server-tests) +- **判别联合**:支持判别联合。[了解更多](/learn/api-definitions/ferndef/types#discriminated-unions) - **多部分表单数据**:处理多部分表单数据的 SDK。 - **向前兼容性**:随着 API 演进而具有容错能力的 SDK。 - **自动发布**:自动检测 API 变更,重新生成 SDK,并发布到注册中心。[了解更多](/learn/sdks/overview/autorelease) -- **自动分页**:使用偏移量、游标和基于链接的分页浏览 API 响应。[了解更多](/sdks/deep-dives/auto-pagination) -- **OAuth 令牌刷新**:一等公民的 OAuth 支持。[了解更多](/sdks/reference/generators-yml#oauth) -- **带退避的重试**:使用指数退避算法自动重试失败的请求。[了解更多](/sdks/deep-dives/retries-with-backoff) +- **自动分页**:使用偏移量、游标和基于链接的分页浏览 API 响应。[了解更多](/learn/sdks/deep-dives/auto-pagination) +- **OAuth 令牌刷新**:一等公民的 OAuth 支持。[了解更多](/learn/sdks/reference/generators-yml#oauth) +- **带退避的重试**:使用指数退避算法自动重试失败的请求。[了解更多](/learn/sdks/deep-dives/retries-with-backoff) - **Webhook 签名验证**:验证传入 webhook 请求的签名。[了解更多](/learn/sdks/deep-dives/webhook-signature-verification) -- **幂等性标头**:内置防止重复提交的保护。[了解更多](/sdks/deep-dives/idempotency) -- **服务器发送事件**:从服务器向客户端流式传输 JSON 数据。[了解更多](/api-definitions/openapi/endpoints/sse) -- **测试**:为您的 SDK 提供自动生成和手写测试。[了解更多](/sdks/deep-dives/testing) -- **代码片段**:不再依赖手动编写的代码片段。[了解更多](/docs/api-references/sdk-snippets) -- **使用自定义代码扩展**:使用额外功能扩展生成的 SDK。[了解更多](/sdks/overview/custom-code) -- **合并多个 API**:多个 API 定义,一个 SDK。[了解更多](/api-definitions/overview/project-structure#multiple-apis) -- **WebSockets**:通过 WebSockets 发送和接收消息。[了解更多](/api-definitions/ferndef/websockets) +- **幂等性标头**:内置防止重复提交的保护。[了解更多](/learn/sdks/deep-dives/idempotency) +- **服务器发送事件**:从服务器向客户端流式传输 JSON 数据。[了解更多](/learn/api-definitions/openapi/endpoints/sse) +- **测试**:为您的 SDK 提供自动生成和手写测试。[了解更多](/learn/sdks/deep-dives/testing) +- **代码片段**:不再依赖手动编写的代码片段。[了解更多](/learn/docs/api-references/sdk-snippets) +- **使用自定义代码扩展**:使用额外功能扩展生成的 SDK。[了解更多](/learn/sdks/overview/custom-code) +- **合并多个 API**:多个 API 定义,一个 SDK。[了解更多](/learn/api-definitions/overview/project-structure#multiple-apis) +- **WebSockets**:通过 WebSockets 发送和接收消息。[了解更多](/learn/api-definitions/ferndef/websockets) \ No newline at end of file diff --git a/fern/translations/zh/products/sdks/custom-code.mdx b/fern/translations/zh/products/sdks/custom-code.mdx index 9df33b46d8..88f6ac8991 100644 --- a/fern/translations/zh/products/sdks/custom-code.mdx +++ b/fern/translations/zh/products/sdks/custom-code.mdx @@ -68,18 +68,18 @@ src/CustomClient.ts 开始为特定 SDK 添加自定义代码: - } href="/sdks/generators/typescript/custom-code"> + } href="/learn/sdks/generators/typescript/custom-code"> - } href="/sdks/generators/python/custom-code"> + } href="/learn/sdks/generators/python/custom-code"> } href="/learn/sdks/generators/go/custom-code"> } href="/learn/sdks/generators/java/custom-code"> - } href="/sdks/generators/csharp/custom-code"> + } href="/learn/sdks/generators/csharp/custom-code"> - } href="/sdks/generators/php/custom-code"> + } href="/learn/sdks/generators/php/custom-code"> - } href="/sdks/generators/ruby/custom-code"> + } href="/learn/sdks/generators/ruby/custom-code"> \ No newline at end of file diff --git a/fern/translations/zh/products/sdks/deep-dives/dynamic-authentication.mdx b/fern/translations/zh/products/sdks/deep-dives/dynamic-authentication.mdx index db65407096..735b9d64a7 100644 --- a/fern/translations/zh/products/sdks/deep-dives/dynamic-authentication.mdx +++ b/fern/translations/zh/products/sdks/deep-dives/dynamic-authentication.mdx @@ -12,10 +12,10 @@ sidebar-title: 动态身份验证 每种语言都有其推荐的动态身份验证实现方法: - + 使用自定义 fetcher 中间件在单个位置为所有请求注入身份验证逻辑。支持 JWT 签名、OAuth 令牌刷新等。 - + 使用方法重写为每个 API 调用注入身份验证逻辑。支持 JWT 签名、OAuth 令牌刷新等。 @@ -53,6 +53,6 @@ sidebar-title: 动态身份验证 ## 另请参阅 -- [添加自定义代码](/sdks/overview/custom-code) - 了解更多关于扩展生成的 SDK -- [TypeScript 自定义代码](/sdks/generators/typescript/custom-code) - TypeScript 特定的自定义指南 -- [Python 自定义代码](/sdks/generators/python/custom-code) - Python 特定的自定义指南 \ No newline at end of file +- [添加自定义代码](/learn/sdks/overview/custom-code) - 了解更多关于扩展生成的 SDK +- [TypeScript 自定义代码](/learn/sdks/generators/typescript/custom-code) - TypeScript 特定的自定义指南 +- [Python 自定义代码](/learn/sdks/generators/python/custom-code) - Python 特定的自定义指南 \ No newline at end of file diff --git a/fern/translations/zh/products/sdks/deep-dives/generated-sdk.mdx b/fern/translations/zh/products/sdks/deep-dives/generated-sdk.mdx index f357efd67e..1d78a55c1e 100644 --- a/fern/translations/zh/products/sdks/deep-dives/generated-sdk.mdx +++ b/fern/translations/zh/products/sdks/deep-dives/generated-sdk.mdx @@ -55,7 +55,7 @@ Fern 生成的 SDK 包含完整的类型定义,支持丰富的 IDE 功能。 | 选项 | 描述 | 可用性 | |------|------|--------| | 超时 | 配置请求超时(默认:[C#](/learn/sdks/generators/csharp/configuration#default-timeout-in-seconds) 和 PHP 为 30 秒,其他所有语言为 60 秒) | 所有语言 | -| [重试](/sdks/deep-dives/retries-with-backoff) | 配置最大重试次数(默认:对 408、429 和 5xx 响应进行 2 次指数退避重试) | 除 Ruby 和 Swift 外的所有语言 | +| [重试](/learn/sdks/deep-dives/retries-with-backoff) | 配置最大重试次数(默认:对 408、429 和 5xx 响应进行 2 次指数退避重试) | 除 Ruby 和 Swift 外的所有语言 | | 自定义 HTTP 客户端 | 覆盖默认 HTTP 客户端以支持不支持的环境或自定义需求 | TypeScript、Python、Java、PHP 和 Swift | | [aiohttp 传输](/learn/sdks/generators/python/aiohttp-support) | 选择使用 `aiohttp` 作为异步 HTTP 传输以解决 DNS 并发瓶颈 | 仅 Python | | 自定义头部 | 在任何请求中发送额外的头部 | TypeScript、Java 和 Swift | diff --git a/fern/translations/zh/products/sdks/deep-dives/self-hosted.mdx b/fern/translations/zh/products/sdks/deep-dives/self-hosted.mdx index c033406b92..d8f7bc67f1 100644 --- a/fern/translations/zh/products/sdks/deep-dives/self-hosted.mdx +++ b/fern/translations/zh/products/sdks/deep-dives/self-hosted.mdx @@ -7,7 +7,7 @@ sidebar-title: 自托管 SDK -Fern SDK 生成[默认运行在 Fern 的基础设施上](/sdks/overview/how-it-works)。自托管允许您在自己的基础设施上运行 SDK 生成。如果您的组织有以下需求,可以使用自托管: +Fern SDK 生成[默认运行在 Fern 的基础设施上](/learn/sdks/overview/how-it-works)。自托管允许您在自己的基础设施上运行 SDK 生成。如果您的组织有以下需求,可以使用自托管: - 在没有互联网访问的环境中运行 - 有严格的合规或安全要求 @@ -24,8 +24,8 @@ Fern SDK 生成[默认运行在 Fern 的基础设施上](/sdks/overview/how-it-w 本页面假设您已经: -* 初始化了 `fern` 文件夹。请参阅[设置 `fern` 文件夹](/sdks/overview/quickstart)。 -* 在 `generators.yml` 中配置了 SDK 生成器。请参阅特定语言的快速开始指南:[TypeScript](/sdks/generators/typescript/quickstart)、[Python](/sdks/generators/python/quickstart)、[Go](/sdks/generators/go/quickstart)、[Java](/sdks/generators/java/quickstart) 等。 +* 初始化了 `fern` 文件夹。请参阅[设置 `fern` 文件夹](/learn/sdks/overview/quickstart)。 +* 在 `generators.yml` 中配置了 SDK 生成器。请参阅特定语言的快速开始指南:[TypeScript](/learn/sdks/generators/typescript/quickstart)、[Python](/learn/sdks/generators/python/quickstart)、[Go](/learn/sdks/generators/go/quickstart)、[Java](/learn/sdks/generators/java/quickstart) 等。 自托管 SDK 生成允许您输出到本地文件系统或直接推送到您控制的 GitHub 仓库。按照以下步骤设置和运行本地生成: diff --git a/fern/translations/zh/products/sdks/generators/csharp/publishing-to-nuget.mdx b/fern/translations/zh/products/sdks/generators/csharp/publishing-to-nuget.mdx index d9c3f4990b..84ddbd4a45 100644 --- a/fern/translations/zh/products/sdks/generators/csharp/publishing-to-nuget.mdx +++ b/fern/translations/zh/products/sdks/generators/csharp/publishing-to-nuget.mdx @@ -22,7 +22,7 @@ sidebar-title: 发布到 NuGet ## 配置 SDK 包设置 -您需要更新 `generators.yml` 文件来配置包名称、输出位置和客户端名称,以便 NuGet 发布。您的 `generators.yml` [应该放在您的源代码仓库中](/sdks/overview/project-structure)(或本地机器上),而不是包含 C#/.NET SDK 代码的仓库中。 +您需要更新 `generators.yml` 文件来配置包名称、输出位置和客户端名称,以便 NuGet 发布。您的 `generators.yml` [应该放在您的源代码仓库中](/learn/sdks/overview/project-structure)(或本地机器上),而不是包含 C#/.NET SDK 代码的仓库中。 diff --git a/fern/translations/zh/products/sdks/generators/csharp/quickstart.mdx b/fern/translations/zh/products/sdks/generators/csharp/quickstart.mdx index de056782b1..c5a131ce4d 100644 --- a/fern/translations/zh/products/sdks/generators/csharp/quickstart.mdx +++ b/fern/translations/zh/products/sdks/generators/csharp/quickstart.mdx @@ -51,7 +51,7 @@ fern generate --group csharp-sdk ``` - 如果您有多个 API,请使用 [`--api` 标志](/cli-api-reference/cli-reference/commands#api) 指定要生成的 API: + 如果您有多个 API,请使用 [`--api` 标志](/learn/cli-api-reference/cli-reference/commands#api) 指定要生成的 API: ```bash fern generate --group csharp-sdk --api your-api-name diff --git a/fern/translations/zh/products/sdks/generators/go/configuration.mdx b/fern/translations/zh/products/sdks/generators/go/configuration.mdx index dd1235d27e..510466df87 100644 --- a/fern/translations/zh/products/sdks/generators/go/configuration.mdx +++ b/fern/translations/zh/products/sdks/generators/go/configuration.mdx @@ -36,7 +36,7 @@ groups: -生成[模拟服务器(wire)测试](/sdks/deep-dives/testing#mock-server-tests)以验证 SDK 发送正确的 HTTP 请求并根据 API 规范正确处理响应。启用时,需要 Docker 作为运行时依赖来运行生成的测试。 +生成[模拟服务器(wire)测试](/learn/sdks/deep-dives/testing#mock-server-tests)以验证 SDK 发送正确的 HTTP 请求并根据 API 规范正确处理响应。启用时,需要 Docker 作为运行时依赖来运行生成的测试。 diff --git a/fern/translations/zh/products/sdks/generators/go/quickstart.mdx b/fern/translations/zh/products/sdks/generators/go/quickstart.mdx index 2f54b68619..cefd24040e 100644 --- a/fern/translations/zh/products/sdks/generators/go/quickstart.mdx +++ b/fern/translations/zh/products/sdks/generators/go/quickstart.mdx @@ -51,7 +51,7 @@ fern generate --group go-sdk ``` - 如果您有多个 API,请使用 [`--api` 标志](/cli-api-reference/cli-reference/commands#api)指定要生成的 API: + 如果您有多个 API,请使用 [`--api` 标志](/learn/cli-api-reference/cli-reference/commands#api)指定要生成的 API: ```bash fern generate --group go-sdk --api your-api-name diff --git a/fern/translations/zh/products/sdks/generators/java/configuration.mdx b/fern/translations/zh/products/sdks/generators/java/configuration.mdx index 8678c1d842..66976c8942 100644 --- a/fern/translations/zh/products/sdks/generators/java/configuration.mdx +++ b/fern/translations/zh/products/sdks/generators/java/configuration.mdx @@ -71,7 +71,7 @@ groups: -启用时,生成[模拟服务器(wire)测试](/sdks/deep-dives/testing#mock-server-tests)以验证 SDK 是否按预期发送和接收 HTTP 请求。 +启用时,生成[模拟服务器(wire)测试](/learn/sdks/deep-dives/testing#mock-server-tests)以验证 SDK 是否按预期发送和接收 HTTP 请求。 diff --git a/fern/translations/zh/products/sdks/generators/java/publishing-to-maven-central.mdx b/fern/translations/zh/products/sdks/generators/java/publishing-to-maven-central.mdx index 61ef925a7a..a22e4b386d 100644 --- a/fern/translations/zh/products/sdks/generators/java/publishing-to-maven-central.mdx +++ b/fern/translations/zh/products/sdks/generators/java/publishing-to-maven-central.mdx @@ -16,7 +16,7 @@ registry](https://central.sonatype.com/)。按照本页面的步骤操作后, ## 配置 Maven Central 发布 -您需要更新 `generators.yml` 文件来配置输出位置、目标仓库和发布模式。您的 `generators.yml` [应该位于您的源代码仓库中](/sdks/overview/project-structure)(或在您的本地机器上),而不是包含您的 Java SDK 代码的仓库中。 +您需要更新 `generators.yml` 文件来配置输出位置、目标仓库和发布模式。您的 `generators.yml` [应该位于您的源代码仓库中](/learn/sdks/overview/project-structure)(或在您的本地机器上),而不是包含您的 Java SDK 代码的仓库中。 diff --git a/fern/translations/zh/products/sdks/generators/java/quickstart.mdx b/fern/translations/zh/products/sdks/generators/java/quickstart.mdx index ab59e88fff..b70aa4843e 100644 --- a/fern/translations/zh/products/sdks/generators/java/quickstart.mdx +++ b/fern/translations/zh/products/sdks/generators/java/quickstart.mdx @@ -51,7 +51,7 @@ fern generate --group java-sdk ``` - 如果您有多个 API,请使用 [`--api` 标志](/cli-api-reference/cli-reference/commands#api)指定要生成的 API: + 如果您有多个 API,请使用 [`--api` 标志](/learn/cli-api-reference/cli-reference/commands#api)指定要生成的 API: ```bash fern generate --group java-sdk --api your-api-name diff --git a/fern/translations/zh/products/sdks/generators/php/configuration.mdx b/fern/translations/zh/products/sdks/generators/php/configuration.mdx index 0012087213..a4bd0581aa 100644 --- a/fern/translations/zh/products/sdks/generators/php/configuration.mdx +++ b/fern/translations/zh/products/sdks/generators/php/configuration.mdx @@ -28,7 +28,7 @@ groups: -启用时,生成[模拟服务器(wire)测试](/sdks/deep-dives/testing#mock-server-tests)来验证 SDK 是否按预期发送和接收 HTTP 请求。 +启用时,生成[模拟服务器(wire)测试](/learn/sdks/deep-dives/testing#mock-server-tests)来验证 SDK 是否按预期发送和接收 HTTP 请求。 diff --git a/fern/translations/zh/products/sdks/generators/php/quickstart.mdx b/fern/translations/zh/products/sdks/generators/php/quickstart.mdx index 89b8150e33..735d029e3d 100644 --- a/fern/translations/zh/products/sdks/generators/php/quickstart.mdx +++ b/fern/translations/zh/products/sdks/generators/php/quickstart.mdx @@ -51,7 +51,7 @@ fern generate --group php-sdk ``` - 如果您有多个 API,请使用 [`--api` 标志](/cli-api-reference/cli-reference/commands#api) 指定要生成的 API: + 如果您有多个 API,请使用 [`--api` 标志](/learn/cli-api-reference/cli-reference/commands#api) 指定要生成的 API: ```bash fern generate --group php-sdk --api your-api-name diff --git a/fern/translations/zh/products/sdks/generators/python/configuration.mdx b/fern/translations/zh/products/sdks/generators/python/configuration.mdx index e5cc92f848..835d2ba2d1 100644 --- a/fern/translations/zh/products/sdks/generators/python/configuration.mdx +++ b/fern/translations/zh/products/sdks/generators/python/configuration.mdx @@ -62,7 +62,7 @@ from my_package import validate_token, format_currency, PhoneValidator -启用时,生成[模拟服务器(wire)测试](/sdks/deep-dives/testing#mock-server-tests)来验证 SDK 是否按预期发送和接收 HTTP 请求。 +启用时,生成[模拟服务器(wire)测试](/learn/sdks/deep-dives/testing#mock-server-tests)来验证 SDK 是否按预期发送和接收 HTTP 请求。 diff --git a/fern/translations/zh/products/sdks/generators/python/dynamic-authentication.mdx b/fern/translations/zh/products/sdks/generators/python/dynamic-authentication.mdx index 0527b5d641..3c21383aa8 100644 --- a/fern/translations/zh/products/sdks/generators/python/dynamic-authentication.mdx +++ b/fern/translations/zh/products/sdks/generators/python/dynamic-authentication.mdx @@ -145,5 +145,5 @@ new_plant = client.create_plant({ ## 另请参阅 -- [添加自定义代码](/sdks/generators/python/custom-code) - Python 特定的自定义指南 -- [Python 配置](/sdks/generators/python/configuration) - 配置选项的完整列表 \ No newline at end of file +- [添加自定义代码](/learn/sdks/generators/python/custom-code) - Python 特定的自定义指南 +- [Python 配置](/learn/sdks/generators/python/configuration) - 配置选项的完整列表 \ No newline at end of file diff --git a/fern/translations/zh/products/sdks/generators/python/publishing-to-pypi.mdx b/fern/translations/zh/products/sdks/generators/python/publishing-to-pypi.mdx index 859955bc9a..d3fd2046df 100644 --- a/fern/translations/zh/products/sdks/generators/python/publishing-to-pypi.mdx +++ b/fern/translations/zh/products/sdks/generators/python/publishing-to-pypi.mdx @@ -18,7 +18,7 @@ sidebar-title: 发布到 PyPI ## 配置 SDK 包设置 -您需要更新 `generators.yml` 文件来配置包名称、输出位置和客户端命名以用于 PyPI 发布。您的 `generators.yml` [应位于您的源代码库中](/sdks/overview/project-structure)(或本地机器上),而不是包含 Python SDK 代码的代码库中。 +您需要更新 `generators.yml` 文件来配置包名称、输出位置和客户端命名以用于 PyPI 发布。您的 `generators.yml` [应位于您的源代码库中](/learn/sdks/overview/project-structure)(或本地机器上),而不是包含 Python SDK 代码的代码库中。 diff --git a/fern/translations/zh/products/sdks/generators/python/quickstart.mdx b/fern/translations/zh/products/sdks/generators/python/quickstart.mdx index 100117ff62..e480906675 100644 --- a/fern/translations/zh/products/sdks/generators/python/quickstart.mdx +++ b/fern/translations/zh/products/sdks/generators/python/quickstart.mdx @@ -47,7 +47,7 @@ fern generate --group python-sdk ``` - 如果您有多个 API,请使用 [`--api` 标志](/cli-api-reference/cli-reference/commands#api) 指定要生成的 API: + 如果您有多个 API,请使用 [`--api` 标志](/learn/cli-api-reference/cli-reference/commands#api) 指定要生成的 API: ```bash fern generate --group python-sdk --api your-api-name diff --git a/fern/translations/zh/products/sdks/generators/ruby/configuration.mdx b/fern/translations/zh/products/sdks/generators/ruby/configuration.mdx index d5273b32e6..653ba504bb 100644 --- a/fern/translations/zh/products/sdks/generators/ruby/configuration.mdx +++ b/fern/translations/zh/products/sdks/generators/ruby/configuration.mdx @@ -48,7 +48,7 @@ config: -启用后,生成[模拟服务器(wire)测试](/sdks/deep-dives/testing#mock-server-tests)来验证 SDK 按预期发送和接收 HTTP 请求。 +启用后,生成[模拟服务器(wire)测试](/learn/sdks/deep-dives/testing#mock-server-tests)来验证 SDK 按预期发送和接收 HTTP 请求。 diff --git a/fern/translations/zh/products/sdks/generators/ruby/quickstart.mdx b/fern/translations/zh/products/sdks/generators/ruby/quickstart.mdx index 1dadbe1911..2976167372 100644 --- a/fern/translations/zh/products/sdks/generators/ruby/quickstart.mdx +++ b/fern/translations/zh/products/sdks/generators/ruby/quickstart.mdx @@ -51,7 +51,7 @@ fern generate --group ruby-sdk ``` - 如果您有多个 API,请使用 [`--api` 标志](/cli-api-reference/cli-reference/commands#api) 指定要生成的 API: + 如果您有多个 API,请使用 [`--api` 标志](/learn/cli-api-reference/cli-reference/commands#api) 指定要生成的 API: ```bash fern generate --group ruby-sdk --api your-api-name diff --git a/fern/translations/zh/products/sdks/generators/swift/configuration.mdx b/fern/translations/zh/products/sdks/generators/swift/configuration.mdx index 47811dec90..86ce5efdd6 100644 --- a/fern/translations/zh/products/sdks/generators/swift/configuration.mdx +++ b/fern/translations/zh/products/sdks/generators/swift/configuration.mdx @@ -33,7 +33,7 @@ groups: -生成[模拟服务器(线路)测试](/sdks/deep-dives/testing#mock-server-tests)以验证 SDK 是否发送正确的 HTTP 请求并根据 API 规范正确处理响应。 +生成[模拟服务器(线路)测试](/learn/sdks/deep-dives/testing#mock-server-tests)以验证 SDK 是否发送正确的 HTTP 请求并根据 API 规范正确处理响应。 diff --git a/fern/translations/zh/products/sdks/generators/typescript/configuration.mdx b/fern/translations/zh/products/sdks/generators/typescript/configuration.mdx index 284cf04d2d..cf4ecb6626 100644 --- a/fern/translations/zh/products/sdks/generators/typescript/configuration.mdx +++ b/fern/translations/zh/products/sdks/generators/typescript/configuration.mdx @@ -20,7 +20,7 @@ groups: 允许对象模式中未定义的字段。这仅适用于序列化层。 -查看 [TypeScript 序列化层](/sdks/generators/typescript/serde-layer) 了解更多信息。 +查看 [TypeScript 序列化层](/learn/sdks/generators/typescript/serde-layer) 了解更多信息。 @@ -385,7 +385,7 @@ import { acme, AcmeSdkClient } from "acme"; 当 `noSerdeLayer: false` 时,生成的客户端包含自定义序列化代码,将属性名转换为 camelCase,在运行时验证请求/响应,并支持复杂类型。 -查看 [TypeScript 序列化层](/sdks/generators/typescript/serde-layer) 了解何时启用此选项的详细指导。 +查看 [TypeScript 序列化层](/learn/sdks/generators/typescript/serde-layer) 了解何时启用此选项的详细指导。 @@ -424,7 +424,7 @@ config: email: developers@acmecorp.com ``` -您也可以使用 `packageJson.exports` 注册自定义子路径导出(例如 `import { myHelper } from "@acme/sdk/helper"`)。生成器只会为您的 API 定义自动生成导出条目,因此需要手动添加自定义文件—否则 Node.js 不会解析它们的子路径导入。查看[添加自定义代码](/sdks/generators/typescript/custom-code)了解详情。 +您也可以使用 `packageJson.exports` 注册自定义子路径导出(例如 `import { myHelper } from "@acme/sdk/helper"`)。生成器只会为您的 API 定义自动生成导出条目,因此需要手动添加自定义文件—否则 Node.js 不会解析它们的子路径导入。查看[添加自定义代码](/learn/sdks/generators/typescript/custom-code)了解详情。 @@ -518,7 +518,7 @@ config: 当 `useBigInt` 设置为 `true` 时,会使用自定义的 JSON 序列化器和反序列化器,它会保留 `bigint` 的精度,而不是使用原生的 `JSON.stringify` 和 `JSON.parse` 函数(这些函数会将 `bigint` 转换为 number 而丢失精度)。 当将 `useBigInt` 与我们的序列化层结合使用时(`noSerdeLayer: false`),在 OpenAPI/Fern 规范中标记为 `long` 和 `bigint` 的请求和响应属性将始终为 `bigint`。 -但是,当禁用序列化层时(`noSerdeLayer: true`),它们将被类型化为 `number | bigint`。查看 [TypeScript 序列化层](/sdks/generators/typescript/serde-layer) 了解更多信息。 +但是,当禁用序列化层时(`noSerdeLayer: true`),它们将被类型化为 `number | bigint`。查看 [TypeScript 序列化层](/learn/sdks/generators/typescript/serde-layer) 了解更多信息。 以下是将 `useBigInt` 和 `noSerdeLayer` 与以下 Fern 定义结合使用时生成类型的概述: diff --git a/fern/translations/zh/products/sdks/generators/typescript/custom-code.mdx b/fern/translations/zh/products/sdks/generators/typescript/custom-code.mdx index 10b8e9ae43..3670ed018a 100644 --- a/fern/translations/zh/products/sdks/generators/typescript/custom-code.mdx +++ b/fern/translations/zh/products/sdks/generators/typescript/custom-code.mdx @@ -45,7 +45,7 @@ sidebar-title: 添加自定义代码 -默认情况下,TypeScript 生成器只为您的 API 定义在 `package.json` 中自动生成 `exports` 条目。如果您希望消费者通过专用子路径导入您的自定义文件(例如 `import { myHelper } from "@acme/sdk/helper"`),您必须在 `generators.yml` 中使用 [`packageJson.exports`](/sdks/generators/typescript/configuration#packagejson) 手动注册: +默认情况下,TypeScript 生成器只为您的 API 定义在 `package.json` 中自动生成 `exports` 条目。如果您希望消费者通过专用子路径导入您的自定义文件(例如 `import { myHelper } from "@acme/sdk/helper"`),您必须在 `generators.yml` 中使用 [`packageJson.exports`](/learn/sdks/generators/typescript/configuration#packagejson) 手动注册: ```yaml {5-14} title="generators.yml" - name: fern-typescript-sdk @@ -135,7 +135,7 @@ sidebar-title: 添加自定义代码 -要添加您的自定义代码所需的包,请在您的 `generators.yml` 中使用 [`extraDependencies`](/sdks/generators/typescript/configuration#extraDependencies) 和 [`extraDevDependencies`](/sdks/generators/typescript/configuration#extraDevDependencies) 选项。 +要添加您的自定义代码所需的包,请在您的 `generators.yml` 中使用 [`extraDependencies`](/learn/sdks/generators/typescript/configuration#extraDependencies) 和 [`extraDevDependencies`](/learn/sdks/generators/typescript/configuration#extraDevDependencies) 选项。 ```yaml {4-7} title="generators.yml" - name: fern-typescript-sdk diff --git a/fern/translations/zh/products/sdks/generators/typescript/dynamic-authentication.mdx b/fern/translations/zh/products/sdks/generators/typescript/dynamic-authentication.mdx index 09d2f8dc03..5d80b38029 100644 --- a/fern/translations/zh/products/sdks/generators/typescript/dynamic-authentication.mdx +++ b/fern/translations/zh/products/sdks/generators/typescript/dynamic-authentication.mdx @@ -46,7 +46,7 @@ sidebar-title: 动态身份验证 "@types/jsonwebtoken": "^9.0.0" ``` -查看 [TypeScript 配置页面](/sdks/generators/typescript/configuration#packagejson) 了解所有可用的 packageJson 选项。 +查看 [TypeScript 配置页面](/learn/sdks/generators/typescript/configuration#packagejson) 了解所有可用的 packageJson 选项。 ### 创建带有 JWT 签名的自定义 fetcher @@ -204,5 +204,5 @@ const newPlant = await client.plants.create({ ## 另请参阅 -- [添加自定义代码](/sdks/generators/typescript/custom-code) - TypeScript 特定的自定义指南 -- [TypeScript 配置](/sdks/generators/typescript/configuration) - 配置选项的完整列表 \ No newline at end of file +- [添加自定义代码](/learn/sdks/generators/typescript/custom-code) - TypeScript 特定的自定义指南 +- [TypeScript 配置](/learn/sdks/generators/typescript/configuration) - 配置选项的完整列表 \ No newline at end of file diff --git a/fern/translations/zh/products/sdks/generators/typescript/publishing-to-npm.mdx b/fern/translations/zh/products/sdks/generators/typescript/publishing-to-npm.mdx index 84ea629765..6ce2a03511 100644 --- a/fern/translations/zh/products/sdks/generators/typescript/publishing-to-npm.mdx +++ b/fern/translations/zh/products/sdks/generators/typescript/publishing-to-npm.mdx @@ -32,7 +32,7 @@ registry](https://www.npmjs.com/)。按照本页面的步骤操作后,你将 ## 配置 SDK 包设置 -你需要更新 `generators.yml` 文件来配置包名、输出位置和客户端命名,以便进行 npm 发布。你的 `generators.yml` [应该位于你的源仓库中](/sdks/overview/project-structure)(或在你的本地机器上),而不是包含你的 TypeScript SDK 代码的仓库中。 +你需要更新 `generators.yml` 文件来配置包名、输出位置和客户端命名,以便进行 npm 发布。你的 `generators.yml` [应该位于你的源仓库中](/learn/sdks/overview/project-structure)(或在你的本地机器上),而不是包含你的 TypeScript SDK 代码的仓库中。 diff --git a/fern/translations/zh/products/sdks/generators/typescript/serde-layer.mdx b/fern/translations/zh/products/sdks/generators/typescript/serde-layer.mdx index f702e9b190..3bc7fdbb24 100644 --- a/fern/translations/zh/products/sdks/generators/typescript/serde-layer.mdx +++ b/fern/translations/zh/products/sdks/generators/typescript/serde-layer.mdx @@ -49,4 +49,4 @@ groups: useBigInt: true # 保留大数字的精度 ``` -有关所有 TypeScript 配置选项的完整列表,请转到 [TypeScript 配置](/sdks/generators/typescript/configuration)。 \ No newline at end of file +有关所有 TypeScript 配置选项的完整列表,请转到 [TypeScript 配置](/learn/sdks/generators/typescript/configuration)。 \ No newline at end of file diff --git a/fern/translations/zh/products/sdks/how-it-works.mdx b/fern/translations/zh/products/sdks/how-it-works.mdx index d21b98fc2f..05e8284a0d 100644 --- a/fern/translations/zh/products/sdks/how-it-works.mdx +++ b/fern/translations/zh/products/sdks/how-it-works.mdx @@ -6,7 +6,7 @@ sidebar-title: SDK 如何工作 Fern 将您的 API 规范与生成器配置和自定义代码相结合,生成多种语言的 SDK。默认情况下,SDK 生成运行在 Fern 的托管云基础设施上。 -或者,[您可以在自己的基础设施上运行 SDK 生成](/sdks/deep-dives/self-hosted)以满足特定的安全或合规要求。 +或者,[您可以在自己的基础设施上运行 SDK 生成](/learn/sdks/deep-dives/self-hosted)以满足特定的安全或合规要求。 ## 云生成工作流 diff --git a/fern/translations/zh/products/sdks/introduction.mdx b/fern/translations/zh/products/sdks/introduction.mdx index 1850a83f2e..0e80f435ff 100644 --- a/fern/translations/zh/products/sdks/introduction.mdx +++ b/fern/translations/zh/products/sdks/introduction.mdx @@ -17,7 +17,7 @@ sidebar-title: SDK 概述 {/*

*/}
- + - + - + - + - + - +
PHP @@ -157,7 +157,7 @@ sidebar-title: SDK 概述
v
-
+ Changelog Changelog - + - +
Rust @@ -232,7 +232,7 @@ sidebar-title: SDK 概述
v
-
+ Changelog Changelog
@@ -277,15 +277,15 @@ sidebar-title: SDK 概述 从您的 API 定义生成多种语言的客户端库。 -- [TypeScript](/sdks/generators/typescript/quickstart): 生成 TypeScript SDK 的快速开始指南。 -- [Python](/sdks/generators/python/quickstart): 生成 Python SDK 的快速开始指南。 -- [Go](/sdks/generators/go/quickstart): 生成 Go SDK 的快速开始指南。 -- [Java](/sdks/generators/java/quickstart): 生成 Java SDK 的快速开始指南。 -- [.NET](/sdks/generators/csharp/quickstart): 生成 .NET SDK 的快速开始指南。 -- [PHP](/sdks/generators/php/quickstart): 生成 PHP SDK 的快速开始指南。 +- [TypeScript](/learn/sdks/generators/typescript/quickstart): 生成 TypeScript SDK 的快速开始指南。 +- [Python](/learn/sdks/generators/python/quickstart): 生成 Python SDK 的快速开始指南。 +- [Go](/learn/sdks/generators/go/quickstart): 生成 Go SDK 的快速开始指南。 +- [Java](/learn/sdks/generators/java/quickstart): 生成 Java SDK 的快速开始指南。 +- [.NET](/learn/sdks/generators/csharp/quickstart): 生成 .NET SDK 的快速开始指南。 +- [PHP](/learn/sdks/generators/php/quickstart): 生成 PHP SDK 的快速开始指南。 - [Ruby](/learn/sdks/generators/ruby/quickstart): 生成 Ruby SDK 的快速开始指南。 -- [Swift](/sdks/generators/swift/quickstart): 生成 Swift SDK 的快速开始指南。 -- [Rust](/sdks/generators/rust/quickstart): 生成 Rust SDK 的快速开始指南。 +- [Swift](/learn/sdks/generators/swift/quickstart): 生成 Swift SDK 的快速开始指南。 +- [Rust](/learn/sdks/generators/rust/quickstart): 生成 Rust SDK 的快速开始指南。 - [C++](https://buildwithfern.com/book-demo?type=language-request): 申请 C++ SDK 生成访问权限。 - [Kotlin](https://buildwithfern.com/book-demo?type=language-request): 申请 Kotlin SDK 生成访问权限。 \ No newline at end of file diff --git a/fern/translations/zh/products/sdks/project-structure.mdx b/fern/translations/zh/products/sdks/project-structure.mdx index 6e2064234d..f1ebed1c31 100644 --- a/fern/translations/zh/products/sdks/project-structure.mdx +++ b/fern/translations/zh/products/sdks/project-structure.mdx @@ -61,7 +61,7 @@ Fern 建议使用多仓库结构,包含: ``` - 当使用本地安装的 CLI 时,将 `version` 设置为 `"*"`。详见[本地安装 Fern CLI](/cli-api-reference/cli-reference/overview#install-fern-cli-locally)。 + 当使用本地安装的 CLI 时,将 `version` 设置为 `"*"`。详见[本地安装 Fern CLI](/learn/cli-api-reference/cli-reference/overview#install-fern-cli-locally)。 ### `generators.yml` @@ -95,8 +95,8 @@ groups: 查看 Cohere 的 [`generators.yml` 文件](https://github.com/cohere-ai/cohere-developer-experience/blob/23d6c541a01eb6b54dd9bb3588c805bb0e307713/fern/apis/sdks/generators.yml) 和 Vapi 的 [`generators.yml` 文件](https://github.com/VapiAI/docs/blob/9c674c2b16ba03e864e26673c5290c88048c9a7a/fern/apis/api/generators.yml)。 -完整的配置选项请参阅 [`generators.yml` 参考页](/sdks/reference/generators-yml)。 +完整的配置选项请参阅 [`generators.yml` 参考页](/learn/sdks/reference/generators-yml)。 ### API 定义文件 -有关组织 API 定义文件和处理多个 API 的详细信息,请参阅[项目结构(API 定义)](/api-definitions/overview/project-structure)。 +有关组织 API 定义文件和处理多个 API 的详细信息,请参阅[项目结构(API 定义)](/learn/api-definitions/overview/project-structure)。 diff --git a/fern/translations/zh/products/sdks/reference/generators-yml-reference.mdx b/fern/translations/zh/products/sdks/reference/generators-yml-reference.mdx index d71f647455..cc89a55676 100644 --- a/fern/translations/zh/products/sdks/reference/generators-yml-reference.mdx +++ b/fern/translations/zh/products/sdks/reference/generators-yml-reference.mdx @@ -250,7 +250,7 @@ api: - 规范的命名空间。对于配置[具有多个 API 版本的单个包](/api-definitions/overview/project-structure#option-2-namespace-based-versioning)很有用。 + 规范的命名空间。对于配置[具有多个 API 版本的单个包](/learn/api-definitions/overview/project-structure#option-2-namespace-based-versioning)很有用。 @@ -541,23 +541,23 @@ groups: ``` -} href="/sdks/generators/typescript/configuration"> +} href="/learn/sdks/generators/typescript/configuration"> -} href="/sdks/generators/python/configuration"> +} href="/learn/sdks/generators/python/configuration"> -} href="/sdks/generators/go/configuration"> +} href="/learn/sdks/generators/go/configuration"> -} href="/sdks/generators/java/configuration"> +} href="/learn/sdks/generators/java/configuration"> -} href="/sdks/generators/csharp/configuration"> +} href="/learn/sdks/generators/csharp/configuration"> -} href="/sdks/generators/php/configuration"> +} href="/learn/sdks/generators/php/configuration"> -} href="/sdks/generators/ruby/configuration"> +} href="/learn/sdks/generators/ruby/configuration"> -} href="/sdks/generators/swift/configuration"> +} href="/learn/sdks/generators/swift/configuration"> -} href="/sdks/generators/rust/configuration"> +} href="/learn/sdks/generators/rust/configuration"> diff --git a/fern/translations/zh/snippets/default-version.mdx b/fern/translations/zh/snippets/default-version.mdx index 967d1d8d27..e2b491a4ed 100644 --- a/fern/translations/zh/snippets/default-version.mdx +++ b/fern/translations/zh/snippets/default-version.mdx @@ -2,5 +2,5 @@ 版本在您网站上的下拉菜单中按照 `docs.yml` 中列出的顺序显示。您的 `versions` 列表中的第一个版本是默认版本,使用无版本路径,如 `example.com/getting-started`。其他版本使用带版本的路径,如 `example.com/v2/getting-started`。 - Fern 通过[重定向](/docs/seo/redirects)损坏的版本链接到默认版本来自动处理版本路由。规范 URL 指向无版本路径以整合 SEO 信号。要为特定版本页面覆盖此设置,请参阅 [SEO 元数据](/learn/docs/seo/setting-seo-metadata#canonical-url)。 + Fern 通过[重定向](/learn/docs/seo/redirects)损坏的版本链接到默认版本来自动处理版本路由。规范 URL 指向无版本路径以整合 SEO 信号。要为特定版本页面覆盖此设置,请参阅 [SEO 元数据](/learn/docs/seo/setting-seo-metadata#canonical-url)。 \ No newline at end of file diff --git a/fern/translations/zh/snippets/openapi-specs.mdx b/fern/translations/zh/snippets/openapi-specs.mdx index 08c8571e0b..5c2ae31157 100644 --- a/fern/translations/zh/snippets/openapi-specs.mdx +++ b/fern/translations/zh/snippets/openapi-specs.mdx @@ -45,7 +45,7 @@ api: - 规范的命名空间。用于配置 [包含多个 API 版本的单个包](/api-definitions/overview/project-structure#option-2-namespace-based-versioning)。 + 规范的命名空间。用于配置 [包含多个 API 版本的单个包](/learn/api-definitions/overview/project-structure#option-2-namespace-based-versioning)。 From 4103248503fb5d84646ac4e7458e6257cdc47014 Mon Sep 17 00:00:00 2001 From: Clay Tondreau Date: Wed, 5 Aug 2026 12:25:30 -0400 Subject: [PATCH 2/2] Keep links in the zh translations in-locale MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Links in the Chinese pages pointed at /learn/..., which drops readers back into the English site mid-navigation. They now point at /learn/zh/... so a reader who starts in Chinese stays in Chinese. Canonicalize legacy paths first The redirects in docs.yml are declared with /learn/... sources, so they do not fire under the /learn/zh/ locale prefix. Ten links were relying on a redirect — harmless in English, a hard 404 once the locale segment is added. Those now point at their canonical destination: /learn/ask-fern/getting-started/what-is-ask-fern -> /learn/docs/ai-features/ask-fern/overview /learn/docs/writing-content/markdown -> /learn/docs/writing-content/markdown-basics ...and eight more, listed in the rewrite table. Fern serves English content at a zh URL when a page has not been translated, so partial translation coverage is not a problem — only these redirect-dependent paths were. Also fixes two genuinely broken links - publishing-your-docs.md 404'd in English and Chinese: the page lives under preview-publish, and the link carried a stray .md extension. - Two "Full reference" links to site-level-settings.md resolved, but .md is Fern's view-as-raw-markdown feature — a prose link should open the rendered page, not the source. Verified: all 540 distinct /learn targets in the repo return 200, checked against the live site. The two remaining bare /learn links in zh are inside an mdx code fence demonstrating link syntax, so they are left as-is. Co-Authored-By: Claude --- .../docs/pages/getting-started/quickstart.mdx | 6 +- .../ferndef/api-yml/global-configuration.mdx | 6 +- .../zh/products/api-def/ferndef/audiences.mdx | 2 +- .../zh/products/api-def/ferndef/auth.mdx | 2 +- .../products/api-def/ferndef/availability.mdx | 2 +- .../zh/products/api-def/ferndef/endpoints.mdx | 12 +- .../zh/products/api-def/ferndef/examples.mdx | 2 +- .../api-def/ferndef/export-openapi.mdx | 2 +- .../zh/products/api-def/ferndef/overview.mdx | 10 +- .../zh/products/api-def/ferndef/packages.mdx | 2 +- .../zh/products/api-def/ferndef/types.mdx | 2 +- .../zh/products/api-def/ferndef/webhooks.mdx | 2 +- .../products/api-def/ferndef/websockets.mdx | 2 +- .../zh/products/api-def/grpc/overview.mdx | 4 +- .../grpc/reference/generators-reference.mdx | 2 +- .../zh/products/api-def/openapi/auth.mdx | 10 +- .../products/api-def/openapi/automation.mdx | 2 +- .../api-def/openapi/extensions/audiences.mdx | 4 +- .../openapi/extensions/availability.mdx | 4 +- .../api-def/openapi/extensions/default.mdx | 2 +- .../api-def/openapi/extensions/examples.mdx | 6 +- .../api-def/openapi/extensions/explorer.mdx | 2 +- .../openapi/extensions/global-headers.mdx | 6 +- .../openapi/extensions/global-parameters.mdx | 6 +- .../api-def/openapi/extensions/ignore.mdx | 2 +- .../openapi/extensions/method-names.mdx | 2 +- .../api-def/openapi/extensions/pagination.mdx | 2 +- .../openapi/extensions/tag-display-name.mdx | 4 +- .../zh/products/api-def/openapi/overlays.mdx | 6 +- .../zh/products/api-def/openapi/overview.mdx | 6 +- .../reference/generators-reference.mdx | 2 +- .../openapi/server-frameworks/fastapi.mdx | 2 +- .../zh/products/api-def/openapi/webhooks.mdx | 2 +- .../products/api-def/pages/asyncapi-empty.mdx | 2 +- .../products/api-def/pages/ferndef-empty.mdx | 2 +- .../zh/products/api-def/pages/grpc-empty.mdx | 2 +- .../products/api-def/pages/openapi-empty.mdx | 2 +- .../products/api-def/pages/openrpc-empty.mdx | 2 +- .../zh/products/api-def/pages/overrides.mdx | 8 +- .../api-def/pages/project-structure.mdx | 18 +-- .../pages/what-is-an-api-definition.mdx | 8 +- .../pages/cli-get-started.mdx | 10 +- .../cli-api-reference/pages/commands.mdx | 40 +++---- .../products/cli-generator/configuration.mdx | 12 +- .../products/cli-generator/customization.mdx | 2 +- .../zh/products/cli-generator/features.mdx | 4 +- .../cli-generator/local-generation.mdx | 10 +- .../cli-generator/openapi-extensions.mdx | 12 +- .../zh/products/cli-generator/publishing.mdx | 4 +- .../zh/products/cli-generator/quickstart.mdx | 10 +- .../zh/products/dashboard/pages/api-keys.mdx | 6 +- .../dashboard/pages/changelog/2026-01-07.mdx | 2 +- .../dashboard/pages/changelog/2026-01-20.mdx | 2 +- .../dashboard/pages/changelog/2026-02-13.mdx | 2 +- .../dashboard/pages/changelog/2026-02-23.mdx | 2 +- .../dashboard/pages/changelog/2026-03-02.mdx | 4 +- .../dashboard/pages/changelog/2026-03-17.mdx | 4 +- .../zh/products/dashboard/pages/domains.mdx | 8 +- .../zh/products/dashboard/pages/overview.mdx | 48 ++++---- .../dashboard/pages/password-protection.mdx | 8 +- .../products/dashboard/pages/pdf-export.mdx | 2 +- .../products/dashboard/pages/permissions.mdx | 2 +- .../accessibility/keyboard-shortcuts.mdx | 2 +- .../docs/pages/accessibility/overview.mdx | 6 +- .../products/docs/pages/ai/agent-skills.mdx | 8 +- .../zh/products/docs/pages/ai/ai-examples.mdx | 6 +- .../zh/products/docs/pages/ai/api-catalog.mdx | 4 +- .../zh/products/docs/pages/ai/host-skills.mdx | 2 +- .../pages/ai/llms-txt/customize-llms-txt.mdx | 12 +- .../docs/pages/ai/llms-txt/directives.mdx | 2 +- .../docs/pages/ai/llms-txt/overview.mdx | 16 +-- .../zh/products/docs/pages/ai/markdown.mdx | 8 +- .../zh/products/docs/pages/ai/mcp-server.mdx | 10 +- .../zh/products/docs/pages/ai/overview.mdx | 16 +-- .../zh/products/docs/pages/ai/writer.mdx | 4 +- .../pages/api-references/api-explorer.mdx | 8 +- .../pages/api-references/api-ref-content.mdx | 4 +- .../docs/pages/api-references/audiences.mdx | 4 +- .../api-references/customize-api-ref.mdx | 16 +-- .../pages/api-references/generate-api-ref.mdx | 8 +- .../api-references/generate-graphql-ref.mdx | 4 +- .../api-references/generate-grpc-ref.mdx | 4 +- .../api-references/generate-openrpc-ref.mdx | 2 +- .../api-references/generate-webhook-ref.mdx | 6 +- .../api-references/generate-websocket-ref.mdx | 4 +- .../pages/api-references/http-snippets.mdx | 6 +- .../pages/api-references/library-docs.mdx | 4 +- .../docs/pages/api-references/overview.mdx | 22 ++-- .../pages/api-references/sdk-snippets.mdx | 8 +- .../docs/pages/ask-fern/api-get-started.mdx | 2 +- .../docs/pages/ask-fern/content-sources.mdx | 4 +- .../products/docs/pages/ask-fern/guidance.mdx | 2 +- .../docs/pages/ask-fern/search-widget.mdx | 4 +- .../docs/pages/ask-fern/slack-app.mdx | 6 +- .../docs/pages/ask-fern/what-is-ask-fern.mdx | 12 +- .../authentication/api-key-injection.mdx | 8 +- .../docs/pages/authentication/jwt-setup.mdx | 10 +- .../docs/pages/authentication/oauth-setup.mdx | 8 +- .../docs/pages/authentication/overview.mdx | 22 ++-- .../docs/pages/authentication/password.mdx | 2 +- .../docs/pages/authentication/rbac.mdx | 14 +-- .../docs/pages/authentication/sso.mdx | 4 +- .../docs/pages/changelog/2024-01-24.mdx | 2 +- .../docs/pages/changelog/2024-02-22.mdx | 2 +- .../docs/pages/changelog/2024-04-20.mdx | 2 +- .../docs/pages/changelog/2024-05-22.mdx | 4 +- .../docs/pages/changelog/2024-06-25.mdx | 2 +- .../docs/pages/changelog/2024-07-30.mdx | 2 +- .../docs/pages/changelog/2024-08-20.mdx | 2 +- .../docs/pages/changelog/2024-09-24.mdx | 2 +- .../docs/pages/changelog/2024-10-31.mdx | 4 +- .../docs/pages/changelog/2024-11-27.mdx | 4 +- .../docs/pages/changelog/2024-12-30.mdx | 4 +- .../docs/pages/changelog/2025-01-14.mdx | 2 +- .../docs/pages/changelog/2025-01-21.mdx | 2 +- .../docs/pages/changelog/2025-02-04.mdx | 2 +- .../docs/pages/changelog/2025-05-23.mdx | 2 +- .../docs/pages/changelog/2025-06-05.mdx | 2 +- .../docs/pages/changelog/2025-10-17.mdx | 4 +- .../docs/pages/changelog/2025-11-02.mdx | 4 +- .../docs/pages/changelog/2025-11-03.mdx | 8 +- .../docs/pages/changelog/2025-11-05.mdx | 2 +- .../docs/pages/changelog/2025-11-08.mdx | 4 +- .../docs/pages/changelog/2025-11-09.mdx | 6 +- .../docs/pages/changelog/2025-11-11.mdx | 2 +- .../docs/pages/changelog/2025-11-14.mdx | 2 +- .../docs/pages/changelog/2025-11-18.mdx | 2 +- .../docs/pages/changelog/2025-11-24.mdx | 2 +- .../docs/pages/changelog/2025-11-25.mdx | 2 +- .../docs/pages/changelog/2025-12-09.mdx | 4 +- .../docs/pages/changelog/2025-12-10.mdx | 2 +- .../docs/pages/changelog/2025-12-11.mdx | 4 +- .../docs/pages/changelog/2025-12-14.mdx | 2 +- .../docs/pages/changelog/2025-12-15.mdx | 2 +- .../docs/pages/changelog/2025-12-16.mdx | 2 +- .../docs/pages/changelog/2025-12-20.mdx | 2 +- .../docs/pages/changelog/2026-01-05.mdx | 6 +- .../docs/pages/changelog/2026-01-09.mdx | 2 +- .../docs/pages/changelog/2026-01-15.mdx | 2 +- .../docs/pages/changelog/2026-01-17.mdx | 2 +- .../docs/pages/changelog/2026-01-22.mdx | 2 +- .../docs/pages/changelog/2026-01-30.mdx | 6 +- .../docs/pages/changelog/2026-02-03.mdx | 6 +- .../docs/pages/changelog/2026-02-04.mdx | 4 +- .../docs/pages/changelog/2026-02-05.mdx | 2 +- .../docs/pages/changelog/2026-02-06.mdx | 4 +- .../docs/pages/changelog/2026-02-09.mdx | 2 +- .../docs/pages/changelog/2026-02-10.mdx | 2 +- .../docs/pages/changelog/2026-02-11.mdx | 8 +- .../docs/pages/changelog/2026-02-12.mdx | 2 +- .../docs/pages/changelog/2026-02-17.mdx | 2 +- .../docs/pages/changelog/2026-02-23.mdx | 2 +- .../docs/pages/changelog/2026-02-25.mdx | 2 +- .../docs/pages/changelog/2026-02-26.mdx | 2 +- .../docs/pages/changelog/2026-02-27.mdx | 4 +- .../docs/pages/changelog/2026-02-28.mdx | 4 +- .../docs/pages/changelog/2026-03-06.mdx | 2 +- .../docs/pages/changelog/2026-03-09.mdx | 4 +- .../docs/pages/changelog/2026-03-11.mdx | 2 +- .../docs/pages/changelog/2026-03-12.mdx | 4 +- .../docs/pages/changelog/2026-03-18.mdx | 4 +- .../docs/pages/changelog/2026-03-23.mdx | 4 +- .../docs/pages/changelog/2026-03-27.mdx | 2 +- .../docs/pages/changelog/2026-03-30.mdx | 2 +- .../docs/pages/changelog/2026-03-31.mdx | 6 +- .../docs/pages/changelog/2026-04-02.mdx | 6 +- .../docs/pages/changelog/2026-04-09.mdx | 4 +- .../docs/pages/changelog/2026-04-10.mdx | 2 +- .../docs/pages/changelog/2026-04-11.mdx | 2 +- .../docs/pages/changelog/2026-04-14.mdx | 4 +- .../docs/pages/changelog/2026-04-20.mdx | 4 +- .../docs/pages/changelog/2026-04-21.mdx | 2 +- .../docs/pages/changelog/2026-04-22.mdx | 4 +- .../docs/pages/changelog/2026-04-23.mdx | 4 +- .../docs/pages/changelog/2026-04-24.mdx | 4 +- .../docs/pages/changelog/2026-04-27.mdx | 2 +- .../docs/pages/changelog/2026-04-29.mdx | 2 +- .../docs/pages/changelog/2026-05-01.mdx | 4 +- .../docs/pages/changelog/2026-06-23.mdx | 4 +- .../docs/pages/changelog/2026-06-30.mdx | 2 +- .../docs/pages/changelog/2026-07-01.mdx | 2 +- .../docs/pages/changelog/2026-07-07.mdx | 2 +- .../default-components/badges.mdx | 2 +- .../default-components/button.mdx | 2 +- .../default-components/callouts.mdx | 2 +- .../default-components/cards.mdx | 12 +- .../default-components/code-blocks.mdx | 2 +- .../default-components/download.mdx | 2 +- .../endpoint-request-snippet.mdx | 2 +- .../endpoint-response-snippet.mdx | 2 +- .../endpoint-schema-snippet.mdx | 4 +- .../default-components/files.mdx | 20 ++-- .../default-components/if.mdx | 6 +- .../default-components/overview.mdx | 52 ++++---- .../default-components/prompt.mdx | 4 +- .../default-components/runnable-endpoint.mdx | 4 +- .../default-components/schema-snippet.mdx | 4 +- .../default-components/schema.mdx | 4 +- .../default-components/tabs.mdx | 4 +- .../default-components/versions.mdx | 2 +- .../webhook-payload-snippet.mdx | 4 +- .../writing-content/markdown-basics.mdx | 16 +-- .../writing-content/markdown-media.mdx | 2 +- .../writing-content/visual-editor.mdx | 46 +++---- .../customization/announcement-banner.mdx | 2 +- .../pages/customization/css-selectors.mdx | 34 +++--- .../pages/customization/custom-css-js.mdx | 16 +-- .../customization/custom-header-footer.mdx | 16 +-- .../customization/custom-react-components.mdx | 2 +- .../pages/customization/embedded-mode.mdx | 2 +- .../pages/customization/global-themes.mdx | 54 ++++----- .../customization/hiding-content-example.mdx | 2 +- .../pages/customization/hiding-content.mdx | 12 +- .../docs/pages/customization/search.mdx | 24 ++-- .../pages/customization/user-feedback.mdx | 10 +- .../pages/developer-tools/asyncapi-spec.mdx | 2 +- .../auto-update-last-updated.mdx | 2 +- .../docs/pages/developer-tools/gitlab.mdx | 6 +- .../pages/developer-tools/openapi-spec.mdx | 2 +- .../pages/getting-started/how-it-works.mdx | 10 +- .../docs/pages/getting-started/overview.mdx | 28 ++--- .../getting-started/project-structure.mdx | 16 +-- .../docs/pages/getting-started/quickstart.mdx | 32 ++--- .../getting-started/self-service-setup.mdx | 16 +-- .../analytics/analytics-events.mdx | 10 +- .../docs/pages/integrations/overview.mdx | 14 +-- .../docs/pages/localization/overview.mdx | 4 +- .../docs/pages/navigation/changelogs.mdx | 4 +- .../docs/pages/navigation/frontmatter.mdx | 30 ++--- .../docs/pages/navigation/navigation.mdx | 8 +- .../docs/pages/navigation/overview.mdx | 14 +-- .../docs/pages/navigation/products.mdx | 10 +- .../pages/navigation/site-level-settings.mdx | 74 ++++++------ .../products/docs/pages/navigation/tabs.mdx | 14 +-- .../docs/pages/navigation/versions.mdx | 8 +- .../pages/preview-publish/multi-source.mdx | 10 +- .../preview-changes-locally.mdx | 22 ++-- .../preview-publish/publishing-your-docs.mdx | 10 +- .../pages/preview-publish/reverse-proxy.mdx | 2 +- .../setting-up-your-domain.mdx | 2 +- .../pages/resources/stainless-comparison.mdx | 78 ++++++------ .../products/docs/pages/security/overview.mdx | 10 +- .../self-hosted-authentication.mdx | 4 +- .../pages/self-hosted/self-hosted-set-up.mdx | 6 +- .../docs/pages/self-hosted/self-hosted.mdx | 80 ++++++------- .../docs/pages/seo/configuring-slugs.mdx | 2 +- .../zh/products/docs/pages/seo/metadata.mdx | 10 +- .../zh/products/docs/pages/seo/overview.mdx | 14 +-- .../zh/products/docs/pages/seo/redirects.mdx | 16 +-- .../zh/products/docs/pages/seo/robots-txt.mdx | 6 +- .../zh/products/home/pages/welcome.mdx | 112 +++++++++--------- .../zh/products/sdks/autorelease.mdx | 2 +- .../zh/products/sdks/capabilities.mdx | 64 +++++----- .../zh/products/sdks/custom-code.mdx | 16 +-- .../deep-dives/configure-auto-pagination.mdx | 2 +- .../deep-dives/configure-global-headers.mdx | 4 +- .../sdks/deep-dives/configure-idempotency.mdx | 2 +- .../sdks/deep-dives/configure-readme.mdx | 2 +- .../deep-dives/customize-method-names.mdx | 2 +- .../deep-dives/dynamic-authentication.mdx | 10 +- .../filter-your-endpoints-audiences.mdx | 4 +- .../sdks/deep-dives/generated-sdk.mdx | 8 +- .../deep-dives/self-hosted-versioning.mdx | 6 +- .../products/sdks/deep-dives/self-hosted.mdx | 14 +-- .../sdks/deep-dives/server-url-templating.mdx | 2 +- .../products/sdks/deep-dives/sse-metadata.mdx | 2 +- .../zh/products/sdks/deep-dives/testing.mdx | 18 +-- .../webhook-signature-verification.mdx | 2 +- .../sdks/deep-dives/websocket-clients.mdx | 4 +- .../zh/products/sdks/fern-folder.mdx | 8 +- .../sdks/generators/csharp/configuration.mdx | 8 +- .../generators/csharp/publishing-to-nuget.mdx | 4 +- .../sdks/generators/csharp/quickstart.mdx | 4 +- .../sdks/generators/go/configuration.mdx | 2 +- .../go/publishing-to-go-package-manager.mdx | 2 +- .../sdks/generators/go/quickstart.mdx | 4 +- .../sdks/generators/java/configuration.mdx | 4 +- .../java/publishing-to-maven-central.mdx | 4 +- .../sdks/generators/java/quickstart.mdx | 4 +- .../sdks/generators/php/configuration.mdx | 2 +- .../php/publishing-to-packagist.mdx | 2 +- .../sdks/generators/php/quickstart.mdx | 4 +- .../generators/python/aiohttp-support.mdx | 2 +- .../sdks/generators/python/configuration.mdx | 4 +- .../python/dynamic-authentication.mdx | 4 +- .../generators/python/publishing-to-pypi.mdx | 6 +- .../sdks/generators/python/quickstart.mdx | 4 +- .../sdks/generators/ruby/configuration.mdx | 2 +- .../ruby/publishing-to-rubygems.mdx | 2 +- .../sdks/generators/ruby/quickstart.mdx | 4 +- .../sdks/generators/rust/configuration.mdx | 2 +- .../rust/publishing-to-crates-io.mdx | 2 +- .../sdks/generators/rust/quickstart.mdx | 2 +- .../sdks/generators/swift/configuration.mdx | 2 +- .../publishing-to-swift-package-manager.mdx | 2 +- .../sdks/generators/swift/quickstart.mdx | 2 +- .../generators/typescript/configuration.mdx | 10 +- .../generators/typescript/custom-code.mdx | 4 +- .../typescript/dynamic-authentication.mdx | 6 +- .../typescript/publishing-to-npm.mdx | 2 +- .../sdks/generators/typescript/quickstart.mdx | 4 +- .../generators/typescript/serde-layer.mdx | 2 +- .../zh/products/sdks/how-it-works.mdx | 4 +- .../zh/products/sdks/introduction.mdx | 54 ++++----- .../zh/products/sdks/project-structure.mdx | 6 +- .../reference/generators-yml-reference.mdx | 44 +++---- .../zh/products/sdks/replay-migration.mdx | 8 +- .../zh/snippets/api-link-syntax.mdx | 2 +- .../zh/snippets/ask-fern-config.mdx | 2 +- .../zh/snippets/buf-local-generation.mdx | 2 +- .../zh/snippets/default-version.mdx | 2 +- fern/translations/zh/snippets/fern-token.mdx | 2 +- fern/translations/zh/snippets/grpc-specs.mdx | 2 +- .../zh/snippets/openapi-specs.mdx | 16 +-- .../zh/snippets/seo-metadata-page.mdx | 4 +- .../zh/snippets/version-availability.mdx | 2 +- 316 files changed, 1200 insertions(+), 1200 deletions(-) diff --git a/fern/products/docs/pages/getting-started/quickstart.mdx b/fern/products/docs/pages/getting-started/quickstart.mdx index 4f7a52847b..f7dcac13b0 100644 --- a/fern/products/docs/pages/getting-started/quickstart.mdx +++ b/fern/products/docs/pages/getting-started/quickstart.mdx @@ -283,7 +283,7 @@ Build and publish a docs site with Fern. Follow the [Docs quickstart](https://bu fern generate --docs --no-prompt ``` - **Authentication**: The CLI checks for a `FERN_TOKEN` environment variable first, then falls back to a cached credential from `fern login`. Running `fern login` once caches the credential locally, so subsequent `fern generate --docs` runs won't prompt for login again. There is no `fern whoami` command. In GitHub Actions, store the API key as a repository secret named `FERN_TOKEN`. See [publishing your docs](/learn/docs/getting-started/publishing-your-docs.md) for full CI workflow examples. + **Authentication**: The CLI checks for a `FERN_TOKEN` environment variable first, then falls back to a cached credential from `fern login`. Running `fern login` once caches the credential locally, so subsequent `fern generate --docs` runs won't prompt for login again. There is no `fern whoami` command. In GitHub Actions, store the API key as a repository secret named `FERN_TOKEN`. See [publishing your docs](/learn/docs/preview-publish/publishing-your-docs) for full CI workflow examples. @@ -353,7 +353,7 @@ Fern Docs compiles MDX content and YAML configuration into a hosted static site ### Configuration file roles - **`fern.config.json`**: Identifies your organization and pins the CLI version. Required in every Fern project. -- **`docs.yml`**: Central manifest for the entire site — navigation structure, tabs, branding (colors, logo, favicon, typography), hosting instances, custom domains, navbar links, footer, integrations, redirects, RBAC roles, and AI agent settings. [Full reference](/learn/docs/configuration/site-level-settings.md). +- **`docs.yml`**: Central manifest for the entire site — navigation structure, tabs, branding (colors, logo, favicon, typography), hosting instances, custom domains, navbar links, footer, integrations, redirects, RBAC roles, and AI agent settings. [Full reference](/learn/docs/configuration/site-level-settings). - **`generators.yml`**: Points the CLI to your API spec files via the `api.specs` section. Also configures SDK generation. ### Common pitfalls @@ -371,5 +371,5 @@ instances: - url: your-org.docs.buildwithfern.com ``` -This is enough to publish (the CLI will build an empty site). In practice, most teams add `navigation` to define the sidebar, plus basic branding — these are shown in the [Customize your docs](#customize-your-docs) step above. The full list of available fields is in the [site-level settings reference](/learn/docs/configuration/site-level-settings.md). +This is enough to publish (the CLI will build an empty site). In practice, most teams add `navigation` to define the sidebar, plus basic branding — these are shown in the [Customize your docs](#customize-your-docs) step above. The full list of available fields is in the [site-level settings reference](/learn/docs/configuration/site-level-settings). diff --git a/fern/translations/zh/products/api-def/ferndef/api-yml/global-configuration.mdx b/fern/translations/zh/products/api-def/ferndef/api-yml/global-configuration.mdx index 9ee226070e..3f78a1c87e 100644 --- a/fern/translations/zh/products/api-def/ferndef/api-yml/global-configuration.mdx +++ b/fern/translations/zh/products/api-def/ferndef/api-yml/global-configuration.mdx @@ -18,7 +18,7 @@ headers: ``` -当您在 `api.yml` 中定义全局请求头时,必须[在端点示例中包含它们](/learn/api-definitions/ferndef/examples#examples-with-headers)。 +当您在 `api.yml` 中定义全局请求头时,必须[在端点示例中包含它们](/learn/zh/api-definitions/ferndef/examples#examples-with-headers)。 ## 全局路径参数 @@ -56,7 +56,7 @@ service: ## 幂等性请求头 -配置幂等性请求头以定义 [SDK 用户](/learn/sdks/deep-dives/idempotency)可以为安全请求重试指定的请求头。您还必须[将每个端点标记为幂等](/learn/api-definitions/ferndef/endpoints/overview#idempotent-endpoints)才能公开这些请求头。当两者都配置时,Fern 生成的 SDK 会将这些请求头作为幂等端点调用的参数公开。 +配置幂等性请求头以定义 [SDK 用户](/learn/zh/sdks/deep-dives/idempotency)可以为安全请求重试指定的请求头。您还必须[将每个端点标记为幂等](/learn/zh/api-definitions/ferndef/endpoints/overview#idempotent-endpoints)才能公开这些请求头。当两者都配置时,Fern 生成的 SDK 会将这些请求头作为幂等端点调用的参数公开。 ```yaml title="api.yml" name: api @@ -66,4 +66,4 @@ idempotency-headers: Idempotency-Expiration: optional ``` -`idempotency-headers` 中的每个键都是 HTTP 请求头名称,值是类型。[SDK 用户](/learn/sdks/deep-dives/idempotency)然后可以在调用幂等端点时指定这些请求头。 +`idempotency-headers` 中的每个键都是 HTTP 请求头名称,值是类型。[SDK 用户](/learn/zh/sdks/deep-dives/idempotency)然后可以在调用幂等端点时指定这些请求头。 diff --git a/fern/translations/zh/products/api-def/ferndef/audiences.mdx b/fern/translations/zh/products/api-def/ferndef/audiences.mdx index 8732b35988..f044537f5d 100644 --- a/fern/translations/zh/products/api-def/ferndef/audiences.mdx +++ b/fern/translations/zh/products/api-def/ferndef/audiences.mdx @@ -6,7 +6,7 @@ noindex: true -受众是一个用于为不同消费者分段 API 的有用工具。您可以配置 Fern Docs 来发布特定于某个`受众`的文档。您也可以[在 OpenAPI 规范中使用受众](/learn/api-definitions/openapi/extensions/audiences)。 +受众是一个用于为不同消费者分段 API 的有用工具。您可以配置 Fern Docs 来发布特定于某个`受众`的文档。您也可以[在 OpenAPI 规范中使用受众](/learn/zh/api-definitions/openapi/extensions/audiences)。 受众的常见示例包括: diff --git a/fern/translations/zh/products/api-def/ferndef/auth.mdx b/fern/translations/zh/products/api-def/ferndef/auth.mdx index 387f003f5c..41a628d177 100644 --- a/fern/translations/zh/products/api-def/ferndef/auth.mdx +++ b/fern/translations/zh/products/api-def/ferndef/auth.mdx @@ -238,7 +238,7 @@ service: response: TokenResponse ``` -如果您的 OAuth 服务器托管在与主 API 不同的 URL 上,您可以使用[每个环境多 URL](/learn/api-definitions/ferndef/api-yml/environments#multiple-urls-per-environment) 来为身份验证和 API 调用指定单独的基础 URL。 +如果您的 OAuth 服务器托管在与主 API 不同的 URL 上,您可以使用[每个环境多 URL](/learn/zh/api-definitions/ferndef/api-yml/environments#multiple-urls-per-environment) 来为身份验证和 API 调用指定单独的基础 URL。 有了这些设置,所有 OAuth 逻辑会在生成的 SDK 中自动处理。只要您配置了这些设置,您的客户端将自动检索访问令牌并根据需要刷新它。 diff --git a/fern/translations/zh/products/api-def/ferndef/availability.mdx b/fern/translations/zh/products/api-def/ferndef/availability.mdx index 715a8f9388..f72a60fb6c 100644 --- a/fern/translations/zh/products/api-def/ferndef/availability.mdx +++ b/fern/translations/zh/products/api-def/ferndef/availability.mdx @@ -4,7 +4,7 @@ description: 向 Fern Definition API 服务、端点、类型或属性添加可 noindex: true --- -您可以在 Fern Definition 中向端点、类型或属性添加 `availability`。您可以在 [`docs.yml` 文件](/learn/docs/configuration/site-level-settings)中配置 API Reference 文档中各部分的 `availability`。 +您可以在 Fern Definition 中向端点、类型或属性添加 `availability`。您可以在 [`docs.yml` 文件](/learn/zh/docs/configuration/site-level-settings)中配置 API Reference 文档中各部分的 `availability`。 ## 端点、类型和属性 diff --git a/fern/translations/zh/products/api-def/ferndef/endpoints.mdx b/fern/translations/zh/products/api-def/ferndef/endpoints.mdx index ad2b1ce38a..cc6e527596 100644 --- a/fern/translations/zh/products/api-def/ferndef/endpoints.mdx +++ b/fern/translations/zh/products/api-def/ferndef/endpoints.mdx @@ -12,7 +12,7 @@ noindex: true 每个服务定义: 1. **base-path(基础路径)**:所有端点 HTTP 路径的通用前缀 -2. 服务是否需要[身份验证](/learn/api-definitions/ferndef/authentication) +2. 服务是否需要[身份验证](/learn/zh/api-definitions/ferndef/authentication) 3. **Endpoints(端点)** @@ -30,7 +30,7 @@ noindex: true ### 节显示名称 -默认情况下,API 参考中的节名称来自服务文件名(例如,`user.yml` 变成"User")。要覆盖节的显示名称,[在您的 `docs.yml` 中使用 `section` 属性](/learn/docs/api-references/customize-api-reference-layout#renaming-sections)。 +默认情况下,API 参考中的节名称来自服务文件名(例如,`user.yml` 变成"User")。要覆盖节的显示名称,[在您的 `docs.yml` 中使用 `section` 属性](/learn/zh/docs/api-references/customize-api-reference-layout#renaming-sections)。 ### SDK 方法名称 @@ -85,7 +85,7 @@ service: 端点的完整路径是以下内容的连接: -- [环境](/learn/api-definitions/ferndef/api-yml/environments) URL +- [环境](/learn/zh/api-definitions/ferndef/api-yml/environments) URL - 服务 `base-path` - 端点 `path` @@ -333,7 +333,7 @@ types: ### 分页 -Fern 支持偏移、游标、URI 和基于路径的分页方案。要在[生成的 SDK](/learn/sdks/deep-dives/auto-pagination) 中设置自动分页: +Fern 支持偏移、游标、URI 和基于路径的分页方案。要在[生成的 SDK](/learn/zh/sdks/deep-dives/auto-pagination) 中设置自动分页: 1. 使用 `pagination` 字段标注所需的分页端点 1. 指定分页方案(`offset`、`cursor`、`next_uri` 或 `next_path`) @@ -447,7 +447,7 @@ types: ### 幂等端点 -将端点标记为幂等,以允许 SDK 用户为安全请求重试指定幂等性头。您还必须在 [`api.yml` 中配置幂等性头](/learn/api-definitions/ferndef/api-yml/global-headers#idempotency-headers) 来定义哪些头可用。 +将端点标记为幂等,以允许 SDK 用户为安全请求重试指定幂等性头。您还必须在 [`api.yml` 中配置幂等性头](/learn/zh/api-definitions/ferndef/api-yml/global-headers#idempotency-headers) 来定义哪些头可用。 ```yaml title="service.yml" {8} service: @@ -494,7 +494,7 @@ errors: ``` -您可以在[错误](/learn/api-definitions/ferndef/errors)页面了解更多关于如何定义错误的信息。 +您可以在[错误](/learn/zh/api-definitions/ferndef/errors)页面了解更多关于如何定义错误的信息。 ## 指定示例 diff --git a/fern/translations/zh/products/api-def/ferndef/examples.mdx b/fern/translations/zh/products/api-def/ferndef/examples.mdx index 735546df66..442a5328e4 100644 --- a/fern/translations/zh/products/api-def/ferndef/examples.mdx +++ b/fern/translations/zh/products/api-def/ferndef/examples.mdx @@ -315,7 +315,7 @@ errors: ### 包含请求头的示例 -当您在 `api.yml` 中[定义了全局请求头](/learn/api-definitions/ferndef/api-yml/global-headers#global-headers)时,必须在示例中包含它们: +当您在 `api.yml` 中[定义了全局请求头](/learn/zh/api-definitions/ferndef/api-yml/global-headers#global-headers)时,必须在示例中包含它们: ```yml {15-16} service: diff --git a/fern/translations/zh/products/api-def/ferndef/export-openapi.mdx b/fern/translations/zh/products/api-def/ferndef/export-openapi.mdx index abbecbe547..2aad1e6288 100644 --- a/fern/translations/zh/products/api-def/ferndef/export-openapi.mdx +++ b/fern/translations/zh/products/api-def/ferndef/export-openapi.mdx @@ -4,7 +4,7 @@ description: 使用 fern export 命令将 Fern Definition 导出为 OpenAPI 3.1 noindex: true --- -为了防止锁定在 Fern Definition 格式中,您可以随时[使用 `fern export` 命令](/learn/cli-api-reference/cli-reference/commands#fern-export)将您的 API 定义导出为 OpenAPI 3.1。 +为了防止锁定在 Fern Definition 格式中,您可以随时[使用 `fern export` 命令](/learn/zh/cli-api-reference/cli-reference/commands#fern-export)将您的 API 定义导出为 OpenAPI 3.1。 如果您在 `fern/apis/` 文件夹中定义了多个 API,请使用 `--api` 指定要导出的 API。 diff --git a/fern/translations/zh/products/api-def/ferndef/overview.mdx b/fern/translations/zh/products/api-def/ferndef/overview.mdx index 29ce01b2e3..747b9bc84a 100644 --- a/fern/translations/zh/products/api-def/ferndef/overview.mdx +++ b/fern/translations/zh/products/api-def/ferndef/overview.mdx @@ -33,10 +33,10 @@ fern init 每个 Fern Definition 文件可以定义: -- **[自定义类型](/learn/api-definitions/ferndef/types)**。使用**自定义类型**来构建你的数据模型。 -- **[端点](/learn/api-definitions/ferndef/endpoints/overview)**。一个**服务**是一组相关的 REST 端点。 -- **[错误](/learn/api-definitions/ferndef/errors)**。一个**错误**表示来自端点的失败(非 200)响应。 -- **[导入](/learn/api-definitions/ferndef/imports)**。使用**导入**在文件间共享类型。 +- **[自定义类型](/learn/zh/api-definitions/ferndef/types)**。使用**自定义类型**来构建你的数据模型。 +- **[端点](/learn/zh/api-definitions/ferndef/endpoints/overview)**。一个**服务**是一组相关的 REST 端点。 +- **[错误](/learn/zh/api-definitions/ferndef/errors)**。一个**错误**表示来自端点的失败(非 200)响应。 +- **[导入](/learn/zh/api-definitions/ferndef/imports)**。使用**导入**在文件间共享类型。 ```yml imdb.yml maxLines=0 service: @@ -99,5 +99,5 @@ Conjure。这些公司放弃了 OpenAPI,选择了更简洁的 API Definition L 尽管是描述 API 的不同格式,**你永远不会被锁定在 Fern 中。** 将你的 - [Fern Definition 转换为 OpenAPI](/learn/api-definitions/ferndef/export-openapi) 很容易。 + [Fern Definition 转换为 OpenAPI](/learn/zh/api-definitions/ferndef/export-openapi) 很容易。 diff --git a/fern/translations/zh/products/api-def/ferndef/packages.mdx b/fern/translations/zh/products/api-def/ferndef/packages.mdx index e1313dadd8..afcc171191 100644 --- a/fern/translations/zh/products/api-def/ferndef/packages.mdx +++ b/fern/translations/zh/products/api-def/ferndef/packages.mdx @@ -39,7 +39,7 @@ client.roles.admin.get(); ## 包配置 -每个包可以有一个名为 `__package__.yml` 的特殊定义文件。与任何其他定义文件一样,它可以包含[导入](/learn/api-definitions/ferndef/imports)、[类型](/learn/api-definitions/ferndef/types)、[端点](/learn/api-definitions/ferndef/endpoints/overview)和[错误](/learn/api-definitions/ferndef/errors)。 +每个包可以有一个名为 `__package__.yml` 的特殊定义文件。与任何其他定义文件一样,它可以包含[导入](/learn/zh/api-definitions/ferndef/imports)、[类型](/learn/zh/api-definitions/ferndef/types)、[端点](/learn/zh/api-definitions/ferndef/endpoints/overview)和[错误](/learn/zh/api-definitions/ferndef/errors)。 `__package__.yml` 中的端点将出现在包的根目录。 例如,以下生成的 SDK: diff --git a/fern/translations/zh/products/api-def/ferndef/types.mdx b/fern/translations/zh/products/api-def/ferndef/types.mdx index cd184f74d9..2b6c4d77bc 100644 --- a/fern/translations/zh/products/api-def/ferndef/types.mdx +++ b/fern/translations/zh/products/api-def/ferndef/types.mdx @@ -24,7 +24,7 @@ noindex: true | `map` | 键值映射,例如:`map` | | `optional` | 可选值,例如:`optional` | | `literal` | 字面值,例如:`literal<"Plants">` | -| `file` | 文件上传类型,例如:[文件上传](/learn/api-definitions/ferndef/endpoints/multipart) | +| `file` | 文件上传类型,例如:[文件上传](/learn/zh/api-definitions/ferndef/endpoints/multipart) | | `unknown` | 表示任意 JSON | ## 自定义类型 diff --git a/fern/translations/zh/products/api-def/ferndef/webhooks.mdx b/fern/translations/zh/products/api-def/ferndef/webhooks.mdx index f7ecc94afc..43ef1bb787 100644 --- a/fern/translations/zh/products/api-def/ferndef/webhooks.mdx +++ b/fern/translations/zh/products/api-def/ferndef/webhooks.mdx @@ -84,7 +84,7 @@ navigation: - subpackage_api.newPlantWebhook # Format: subpackage_{name-of-api}.{webhook-event-name} ``` -有关如何在 `docs.yml` 中配置 webhook 参考的更多信息,请参阅[生成您的 webhook 参考](/learn/docs/api-references/generate-webhook-ref)。 +有关如何在 `docs.yml` 中配置 webhook 参考的更多信息,请参阅[生成您的 webhook 参考](/learn/zh/docs/api-references/generate-webhook-ref)。 ## SDK 签名验证 diff --git a/fern/translations/zh/products/api-def/ferndef/websockets.mdx b/fern/translations/zh/products/api-def/ferndef/websockets.mdx index 7d5d4a7110..ce51fc9281 100644 --- a/fern/translations/zh/products/api-def/ferndef/websockets.mdx +++ b/fern/translations/zh/products/api-def/ferndef/websockets.mdx @@ -91,7 +91,7 @@ WebSocket 使用户能够与服务器创建连接,通过该连接可以发送 ### WebSocket 参考 -Fern 为 WebSocket 渲染一个[独特的参考页面](/learn/docs/api-references/generate-websocket-ref)。**握手**部分概述了与服务器连接的协议,而**发送**和**接收**部分概述了客户端和服务器之间可以发送的消息架构。 +Fern 为 WebSocket 渲染一个[独特的参考页面](/learn/zh/docs/api-references/generate-websocket-ref)。**握手**部分概述了与服务器连接的协议,而**发送**和**接收**部分概述了客户端和服务器之间可以发送的消息架构。 用户可以直接在 API 参考中连接和使用 WebSocket(查看 Hume 的 WebSocket 之一[这里](https://dev.hume.ai/reference/text-to-speech-tts/stream-input))。 diff --git a/fern/translations/zh/products/api-def/grpc/overview.mdx b/fern/translations/zh/products/api-def/grpc/overview.mdx index 07647bd87c..8db46149de 100644 --- a/fern/translations/zh/products/api-def/grpc/overview.mdx +++ b/fern/translations/zh/products/api-def/grpc/overview.mdx @@ -204,7 +204,7 @@ fern/ ``` -在您的 fern 目录中创建一个 `generators.yml` 文件,并添加对您的 gRPC proto 文件的引用。请参见 [gRPC generators.yml 参考](/learn/api-definitions/grpc/generators-yml-reference)以获取完整的配置选项。 +在您的 fern 目录中创建一个 `generators.yml` 文件,并添加对您的 gRPC proto 文件的引用。请参见 [gRPC generators.yml 参考](/learn/zh/api-definitions/grpc/generators-yml-reference)以获取完整的配置选项。 ```yaml title="generators.yml" # Your API definition @@ -222,7 +222,7 @@ groups: ``` -如果您想要[本地编译 `.proto` 文件 (`local-generation: true`)](/learn/api-definitions/grpc/generators-yml-reference#local-generation),您必须在您的机器上或[在您的 CI/CD 环境中](/learn/api-definitions/grpc/sync-your-g-rpc-specification)安装 [buf](https://buf.build/docs/installation)。 +如果您想要[本地编译 `.proto` 文件 (`local-generation: true`)](/learn/zh/api-definitions/grpc/generators-yml-reference#local-generation),您必须在您的机器上或[在您的 CI/CD 环境中](/learn/zh/api-definitions/grpc/sync-your-g-rpc-specification)安装 [buf](https://buf.build/docs/installation)。 您的最终目录结构: diff --git a/fern/translations/zh/products/api-def/grpc/reference/generators-reference.mdx b/fern/translations/zh/products/api-def/grpc/reference/generators-reference.mdx index e8af65b59c..6843035a38 100644 --- a/fern/translations/zh/products/api-def/grpc/reference/generators-reference.mdx +++ b/fern/translations/zh/products/api-def/grpc/reference/generators-reference.mdx @@ -6,6 +6,6 @@ sidebar-title: gRPC generators.yml 参考 `generators.yml` 文件有两个作用:它声明你的 gRPC 规范位置(在 `api.specs` 部分),并配置 SDK 生成(在可选的 `groups` 部分)。 -在此声明的 API 可以通过 `docs.yml` 在你的文档中渲染。请参阅 [生成你的 API 参考](/learn/docs/api-references/overview)。 +在此声明的 API 可以通过 `docs.yml` 在你的文档中渲染。请参阅 [生成你的 API 参考](/learn/zh/docs/api-references/overview)。 \ No newline at end of file diff --git a/fern/translations/zh/products/api-def/openapi/auth.mdx b/fern/translations/zh/products/api-def/openapi/auth.mdx index d672fd2b22..98c3473925 100644 --- a/fern/translations/zh/products/api-def/openapi/auth.mdx +++ b/fern/translations/zh/products/api-def/openapi/auth.mdx @@ -8,7 +8,7 @@ Fern 支持两种配置身份验证的方式: - **在您的 OpenAPI 规范中**使用 `securitySchemes` — 标准方法,保持认证配置的可移植性,并与其他 OpenAPI 工具兼容。 - **在 `generators.yml` 中**使用 `auth-schemes` — 使用此方式自定义参数名称和环境变量,覆盖规范中定义的内容,或配置 OAuth(在 OpenAPI 中不可用)。 -您的身份验证配置适用于生成的 SDK 和 [API 浏览器](/learn/docs/api-references/api-explorer)。所有 SDK 都支持凭证的直接配置和环境变量。如果您在两个地方定义了相同的方案,则以 `generators.yml` 为准。 +您的身份验证配置适用于生成的 SDK 和 [API 浏览器](/learn/zh/docs/api-references/api-explorer)。所有 SDK 都支持凭证的直接配置和环境变量。如果您在两个地方定义了相同的方案,则以 `generators.yml` 为准。 ## 在规范中配置身份验证 @@ -157,7 +157,7 @@ paths: ## 在 `generators.yml` 中自定义或覆盖身份验证 -在 [`auth-schemes`](/learn/sdks/reference/generators-yml#auth-schemes) 中定义您的方案,然后使用 [`api.auth`](/learn/sdks/reference/generators-yml#auth) 将其作为所有端点的默认值: +在 [`auth-schemes`](/learn/zh/sdks/reference/generators-yml#auth-schemes) 中定义您的方案,然后使用 [`api.auth`](/learn/zh/sdks/reference/generators-yml#auth) 将其作为所有端点的默认值: ```yml title="generators.yml" # 定义方案 @@ -175,7 +175,7 @@ api: - openapi: ./openapi.yml ``` -有关完整的配置选项,请参见 [`auth-schemes` 参考](/learn/sdks/reference/generators-yml#auth-schemes)。您还可以[为特定 SDK 覆盖身份验证设置](/learn/sdks/reference/generators-yml#override-api-authentication-settings)。 +有关完整的配置选项,请参见 [`auth-schemes` 参考](/learn/zh/sdks/reference/generators-yml#auth-schemes)。您还可以[为特定 SDK 覆盖身份验证设置](/learn/zh/sdks/reference/generators-yml#override-api-authentication-settings)。 生成的 SDK 用法: @@ -217,7 +217,7 @@ auth-schemes: env: MY_CLIENT_SECRET ``` -在 `username` 或 `password` 上[设置 `omit: true`](/learn/sdks/reference/generators-yml#usernameomit-passwordomit) 以从生成的 SDK 中移除它。 +在 `username` 或 `password` 上[设置 `omit: true`](/learn/zh/sdks/reference/generators-yml#usernameomit-passwordomit) 以从生成的 SDK 中移除它。 @@ -266,7 +266,7 @@ auth-schemes: `endpoint` 值引用您的 OpenAPI 规范中的路径。当返回 `expires-in` 时,SDK 会在 token 过期前自动刷新。 -如果您的 API 使用[命名空间](/learn/api-definitions/overview/project-structure#combined-sdks-from-multiple-apis)(多个 API 规范),请在端点前加上命名空间和 `::`。例如,`"payments::POST /oauth/token"`。 +如果您的 API 使用[命名空间](/learn/zh/api-definitions/overview/project-structure#combined-sdks-from-multiple-apis)(多个 API 规范),请在端点前加上命名空间和 `::`。例如,`"payments::POST /oauth/token"`。 diff --git a/fern/translations/zh/products/api-def/openapi/automation.mdx b/fern/translations/zh/products/api-def/openapi/automation.mdx index 6627419704..c295a3964a 100644 --- a/fern/translations/zh/products/api-def/openapi/automation.mdx +++ b/fern/translations/zh/products/api-def/openapi/automation.mdx @@ -20,7 +20,7 @@ sidebar-title: 同步您的 OpenAPI 规范 ``` - 在您的仓库中创建 `.github/workflows/sync-openapi.yml`。此操作使用 [`fern api update`](/learn/cli-api-reference/cli-reference/commands#fern-api-update) 从您的 `generators.yml` 文件中的 `origin` 字段拉取最新版本的 OpenAPI 规范。 + 在您的仓库中创建 `.github/workflows/sync-openapi.yml`。此操作使用 [`fern api update`](/learn/zh/cli-api-reference/cli-reference/commands#fern-api-update) 从您的 `generators.yml` 文件中的 `origin` 字段拉取最新版本的 OpenAPI 规范。 ```yml title=".github/workflows/sync-openapi.yml" name: Sync OpenAPI Specs # 可以自定义 diff --git a/fern/translations/zh/products/api-def/openapi/extensions/audiences.mdx b/fern/translations/zh/products/api-def/openapi/extensions/audiences.mdx index 5f51778909..b67ad3e98f 100644 --- a/fern/translations/zh/products/api-def/openapi/extensions/audiences.mdx +++ b/fern/translations/zh/products/api-def/openapi/extensions/audiences.mdx @@ -12,13 +12,13 @@ Fern 提供两种方式来筛选哪些 API 元素会出现在您的 SDK 和 API - **`audiences`(基于标签的筛选):** 为特定端点、模式或属性标记受众标签,然后将 SDK 和文档筛选到这些标签。最适合基于用户类型(公共 vs beta、免费 vs 企业版)或功能成熟度创建变体,无论 URL 结构如何。 -- **`settings.filter`(基于路径的筛选):** 筛选整个 URL 路径或模式。最适合您的 API 组织自然按 URL 划分的情况(如 `/v1/*` vs `/v2/*`,或 `/admin/*` vs `/user/*`)。配置详细信息请参见 [`settings.filter` 参考](/learn/sdks/reference/generators-yml#openapi)。 +- **`settings.filter`(基于路径的筛选):** 筛选整个 URL 路径或模式。最适合您的 API 组织自然按 URL 划分的情况(如 `/v1/*` vs `/v2/*`,或 `/admin/*` vs `/user/*`)。配置详细信息请参见 [`settings.filter` 参考](/learn/zh/sdks/reference/generators-yml#openapi)。 许多团队同时使用这两种方法:基于路径的筛选用于主要划分,受众标签用于这些划分内的精细控制。 ## 基于路径的筛选 -在您的 `generators.yml` 中使用 [`settings.filter`](/learn/api-definitions/openapi/generators-yml-reference#settingsfilter) 来限制哪些端点会根据其路径包含在生成的 SDK 或 API 参考中: +在您的 `generators.yml` 中使用 [`settings.filter`](/learn/zh/api-definitions/openapi/generators-yml-reference#settingsfilter) 来限制哪些端点会根据其路径包含在生成的 SDK 或 API 参考中: ```yaml title="generators.yml" api: diff --git a/fern/translations/zh/products/api-def/openapi/extensions/availability.mdx b/fern/translations/zh/products/api-def/openapi/extensions/availability.mdx index c7de6cad45..c71152d6f8 100644 --- a/fern/translations/zh/products/api-def/openapi/extensions/availability.mdx +++ b/fern/translations/zh/products/api-def/openapi/extensions/availability.mdx @@ -5,9 +5,9 @@ description: 使用 `x-fern-availability` 在 OpenAPI 中标记 API 端点可用 --- -`x-fern-availability` 扩展用于在您的 OpenAPI 定义中标记端点的可用性。可用性信息会传播到生成的 Fern Docs 网站中,显示为视觉标签、SDK 和 [CLI](/learn/cli-generator/get-started/openapi-extensions#availability-badges)。 +`x-fern-availability` 扩展用于在您的 OpenAPI 定义中标记端点的可用性。可用性信息会传播到生成的 Fern Docs 网站中,显示为视觉标签、SDK 和 [CLI](/learn/zh/cli-generator/get-started/openapi-extensions#availability-badges)。 -您可以在 [`docs.yml` 文件](/learn/docs/configuration/site-level-settings) 中配置 API 参考文档部分的 `availability`。 +您可以在 [`docs.yml` 文件](/learn/zh/docs/configuration/site-level-settings) 中配置 API 参考文档部分的 `availability`。 ## 端点 diff --git a/fern/translations/zh/products/api-def/openapi/extensions/default.mdx b/fern/translations/zh/products/api-def/openapi/extensions/default.mdx index 466012347d..0f517cccd9 100644 --- a/fern/translations/zh/products/api-def/openapi/extensions/default.mdx +++ b/fern/translations/zh/products/api-def/openapi/extensions/default.mdx @@ -4,7 +4,7 @@ headline: 默认值 (OpenAPI) description: 使用 `x-fern-default` 为生成的 SDK 中的路径、头部和查询参数设置客户端默认值。 --- -`x-fern-default` 扩展让你可以为路径、头部或查询参数指定客户端默认值,包括在 [`x-fern-global-headers`](/learn/api-definitions/openapi/extensions/global-headers) 下定义的头部。当存在此扩展时,生成的 SDK 会使参数变为可选,并在调用方省略时自动发送默认值。`x-fern-default` 支持 `string` 和 `boolean` 值;其他类型(如数字)会被忽略。 +`x-fern-default` 扩展让你可以为路径、头部或查询参数指定客户端默认值,包括在 [`x-fern-global-headers`](/learn/zh/api-definitions/openapi/extensions/global-headers) 下定义的头部。当存在此扩展时,生成的 SDK 会使参数变为可选,并在调用方省略时自动发送默认值。`x-fern-default` 支持 `string` 和 `boolean` 值;其他类型(如数字)会被忽略。 这对于固定 API 版本头部或区域路径参数非常有用,同时仍允许调用方覆盖该值。`x-fern-default` 在所有 SDK 语言中都受支持。 diff --git a/fern/translations/zh/products/api-def/openapi/extensions/examples.mdx b/fern/translations/zh/products/api-def/openapi/extensions/examples.mdx index 2a1558518f..61e7bdf7d9 100644 --- a/fern/translations/zh/products/api-def/openapi/extensions/examples.mdx +++ b/fern/translations/zh/products/api-def/openapi/extensions/examples.mdx @@ -8,14 +8,14 @@ og:title: OpenAPI 请求 + 响应示例 -Fern 使用 [AI 生成的示例](/learn/docs/ai-features/ai-examples) 自动生成真实的示例,默认启用。使用 `x-fern-examples` 手动定义特定的示例值。手动示例优先于 AI 生成的示例。您也可以[完全禁用 AI 示例](/learn/docs/configuration/site-level-settings#ai-examplesenabled)。 +Fern 使用 [AI 生成的示例](/learn/zh/docs/ai-features/ai-examples) 自动生成真实的示例,默认启用。使用 `x-fern-examples` 手动定义特定的示例值。手动示例优先于 AI 生成的示例。您也可以[完全禁用 AI 示例](/learn/zh/docs/configuration/site-level-settings#ai-examplesenabled)。 -当您需要关联特定的请求和响应对,或为端点定义多个命名示例时,请使用 `x-fern-examples`。虽然 OpenAPI 有多个示例字段,但它无法将请求与其对应的响应关联起来。如果您需要您的示例与非 Fern 的 OpenAPI 工具兼容,请使用 [`fern api enrich`](/learn/cli-api-reference/cli-reference/commands#fern-api-enrich) 将 `x-fern-examples` 转换为原生 OpenAPI 示例字段。 +当您需要关联特定的请求和响应对,或为端点定义多个命名示例时,请使用 `x-fern-examples`。虽然 OpenAPI 有多个示例字段,但它无法将请求与其对应的响应关联起来。如果您需要您的示例与非 Fern 的 OpenAPI 工具兼容,请使用 [`fern api enrich`](/learn/zh/cli-api-reference/cli-reference/commands#fern-api-enrich) 将 `x-fern-examples` 转换为原生 OpenAPI 示例字段。 `x-fern-examples` 是一个数组,其中每个元素可以包含关联的 `path-parameters`、`query-parameters`、`headers`、`request` 和 `response` 值。可选地,添加 `name` 字段为每个示例提供描述性标签。 -如果您[通过 `x-fern-global-headers` 扩展定义了全局标头](/learn/api-definitions/openapi/extensions/global-headers),您必须在示例中包含这些标头。 +如果您[通过 `x-fern-global-headers` 扩展定义了全局标头](/learn/zh/api-definitions/openapi/extensions/global-headers),您必须在示例中包含这些标头。 按以下方式构造 `request` 和 `response`: diff --git a/fern/translations/zh/products/api-def/openapi/extensions/explorer.mdx b/fern/translations/zh/products/api-def/openapi/extensions/explorer.mdx index 2adceddb53..2705f8cc01 100644 --- a/fern/translations/zh/products/api-def/openapi/extensions/explorer.mdx +++ b/fern/translations/zh/products/api-def/openapi/extensions/explorer.mdx @@ -5,7 +5,7 @@ description: 使用 `x-fern-explorer` 启用或禁用 API Explorer sidebar-title: API Explorer 控制 --- -[API Explorer](/learn/docs/api-references/api-explorer) 默认为所有端点启用。使用 `x-fern-explorer` 全局禁用或按操作覆盖。这通常用于对破坏性操作、支付处理或仅限管理员的端点禁用 Explorer。 +[API Explorer](/learn/zh/docs/api-references/api-explorer) 默认为所有端点启用。使用 `x-fern-explorer` 全局禁用或按操作覆盖。这通常用于对破坏性操作、支付处理或仅限管理员的端点禁用 Explorer。 ## 全局 diff --git a/fern/translations/zh/products/api-def/openapi/extensions/global-headers.mdx b/fern/translations/zh/products/api-def/openapi/extensions/global-headers.mdx index 71f01a26be..32b7405eca 100644 --- a/fern/translations/zh/products/api-def/openapi/extensions/global-headers.mdx +++ b/fern/translations/zh/products/api-def/openapi/extensions/global-headers.mdx @@ -30,12 +30,12 @@ x-fern-global-headers: ``` - 当您使用 `x-fern-global-headers` 定义全局请求头时,您必须[在 `x-fern-examples` 中包含它们](/learn/api-definitions/openapi/extensions/request-response-examples)。 + 当您使用 `x-fern-global-headers` 定义全局请求头时,您必须[在 `x-fern-examples` 中包含它们](/learn/zh/api-definitions/openapi/extensions/request-response-examples)。 ### 默认值 -使用 [`x-fern-default`](/learn/api-definitions/openapi/extensions/default-values) 为全局请求头设置客户端默认值。生成的 SDK 会将请求头设置为可选,并在调用者省略时发送默认值: +使用 [`x-fern-default`](/learn/zh/api-definitions/openapi/extensions/default-values) 为全局请求头设置客户端默认值。生成的 SDK 会将请求头设置为可选,并在调用者省略时发送默认值: ```yaml {4} title="openapi.yml" x-fern-global-headers: @@ -46,7 +46,7 @@ x-fern-global-headers: ## 在 `generators.yml` 中 -或者,您可以将请求头添加到[`generators.yml` 文件中的 `api` 块](/learn/sdks/reference/generators-yml#headers): +或者,您可以将请求头添加到[`generators.yml` 文件中的 `api` 块](/learn/zh/sdks/reference/generators-yml#headers): ```yaml title="generators.yml" api: diff --git a/fern/translations/zh/products/api-def/openapi/extensions/global-parameters.mdx b/fern/translations/zh/products/api-def/openapi/extensions/global-parameters.mdx index d67978d251..845701b95a 100644 --- a/fern/translations/zh/products/api-def/openapi/extensions/global-parameters.mdx +++ b/fern/translations/zh/products/api-def/openapi/extensions/global-parameters.mdx @@ -6,7 +6,7 @@ description: 使用 `x-fern-global-parameters` 扩展声明在客户端级别设 **全局参数**是在 SDK 客户端级别或 CLI 配置级别设置一次,并注入到每个相关请求中的值,而不是在每次调用时传递。每次调用的值始终优先于全局值。 -全局参数与[全局请求头](/learn/api-definitions/openapi/extensions/global-headers)不同:全局请求头始终是 header,而全局参数可以目标为 header、query 参数、path 参数或请求体中的字段。 +全局参数与[全局请求头](/learn/zh/api-definitions/openapi/extensions/global-headers)不同:全局请求头始终是 header,而全局参数可以目标为 header、query 参数、path 参数或请求体中的字段。 ## 声明全局参数 @@ -53,7 +53,7 @@ x-fern-global-parameters: - 当调用者和环境变量都未提供值时使用的客户端默认值。[`x-fern-default`](/learn/api-definitions/openapi/extensions/default-values) 优先于 `default`。 + 当调用者和环境变量都未提供值时使用的客户端默认值。[`x-fern-default`](/learn/zh/api-definitions/openapi/extensions/default-values) 优先于 `default`。 @@ -103,4 +103,4 @@ paths: ## 生成的 CLI 行为 -[CLI 生成器](/learn/cli-generator/get-started/openapi-extensions#global-parameters)将每个全局参数注册为顶级标志(带有其 `env` 回退和 `default`),并将解析后的值注入到每个适用命令的声明位置。 +[CLI 生成器](/learn/zh/cli-generator/get-started/openapi-extensions#global-parameters)将每个全局参数注册为顶级标志(带有其 `env` 回退和 `default`),并将解析后的值注入到每个适用命令的声明位置。 diff --git a/fern/translations/zh/products/api-def/openapi/extensions/ignore.mdx b/fern/translations/zh/products/api-def/openapi/extensions/ignore.mdx index 18f6c32c99..0840bb6ed8 100644 --- a/fern/translations/zh/products/api-def/openapi/extensions/ignore.mdx +++ b/fern/translations/zh/products/api-def/openapi/extensions/ignore.mdx @@ -62,7 +62,7 @@ paths: ``` -要在不修改基础规范的情况下跳过参数,请在您的[覆盖文件](/learn/api-definitions/openapi/overrides)中使用 `null` 值来删除参数: +要在不修改基础规范的情况下跳过参数,请在您的[覆盖文件](/learn/zh/api-definitions/openapi/overrides)中使用 `null` 值来删除参数: ```yaml title="overrides.yml" {5} paths: diff --git a/fern/translations/zh/products/api-def/openapi/extensions/method-names.mdx b/fern/translations/zh/products/api-def/openapi/extensions/method-names.mdx index fe52b4462a..d9b41eaf20 100644 --- a/fern/translations/zh/products/api-def/openapi/extensions/method-names.mdx +++ b/fern/translations/zh/products/api-def/openapi/extensions/method-names.mdx @@ -4,7 +4,7 @@ headline: 自定义 SDK 方法名称 (OpenAPI) description: 使用 `x-fern-sdk-method-name` 和 `x-fern-sdk-group-name` 来精细调整 SDK 命名。 --- -使用 `x-fern-sdk-group-name` 和 `x-fern-sdk-method-name` 扩展来控制端点在您的 [SDK](/learn/sdks/overview/introduction) 和 [CLI](/learn/cli-generator/get-started/openapi-extensions) 中的组织方式。 +使用 `x-fern-sdk-group-name` 和 `x-fern-sdk-method-name` 扩展来控制端点在您的 [SDK](/learn/zh/sdks/overview/introduction) 和 [CLI](/learn/zh/cli-generator/get-started/openapi-extensions) 中的组织方式。 如果没有扩展存在,Fern 使用您的 operation ID 来生成 SDK 方法名称。将 operation ID 格式化为 `{tag_name}_{operation_name}`(例如:`users_get`)以自动生成类似 `users.get()` 的方法。如果 operation ID 不以 tag 开头,Fern 会直接将其用作方法名称。 diff --git a/fern/translations/zh/products/api-def/openapi/extensions/pagination.mdx b/fern/translations/zh/products/api-def/openapi/extensions/pagination.mdx index 86763662c8..29dbe004c6 100644 --- a/fern/translations/zh/products/api-def/openapi/extensions/pagination.mdx +++ b/fern/translations/zh/products/api-def/openapi/extensions/pagination.mdx @@ -7,7 +7,7 @@ description: 使用 x-fern-pagination 扩展为列表端点配置自动分页 -`x-fern-pagination` 扩展为 OpenAPI 规范中的列表端点配置自动分页。[SDK](/learn/sdks/deep-dives/auto-pagination) 和 [CLI](/learn/cli-generator/get-started/openapi-extensions#pagination) 用户无需手动管理页面令牌即可获得自动分页功能。 +`x-fern-pagination` 扩展为 OpenAPI 规范中的列表端点配置自动分页。[SDK](/learn/zh/sdks/deep-dives/auto-pagination) 和 [CLI](/learn/zh/cli-generator/get-started/openapi-extensions#pagination) 用户无需手动管理页面令牌即可获得自动分页功能。 要配置分页: diff --git a/fern/translations/zh/products/api-def/openapi/extensions/tag-display-name.mdx b/fern/translations/zh/products/api-def/openapi/extensions/tag-display-name.mdx index 92d6e7f3bd..6be3e087cd 100644 --- a/fern/translations/zh/products/api-def/openapi/extensions/tag-display-name.mdx +++ b/fern/translations/zh/products/api-def/openapi/extensions/tag-display-name.mdx @@ -41,8 +41,8 @@ paths: summary: List watering schedules ``` -您还可以在[覆盖文件](/learn/api-definitions/openapi/overrides)中设置显示名称。 +您还可以在[覆盖文件](/learn/zh/api-definitions/openapi/overrides)中设置显示名称。 - 或者,您也可以直接在[`docs.yml` 文件](/learn/docs/api-references/customize-api-reference-layout)中重命名章节。 + 或者,您也可以直接在[`docs.yml` 文件](/learn/zh/docs/api-references/customize-api-reference-layout)中重命名章节。 \ No newline at end of file diff --git a/fern/translations/zh/products/api-def/openapi/overlays.mdx b/fern/translations/zh/products/api-def/openapi/overlays.mdx index b054977682..a6c51fca0d 100644 --- a/fern/translations/zh/products/api-def/openapi/overlays.mdx +++ b/fern/translations/zh/products/api-def/openapi/overlays.mdx @@ -6,7 +6,7 @@ description: 使用 OpenAPI 叠加层规范来自定义您的 OpenAPI 定义, 叠加层允许您在不修改原始文件的情况下自定义 OpenAPI 规范。这在以下情况下很有用: - 您的 API 规范是从服务器代码自动生成的 -- 您需要为 SDK、文档或[生成的 CLI](/learn/cli-generator/get-started/customization#overrides-and-overlays) 配置不同的设置 +- 您需要为 SDK、文档或[生成的 CLI](/learn/zh/cli-generator/get-started/customization#overrides-and-overlays) 配置不同的设置 - 您想要添加 Fern 配置,如分页或 SDK 方法名称 - 您想要使用 JSONPath 通配符对多个端点进行批量更改 @@ -15,7 +15,7 @@ description: 使用 OpenAPI 叠加层规范来自定义您的 OpenAPI 定义, Fern 推荐对 OpenAPI 规范使用叠加层而非覆盖。 - [覆盖](/learn/api-definitions/openapi/overrides) 也完全受支持。如果覆盖对您的团队有效,则无需切换。您也可以同时使用两者(先应用覆盖,再应用叠加层)。 + [覆盖](/learn/zh/api-definitions/openapi/overrides) 也完全受支持。如果覆盖对您的团队有效,则无需切换。您也可以同时使用两者(先应用覆盖,再应用叠加层)。 ## 配置叠加层 @@ -71,7 +71,7 @@ actions: -使用 `update` 添加 [Fern 扩展](/learn/api-definitions/openapi/extensions/overview): +使用 `update` 添加 [Fern 扩展](/learn/zh/api-definitions/openapi/extensions/overview): ```yaml title="openapi-overlays.yml" overlay: 1.0.0 diff --git a/fern/translations/zh/products/api-def/openapi/overview.mdx b/fern/translations/zh/products/api-def/openapi/overview.mdx index 9e302bc17a..2ef6b970cb 100644 --- a/fern/translations/zh/products/api-def/openapi/overview.mdx +++ b/fern/translations/zh/products/api-def/openapi/overview.mdx @@ -104,8 +104,8 @@ components: 遵循这些最佳实践,确保您的 OpenAPI 规范生成高质量的 SDK 和文档: -- **使用合适的项目结构进行组织。** 按照[项目结构](/learn/api-definitions/overview/project-structure)中的说明,清晰地组织包含您的定义和其他相关文件的目录。 -- **为端点添加 `operationId`。** 为每个端点包含清晰的 `operationId`,以控制在 SDK 中生成的函数名称。(或使用[扩展来自定义组和方法名称](/learn/api-definitions/openapi/extensions/method-names)。) +- **使用合适的项目结构进行组织。** 按照[项目结构](/learn/zh/api-definitions/overview/project-structure)中的说明,清晰地组织包含您的定义和其他相关文件的目录。 +- **为端点添加 `operationId`。** 为每个端点包含清晰的 `operationId`,以控制在 SDK 中生成的函数名称。(或使用[扩展来自定义组和方法名称](/learn/zh/api-definitions/openapi/extensions/method-names)。) - **引用模式而不是内联。** 在 `components/schemas` 部分定义可重用的模式,并使用 `$ref` 引用它们。这促进了一致性,减少了重复,并使维护更容易。 ```yaml title="openapi.yml" {8, 14, 17-25} @@ -135,7 +135,7 @@ components: enum: [available, pending, sold] ``` -- **使用覆盖层和 Fern 扩展进行自定义。** 使用 Fern [扩展](/learn/api-definitions/openapi/extensions/overview)来自定义您的规范,这些扩展保存在[覆盖层文件](/learn/api-definitions/openapi/overlays)中。这使您能够修改生成行为,而不更改核心 OpenAPI 定义。 +- **使用覆盖层和 Fern 扩展进行自定义。** 使用 Fern [扩展](/learn/zh/api-definitions/openapi/extensions/overview)来自定义您的规范,这些扩展保存在[覆盖层文件](/learn/zh/api-definitions/openapi/overlays)中。这使您能够修改生成行为,而不更改核心 OpenAPI 定义。 一旦您的 OpenAPI 规范遵循这些实践,您就可以设置 fern 文件夹了。 diff --git a/fern/translations/zh/products/api-def/openapi/reference/generators-reference.mdx b/fern/translations/zh/products/api-def/openapi/reference/generators-reference.mdx index a69d2c11fa..b724f53f55 100644 --- a/fern/translations/zh/products/api-def/openapi/reference/generators-reference.mdx +++ b/fern/translations/zh/products/api-def/openapi/reference/generators-reference.mdx @@ -6,6 +6,6 @@ sidebar-title: OpenAPI generators.yml 参考 `generators.yml` 文件有两个作用:它在 `api.specs` 部分声明你的 OpenAPI 规范位置,并在可选的 `groups` 部分配置 SDK 生成。 -这里声明的 API 可以通过 `docs.yml` 在你的文档中渲染。请参阅[生成你的 API 参考文档](/learn/docs/api-references/generate-api-ref)。 +这里声明的 API 可以通过 `docs.yml` 在你的文档中渲染。请参阅[生成你的 API 参考文档](/learn/zh/docs/api-references/generate-api-ref)。 \ No newline at end of file diff --git a/fern/translations/zh/products/api-def/openapi/server-frameworks/fastapi.mdx b/fern/translations/zh/products/api-def/openapi/server-frameworks/fastapi.mdx index 81e381eb48..58f2bfd1b8 100644 --- a/fern/translations/zh/products/api-def/openapi/server-frameworks/fastapi.mdx +++ b/fern/translations/zh/products/api-def/openapi/server-frameworks/fastapi.mdx @@ -71,7 +71,7 @@ async def your_post_endpoint( FastAPI 允许您为数据模型指定示例,Fern 将自动获取并在生成的 SDK 和文档中使用这些示例。 -有关在 Fern 中利用示例的更多信息,请参阅 [Fern 文档](/learn/api-definitions/openapi/extensions/request-response-examples)。 +有关在 Fern 中利用示例的更多信息,请参阅 [Fern 文档](/learn/zh/api-definitions/openapi/extensions/request-response-examples)。 有关此 FastAPI 功能的更多信息,请参阅 [FastAPI 文档](https://fastapi.tiangolo.com/tutorial/schema-extra-example/)。 diff --git a/fern/translations/zh/products/api-def/openapi/webhooks.mdx b/fern/translations/zh/products/api-def/openapi/webhooks.mdx index 34333d03b9..12b2d2e6f6 100644 --- a/fern/translations/zh/products/api-def/openapi/webhooks.mdx +++ b/fern/translations/zh/products/api-def/openapi/webhooks.mdx @@ -124,7 +124,7 @@ navigation: - subpackage_plants.newPlantWebhook # subpackage_{tag}.{webhook-event-name} ``` -有关如何在 `docs.yml` 中配置 webhook 参考的更多信息,请参阅[生成 webhook 参考](/learn/docs/api-references/generate-webhook-ref)。 +有关如何在 `docs.yml` 中配置 webhook 参考的更多信息,请参阅[生成 webhook 参考](/learn/zh/docs/api-references/generate-webhook-ref)。 ## SDK 签名验证 diff --git a/fern/translations/zh/products/api-def/pages/asyncapi-empty.mdx b/fern/translations/zh/products/api-def/pages/asyncapi-empty.mdx index 241760434e..14678f02df 100644 --- a/fern/translations/zh/products/api-def/pages/asyncapi-empty.mdx +++ b/fern/translations/zh/products/api-def/pages/asyncapi-empty.mdx @@ -5,4 +5,4 @@ sidebar-title: AsyncAPI 定义重定向页面 --- -此页面为空。请访问 [AsyncAPI 定义](/learn/api-definitions/asyncapi/overview) 页面获取更多信息。 \ No newline at end of file +此页面为空。请访问 [AsyncAPI 定义](/learn/zh/api-definitions/asyncapi/overview) 页面获取更多信息。 \ No newline at end of file diff --git a/fern/translations/zh/products/api-def/pages/ferndef-empty.mdx b/fern/translations/zh/products/api-def/pages/ferndef-empty.mdx index 06a2db457d..fd06a6664a 100644 --- a/fern/translations/zh/products/api-def/pages/ferndef-empty.mdx +++ b/fern/translations/zh/products/api-def/pages/ferndef-empty.mdx @@ -5,4 +5,4 @@ sidebar-title: Fern 定义重定向页面 --- -此页面为空。请访问 [Fern 定义](/learn/api-definitions/ferndef/overview) 页面获取更多信息。 \ No newline at end of file +此页面为空。请访问 [Fern 定义](/learn/zh/api-definitions/ferndef/overview) 页面获取更多信息。 \ No newline at end of file diff --git a/fern/translations/zh/products/api-def/pages/grpc-empty.mdx b/fern/translations/zh/products/api-def/pages/grpc-empty.mdx index b82a3b6e5f..f0d74ba9aa 100644 --- a/fern/translations/zh/products/api-def/pages/grpc-empty.mdx +++ b/fern/translations/zh/products/api-def/pages/grpc-empty.mdx @@ -5,4 +5,4 @@ sidebar-title: gRPC 定义重定向页面 --- -此页面为空。请访问 [gRPC 定义](/learn/api-definitions/grpc/overview) 页面获取更多信息。 \ No newline at end of file +此页面为空。请访问 [gRPC 定义](/learn/zh/api-definitions/grpc/overview) 页面获取更多信息。 \ No newline at end of file diff --git a/fern/translations/zh/products/api-def/pages/openapi-empty.mdx b/fern/translations/zh/products/api-def/pages/openapi-empty.mdx index 53afc6b79c..0bac0251cc 100644 --- a/fern/translations/zh/products/api-def/pages/openapi-empty.mdx +++ b/fern/translations/zh/products/api-def/pages/openapi-empty.mdx @@ -5,4 +5,4 @@ sidebar-title: OpenAPI 定义重定向页面 --- -此页面为空。请访问 [OpenAPI 定义](/learn/api-definitions/openapi/overview) 页面获取更多信息。 \ No newline at end of file +此页面为空。请访问 [OpenAPI 定义](/learn/zh/api-definitions/openapi/overview) 页面获取更多信息。 \ No newline at end of file diff --git a/fern/translations/zh/products/api-def/pages/openrpc-empty.mdx b/fern/translations/zh/products/api-def/pages/openrpc-empty.mdx index b67c095da0..510a111fc9 100644 --- a/fern/translations/zh/products/api-def/pages/openrpc-empty.mdx +++ b/fern/translations/zh/products/api-def/pages/openrpc-empty.mdx @@ -5,4 +5,4 @@ sidebar-title: OpenRPC 定义重定向页面 --- -此页面为空。请访问 [OpenRPC 定义](/learn/api-definitions/openrpc/overview) 页面获取更多信息。 \ No newline at end of file +此页面为空。请访问 [OpenRPC 定义](/learn/zh/api-definitions/openrpc/overview) 页面获取更多信息。 \ No newline at end of file diff --git a/fern/translations/zh/products/api-def/pages/overrides.mdx b/fern/translations/zh/products/api-def/pages/overrides.mdx index 89c99406f5..b7515c693d 100644 --- a/fern/translations/zh/products/api-def/pages/overrides.mdx +++ b/fern/translations/zh/products/api-def/pages/overrides.mdx @@ -6,12 +6,12 @@ description: 使用单独的重写文件自定义您的 API 定义。 使用重写文件来自定义您的 OpenAPI、AsyncAPI 或 OpenRPC 定义,而无需修改原始规范。这在以下情况下很有用: * 您的 API 规范是从服务器代码自动生成的 -* 您需要为 SDK、文档或[生成的 CLI](/learn/cli-generator/get-started/customization#overrides-and-overlays) 使用不同的配置 +* 您需要为 SDK、文档或[生成的 CLI](/learn/zh/cli-generator/get-started/customization#overrides-and-overlays) 使用不同的配置 重写功能适用于 OpenAPI、AsyncAPI 和 OpenRPC 规范。 - 对于 OpenAPI 规范,Fern 推荐使用[覆盖层](/learn/api-definitions/openapi/overlays)而不是重写。覆盖层遵循官方的 [OpenAPI Overlay 规范](https://spec.openapis.org/overlay/v1.0.0.html),支持使用 JSONPath 通配符进行批量更改,并且在 OpenAPI 生态系统中是可移植的。 + 对于 OpenAPI 规范,Fern 推荐使用[覆盖层](/learn/zh/api-definitions/openapi/overlays)而不是重写。覆盖层遵循官方的 [OpenAPI Overlay 规范](https://spec.openapis.org/overlay/v1.0.0.html),支持使用 JSONPath 通配符进行批量更改,并且在 OpenAPI 生态系统中是可移植的。 重写功能也完全受支持。如果重写对您的团队有效,则无需切换。您也可以同时使用两者(先应用重写,然后应用覆盖层)。 @@ -21,7 +21,7 @@ description: 使用单独的重写文件自定义您的 API 定义。 -在包含您的 API 定义的文件夹中[创建 `overrides.yml` 文件](/learn/cli-api-reference/cli-reference/commands#fern-write-overrides): +在包含您的 API 定义的文件夹中[创建 `overrides.yml` 文件](/learn/zh/cli-api-reference/cli-reference/commands#fern-write-overrides): ```bash {6} fern/ @@ -37,7 +37,7 @@ fern/ -对于 OpenAPI、AsyncAPI 和 OpenRPC,您可以使用 [Fern 的扩展](/learn/api-definitions/openapi/extensions/overview)来应用自定义。 +对于 OpenAPI、AsyncAPI 和 OpenRPC,您可以使用 [Fern 的扩展](/learn/zh/api-definitions/openapi/extensions/overview)来应用自定义。 ```yml title="overrides.yml" {4-5} paths: diff --git a/fern/translations/zh/products/api-def/pages/project-structure.mdx b/fern/translations/zh/products/api-def/pages/project-structure.mdx index 6c312d00f1..6a8970de27 100644 --- a/fern/translations/zh/products/api-def/pages/project-structure.mdx +++ b/fern/translations/zh/products/api-def/pages/project-structure.mdx @@ -6,7 +6,7 @@ description: 描述 Fern 文件夹结构 配置 fern 从 `fern` 文件夹开始,该文件夹包含您的 API 定义、SDK 生成器和 CLI 版本。 -Fern 推荐使用多仓库结构,将您的 fern 文件夹放在源代码仓库中(包含您的 API 定义和生成配置),并[将每个生成的 SDK 放在各自独立的仓库中](/learn/sdks/overview/project-structure)。 +Fern 推荐使用多仓库结构,将您的 fern 文件夹放在源代码仓库中(包含您的 API 定义和生成配置),并[将每个生成的 SDK 放在各自独立的仓库中](/learn/zh/sdks/overview/project-structure)。 ## 目录结构 @@ -25,7 +25,7 @@ Fern 推荐使用多仓库结构,将您的 fern 文件夹放在源代码仓库 ## 核心配置文件 - 除了核心文件外,您还可以选择使用[覆盖层 (OpenAPI)](/learn/api-definitions/openapi/overlays) 或[重写](/learn/api-definitions/asyncapi/overrides)文件来自定义您的 API 定义,而无需修改原始规范。 + 除了核心文件外,您还可以选择使用[覆盖层 (OpenAPI)](/learn/zh/api-definitions/openapi/overlays) 或[重写](/learn/zh/api-definitions/asyncapi/overrides)文件来自定义您的 API 定义,而无需修改原始规范。 ### `fern.config.json` @@ -40,12 +40,12 @@ Fern 推荐使用多仓库结构,将您的 fern 文件夹放在源代码仓库 ``` - 使用本地安装的 CLI 时,将 `version` 设置为 `"*"`。有关详细信息,请参阅[本地安装 Fern CLI](/learn/cli-api-reference/cli-reference/overview#install-fern-cli-locally)。 + 使用本地安装的 CLI 时,将 `version` 设置为 `"*"`。有关详细信息,请参阅[本地安装 Fern CLI](/learn/zh/cli-api-reference/cli-reference/overview#install-fern-cli-locally)。 ### `generators.yml` -`generators.yml` 文件声明您的 API 规范位置。这还启用了[API 参考文档](/learn/docs/api-references/overview)。 +`generators.yml` 文件声明您的 API 规范位置。这还启用了[API 参考文档](/learn/zh/docs/api-references/overview)。 ```yaml title="generators.yml" api: @@ -53,19 +53,19 @@ api: - openapi: ./openapi/openapi.yml ``` -对于 SDK 生成,需要 `generators.yml` 文件。添加 `groups` 部分来配置要生成哪些 SDK。有关详细信息,请参阅 [SDK 项目结构](/learn/sdks/overview/project-structure#generatorsyml)。 +对于 SDK 生成,需要 `generators.yml` 文件。添加 `groups` 部分来配置要生成哪些 SDK。有关详细信息,请参阅 [SDK 项目结构](/learn/zh/sdks/overview/project-structure#generatorsyml)。 ### API 定义文件 -对于 [OpenAPI](/learn/api-definitions/openapi/overview)、[AsyncAPI](/learn/api-definitions/asyncapi/overview)、[OpenRPC](/learn/api-definitions/openrpc/overview) 和 [gRPC](/learn/api-definitions/grpc/overview),您将有一个自包含的规范文件。 +对于 [OpenAPI](/learn/zh/api-definitions/openapi/overview)、[AsyncAPI](/learn/zh/api-definitions/asyncapi/overview)、[OpenRPC](/learn/zh/api-definitions/openrpc/overview) 和 [gRPC](/learn/zh/api-definitions/grpc/overview),您将有一个自包含的规范文件。 ## 在何处存储您的 API 定义 管理 API 定义有三种常见方式: - **直接提交到您的 Fern 仓库(推荐)。** 将您的 API 定义文件检入包含 Fern 配置的同一仓库。如果您不在其他地方维护定义,这是最简单的方法。 -- **从源代码仓库同步。** 将您的 API 定义存储在与 API 源代码相同的仓库中,并将更新同步到您的 Fern 仓库。您可以使用 [`fern api update`](/learn/cli-api-reference/cli-reference/commands#fern-api-update) CLI 命令或 [sync-openapi GitHub Action](/learn/api-definitions/openapi/sync-your-open-api-specification) 来自动化此过程。 -- **在公共 URL 托管。** 从可公开访问的端点提供定义,并在 `generators.yml` 中配置 [`origin`](/learn/sdks/reference/generators-yml#openapi) 字段,以便 Fern 可以获取它。当您希望有一个多个消费者可以引用的单一权威定义时,这很有用。 +- **从源代码仓库同步。** 将您的 API 定义存储在与 API 源代码相同的仓库中,并将更新同步到您的 Fern 仓库。您可以使用 [`fern api update`](/learn/zh/cli-api-reference/cli-reference/commands#fern-api-update) CLI 命令或 [sync-openapi GitHub Action](/learn/zh/api-definitions/openapi/sync-your-open-api-specification) 来自动化此过程。 +- **在公共 URL 托管。** 从可公开访问的端点提供定义,并在 `generators.yml` 中配置 [`origin`](/learn/zh/sdks/reference/generators-yml#openapi) 字段,以便 Fern 可以获取它。当您希望有一个多个消费者可以引用的单一权威定义时,这很有用。 ## 多个 API @@ -196,7 +196,7 @@ groups: -添加 [`namespace`](/learn/sdks/reference/generators-yml#namespace) 来处理 API 之间重叠的架构名称或组织不同的 API 版本: +添加 [`namespace`](/learn/zh/sdks/reference/generators-yml#namespace) 来处理 API 之间重叠的架构名称或组织不同的 API 版本: diff --git a/fern/translations/zh/products/api-def/pages/what-is-an-api-definition.mdx b/fern/translations/zh/products/api-def/pages/what-is-an-api-definition.mdx index db9a7bd18f..014a71ab67 100644 --- a/fern/translations/zh/products/api-def/pages/what-is-an-api-definition.mdx +++ b/fern/translations/zh/products/api-def/pages/what-is-an-api-definition.mdx @@ -269,28 +269,28 @@ Fern 集成了多种 API 定义格式: 多种语言的客户端库,自动与你的 API 保持同步。 包含代码示例和实时测试功能的交互式 API 文档。 } - href="/learn/docs/integrations/postman" + href="/learn/zh/docs/integrations/postman" > 预填充示例请求和响应的即用型集合。 } - href="/learn/api-definitions/openapi/frameworks/fastapi" + href="/learn/zh/api-definitions/openapi/frameworks/fastapi" > 适用于 FastAPI 的 Pydantic 模型或 Spring Boot 应用程序的控制器。 diff --git a/fern/translations/zh/products/cli-api-reference/pages/cli-get-started.mdx b/fern/translations/zh/products/cli-api-reference/pages/cli-get-started.mdx index 2fe9f5ef7e..4e253b645c 100644 --- a/fern/translations/zh/products/cli-api-reference/pages/cli-get-started.mdx +++ b/fern/translations/zh/products/cli-api-reference/pages/cli-get-started.mdx @@ -58,7 +58,7 @@ npm install fern-api } ``` -有关更多详细信息,请参阅 [fern.config.json 参考](/learn/sdks/overview/project-structure#fernconfigjson)。 +有关更多详细信息,请参阅 [fern.config.json 参考](/learn/zh/sdks/overview/project-structure#fernconfigjson)。 @@ -76,13 +76,13 @@ npm fern generate ## 按产品分类的 CLI 工作流程 -Fern CLI 管理文档和 SDK 工作流程。以下是每个产品常用命令的简要概述。所有命令都支持[全局选项](/learn/cli-api-reference/cli-reference/options),如用于调试的 `--log-level`。 +Fern CLI 管理文档和 SDK 工作流程。以下是每个产品常用命令的简要概述。所有命令都支持[全局选项](/learn/zh/cli-api-reference/cli-reference/options),如用于调试的 `--log-level`。 -有关完整的 CLI 文档,请参阅[命令参考](/learn/cli-api-reference/cli-reference/commands)。 +有关完整的 CLI 文档,请参阅[命令参考](/learn/zh/cli-api-reference/cli-reference/commands)。 - 在使用 Fern Docs 时,您将使用这些 CLI 命令。有关完整说明,请参阅[文档快速入门](/learn/docs/getting-started/quickstart)。 + 在使用 Fern Docs 时,您将使用这些 CLI 命令。有关完整说明,请参阅[文档快速入门](/learn/zh/docs/getting-started/quickstart)。 | 命令 | 描述 | |---------|-------------| @@ -92,7 +92,7 @@ Fern CLI 管理文档和 SDK 工作流程。以下是每个产品常用命令的 - 在使用 Fern SDK 时,您将使用这些 CLI 命令。有关完整说明,请参阅[SDK 快速入门](/learn/sdks/overview/quickstart)。 + 在使用 Fern SDK 时,您将使用这些 CLI 命令。有关完整说明,请参阅[SDK 快速入门](/learn/zh/sdks/overview/quickstart)。 | 命令 | 描述 | |---------|-------------| diff --git a/fern/translations/zh/products/cli-api-reference/pages/commands.mdx b/fern/translations/zh/products/cli-api-reference/pages/commands.mdx index b1bf2620ee..a127bd0bc0 100644 --- a/fern/translations/zh/products/cli-api-reference/pages/commands.mdx +++ b/fern/translations/zh/products/cli-api-reference/pages/commands.mdx @@ -98,7 +98,7 @@ hideOnThisPage: true background: '#000000' ``` - 要发布 API 文档,运行 [`fern generate --docs`](/learn/cli-api/cli-reference/commands#fern-generate---docs)。 + 要发布 API 文档,运行 [`fern generate --docs`](/learn/zh/cli-api-reference/cli-reference/commands#fern-generate---docs)。 ### mintlify @@ -140,13 +140,13 @@ hideOnThisPage: true - 更多关于入门的信息,请查看我们的[快速入门指南](/learn/docs/getting-started/quickstart) + 更多关于入门的信息,请查看我们的[快速入门指南](/learn/zh/docs/getting-started/quickstart) - 使用 `fern export` 为你的 API 生成 OpenAPI 规范。当你用 OpenAPI 以外的格式(如 [Fern Definition](/learn/api-definitions/ferndef/overview))定义 API 并需要将其导出以集成其他工具或服务时,这很有用。 + 使用 `fern export` 为你的 API 生成 OpenAPI 规范。当你用 OpenAPI 以外的格式(如 [Fern Definition](/learn/zh/api-definitions/ferndef/overview))定义 API 并需要将其导出以集成其他工具或服务时,这很有用。 @@ -180,7 +180,7 @@ hideOnThisPage: true ### group - 使用 `--group ` 指定要运行哪个生成器组。你可以使用组名或别名。别名[在你的 `generators.yml` 中定义](/learn/sdks/reference/generators-yml#aliases),映射到多个组,允许你通过单个命令并行运行多个组。 + 使用 `--group ` 指定要运行哪个生成器组。你可以使用组名或别名。别名[在你的 `generators.yml` 中定义](/learn/zh/sdks/reference/generators-yml#aliases),映射到多个组,允许你通过单个命令并行运行多个组。 ```bash # 运行特定组 @@ -198,7 +198,7 @@ hideOnThisPage: true 你也可以在 `generators.yml` 中设置别名作为 `default-group`,这样不带任何参数运行 `fern generate` 会运行该别名中的所有组。 - `--group` 标志可以与其他标志组合使用,如用于[自托管 SDK 生成](/learn/sdks/deep-dives/self-hosted)的 `--local`、用于本地测试的 `--preview` 或用于指定 SDK 版本的 `--version`。 + `--group` 标志可以与其他标志组合使用,如用于[自托管 SDK 生成](/learn/zh/sdks/deep-dives/self-hosted)的 `--local`、用于本地测试的 `--preview` 或用于指定 SDK 版本的 `--version`。 ### preview @@ -246,7 +246,7 @@ hideOnThisPage: true ### local - 使用 `--local` 在你自己的机器上运行 SDK 生成,而不是使用 Fern 的云基础设施。这对于有严格安全或合规要求的组织很有用。设置说明请参阅[自托管 SDK](/learn/sdks/deep-dives/self-hosted)。 + 使用 `--local` 在你自己的机器上运行 SDK 生成,而不是使用 Fern 的云基础设施。这对于有严格安全或合规要求的组织很有用。设置说明请参阅[自托管 SDK](/learn/zh/sdks/deep-dives/self-hosted)。 ```bash # 本地生成所有 SDK @@ -260,7 +260,7 @@ hideOnThisPage: true 你的机器上必须运行 Docker 守护进程,因为 SDK 生成在 Docker 容器内运行。 - 默认情况下,CLI 从 Docker Hub 拉取生成器镜像。要从自定义容器注册表拉取,在 `generators.yml` 中使用 [`image` 字段](/learn/sdks/reference/generators-yml#image)而不是 `name`。详见[自定义容器注册表](/learn/sdks/deep-dives/self-hosted#optional-configure-a-custom-container-registry)。 + 默认情况下,CLI 从 Docker Hub 拉取生成器镜像。要从自定义容器注册表拉取,在 `generators.yml` 中使用 [`image` 字段](/learn/zh/sdks/reference/generators-yml#image)而不是 `name`。详见[自定义容器注册表](/learn/zh/sdks/deep-dives/self-hosted#optional-configure-a-custom-container-registry)。 ### force @@ -276,12 +276,12 @@ hideOnThisPage: true - `--broken-links` 和 `--strict-broken-links` 标志已弃用。请改用 `docs.yml` 中的 [`broken-links` 验证规则](/learn/docs/configuration/site-level-settings#check-configuration)。 + `--broken-links` 和 `--strict-broken-links` 标志已弃用。请改用 `docs.yml` 中的 [`broken-links` 验证规则](/learn/zh/docs/configuration/site-level-settings#check-configuration)。 - 使用 `fern check` 验证你的 API 定义和 Fern 配置,包括 [`fern.config.json`](/learn/sdks/overview/project-structure#fernconfigjson)、`generators.yml` 和 `docs.yml`。它检查失效链接、无效的 API 示例、配置错误等。当所有检查通过时,命令不产生输出。 + 使用 `fern check` 验证你的 API 定义和 Fern 配置,包括 [`fern.config.json`](/learn/zh/sdks/overview/project-structure#fernconfigjson)、`generators.yml` 和 `docs.yml`。它检查失效链接、无效的 API 示例、配置错误等。当所有检查通过时,命令不产生输出。 - 大多数 `fern check` 规则——包括 [`broken-links`](/learn/docs/configuration/site-level-settings#check-configuration)——根据从**本地**配置构建的导航树进行验证,不会爬取你的实时部署站点或跟踪外部 URL。例外是 [`missing-redirects` 规则](/learn/docs/seo/redirects#catching-missing-redirects),它将本地导航与先前发布的状态进行比较,因此需要 `fern login` 或 `FERN_TOKEN`。 + 大多数 `fern check` 规则——包括 [`broken-links`](/learn/zh/docs/configuration/site-level-settings#check-configuration)——根据从**本地**配置构建的导航树进行验证,不会爬取你的实时部署站点或跟踪外部 URL。例外是 [`missing-redirects` 规则](/learn/zh/docs/seo/redirects#catching-missing-redirects),它将本地导航与先前发布的状态进行比较,因此需要 `fern login` 或 `FERN_TOKEN`。 ```bash @@ -289,7 +289,7 @@ hideOnThisPage: true ``` - 你可以[使用 `check.rules` 属性](/learn/docs/configuration/site-level-settings#check-configuration)在 `docs.yml` 文件中配置 `fern check` 运行的验证规则的严重性。 + 你可以[使用 `check.rules` 属性](/learn/zh/docs/configuration/site-level-settings#check-configuration)在 `docs.yml` 文件中配置 `fern check` 运行的验证规则的严重性。 ```yaml docs.yml check: @@ -385,7 +385,7 @@ hideOnThisPage: true # -> https://your-org-preview-my-feature.docs.buildwithfern.com ``` - 这在 CI 工作流中很有用,你希望每个拉取请求有一个预览 URL。详见[预览更改](/learn/docs/preview-publish/preview-changes#preview-links)。 + 这在 CI 工作流中很有用,你希望每个拉取请求有一个预览 URL。详见[预览更改](/learn/zh/docs/preview-publish/preview-changes#preview-links)。 ### force @@ -593,7 +593,7 @@ hideOnThisPage: true - 使用 `fern upgrade` 将 [`fern.config.json`](/learn/sdks/overview/project-structure#fernconfigjson) 中的编译器版本升级到最新版本。它还会将 `generators.yml` 中的生成器升级到其最低兼容版本。 + 使用 `fern upgrade` 将 [`fern.config.json`](/learn/zh/sdks/overview/project-structure#fernconfigjson) 中的编译器版本升级到最新版本。它还会将 `generators.yml` 中的生成器升级到其最低兼容版本。 ```bash @@ -634,7 +634,7 @@ hideOnThisPage: true ``` - 要启用 CI/CD,使用 [`fern token`](/learn/cli-api/cli-reference/commands#fern-token)。 + 要启用 CI/CD,使用 [`fern token`](/learn/zh/cli-api-reference/cli-reference/commands#fern-token)。 @@ -657,7 +657,7 @@ hideOnThisPage: true - 请参阅[发布你的文档](/learn/docs/preview-publish/publishing-your-docs#usage-in-github-actions)了解在自动化发布工作流中使用此令牌的说明。 + 请参阅[发布你的文档](/learn/zh/docs/preview-publish/publishing-your-docs#usage-in-github-actions)了解在自动化发布工作流中使用此令牌的说明。 @@ -774,7 +774,7 @@ hideOnThisPage: true - 从 `generators.yml` 中指定的 `origin` 拉取最新的 OpenAPI 规范并更新本地规范。或者,你可以[通过设置 GitHub Action 来自动化此过程](/learn/api-definitions/openapi/sync-your-open-api-specification)。 + 从 `generators.yml` 中指定的 `origin` 拉取最新的 OpenAPI 规范并更新本地规范。或者,你可以[通过设置 GitHub Action 来自动化此过程](/learn/zh/api-definitions/openapi/sync-your-open-api-specification)。 ```bash @@ -795,7 +795,7 @@ hideOnThisPage: true - 使用 `fern api enrich` 将 [AI 生成的示例](/learn/docs/ai-features/ai-examples)或手动编写的 [`x-fern-examples`](/learn/api-definitions/openapi/extensions/request-response-examples) 转换为任何 OpenAPI 兼容工具都可以使用的可移植 OpenAPI 示例。 + 使用 `fern api enrich` 将 [AI 生成的示例](/learn/zh/docs/ai-features/ai-examples)或手动编写的 [`x-fern-examples`](/learn/zh/api-definitions/openapi/extensions/request-response-examples) 转换为任何 OpenAPI 兼容工具都可以使用的可移植 OpenAPI 示例。 ```bash @@ -830,7 +830,7 @@ hideOnThisPage: true - 使用 `fern docs theme export` 从你的 `docs.yml` 中提取[符合主题条件的字段](/learn/docs/customization/global-themes)到独立目录。导出的 `theme.yml` 及其资源然后可以用 `fern docs theme upload` 上传。 + 使用 `fern docs theme export` 从你的 `docs.yml` 中提取[符合主题条件的字段](/learn/zh/docs/customization/global-themes)到独立目录。导出的 `theme.yml` 及其资源然后可以用 `fern docs theme upload` 上传。 ```bash @@ -852,7 +852,7 @@ hideOnThisPage: true - 使用 `fern docs theme upload` 将[主题](/learn/docs/customization/global-themes)上传到 Fern 的注册表。该命令从 `./fern/theme/` 读取 `theme.yml` 并将其与任何引用的文件资源一起上传。 + 使用 `fern docs theme upload` 将[主题](/learn/zh/docs/customization/global-themes)上传到 Fern 的注册表。该命令从 `./fern/theme/` 读取 `theme.yml` 并将其与任何引用的文件资源一起上传。 ```bash @@ -880,7 +880,7 @@ hideOnThisPage: true - 使用 `fern docs theme list` 列出为你组织上传的所有[主题](/learn/docs/customization/global-themes)。 + 使用 `fern docs theme list` 列出为你组织上传的所有[主题](/learn/zh/docs/customization/global-themes)。 ```bash diff --git a/fern/translations/zh/products/cli-generator/configuration.mdx b/fern/translations/zh/products/cli-generator/configuration.mdx index a9997d082b..467f01dece 100644 --- a/fern/translations/zh/products/cli-generator/configuration.mdx +++ b/fern/translations/zh/products/cli-generator/configuration.mdx @@ -8,7 +8,7 @@ availability: beta CLI 生成器处于抢先体验阶段。[联系我们](https://buildwithfern.com/book-demo?type=cli)开始使用。 -在 `generators.yml` 中配置 CLI 生成器。嵌套在 `config` 下的选项是 CLI 生成器特有的。其余选项(`output`、`github`、`audiences`、`smart-casing`、`metadata`、`api`)与 [SDK 生成器](/learn/sdks/reference/generators-yml)的行为相同。 +在 `generators.yml` 中配置 CLI 生成器。嵌套在 `config` 下的选项是 CLI 生成器特有的。其余选项(`output`、`github`、`audiences`、`smart-casing`、`metadata`、`api`)与 [SDK 生成器](/learn/zh/sdks/reference/generators-yml)的行为相同。 ```yaml title="generators.yml" {6-8} groups: @@ -27,7 +27,7 @@ groups: ## `config` 选项 -编译后的二进制文件名称。决定可执行文件名、Cargo `[[bin]]` 目标名称,以及用于 [TLS、代理和日志设置](/learn/cli-generator/get-started/features#tls-proxies-and-ca-bundles)的环境变量前缀。 +编译后的二进制文件名称。决定可执行文件名、Cargo `[[bin]]` 目标名称,以及用于 [TLS、代理和日志设置](/learn/zh/cli-generator/get-started/features#tls-proxies-and-ca-bundles)的环境变量前缀。 未设置时,生成器从 API 定义的显示名称派生名称(kebab-case 格式)。多规范工作区必须显式设置此字段——当存在多个规范时,无法进行合理的自动派生。 @@ -60,7 +60,7 @@ config: ### `output` -配置生成的 CLI 的发布位置。CLI 生成器支持 `npm` 和 `local-file-system` 输出位置。完整的发布工作流(OIDC 认证、CI 构建、Homebrew tap)请参见[发布](/learn/cli-generator/get-started/publishing)。基于 Docker 的本地生成请参见[自托管生成](/learn/cli-generator/get-started/local-generation)。 +配置生成的 CLI 的发布位置。CLI 生成器支持 `npm` 和 `local-file-system` 输出位置。完整的发布工作流(OIDC 认证、CI 构建、Homebrew tap)请参见[发布](/learn/zh/cli-generator/get-started/publishing)。基于 Docker 的本地生成请参见[自托管生成](/learn/zh/cli-generator/get-started/local-generation)。 @@ -102,7 +102,7 @@ groups: ### `github` -指定生成的 CLI 代码如何交付到您的仓库。支持与 SDK 相同的[模式](/learn/sdks/reference/generators-yml#github):`release`、`pull-request` 和 `push`。 +指定生成的 CLI 代码如何交付到您的仓库。支持与 SDK 相同的[模式](/learn/zh/sdks/reference/generators-yml#github):`release`、`pull-request` 和 `push`。 ```yaml title="generators.yml" groups: @@ -127,7 +127,7 @@ groups: ### `audiences` -根据受众标签过滤生成的 CLI 中包含哪些 API 端点。只有在 API 规范中通过 [`x-fern-audiences`](/learn/api-definitions/openapi/extensions/audiences) 标记了指定受众的端点才会生成命令。不设置此过滤器时,所有端点都会生成命令。 +根据受众标签过滤生成的 CLI 中包含哪些 API 端点。只有在 API 规范中通过 [`x-fern-audiences`](/learn/zh/api-definitions/openapi/extensions/audiences) 标记了指定受众的端点才会生成命令。不设置此过滤器时,所有端点都会生成命令。 ```yaml title="generators.yml" groups: @@ -157,7 +157,7 @@ groups: ### `api` -在生成器级别覆盖身份验证设置。使用与 [SDK 生成器级别 `api.auth`](/learn/sdks/reference/generators-yml#override-api-authentication-settings) 相同的 schema 来控制 CLI 使用的认证方案。 +在生成器级别覆盖身份验证设置。使用与 [SDK 生成器级别 `api.auth`](/learn/zh/sdks/reference/generators-yml#override-api-authentication-settings) 相同的 schema 来控制 CLI 使用的认证方案。 ```yaml title="generators.yml" groups: diff --git a/fern/translations/zh/products/cli-generator/customization.mdx b/fern/translations/zh/products/cli-generator/customization.mdx index f655c1ca0f..0b3acd4c32 100644 --- a/fern/translations/zh/products/cli-generator/customization.mdx +++ b/fern/translations/zh/products/cli-generator/customization.mdx @@ -12,7 +12,7 @@ CLI 生成器处于抢先体验阶段。[联系我们](https://buildwithfern.com ## 覆盖和 Overlays -CLI 生成器支持 [overrides](/learn/api-definitions/openapi/overrides) 和 [overlays](/learn/api-definitions/openapi/overlays) 两种方式来在构建 CLI 前自定义 OpenAPI 规范。这允许您添加 Fern 扩展、重命名参数或移除内部端点,而无需修改原始规范。 +CLI 生成器支持 [overrides](/learn/zh/api-definitions/openapi/overrides) 和 [overlays](/learn/zh/api-definitions/openapi/overlays) 两种方式来在构建 CLI 前自定义 OpenAPI 规范。这允许您添加 Fern 扩展、重命名参数或移除内部端点,而无需修改原始规范。 Overlays 遵循 [OpenAPI Overlay 规范](https://spec.openapis.org/overlay/v1.0.0.html)并使用 JSONPath 来定位元素: diff --git a/fern/translations/zh/products/cli-generator/features.mdx b/fern/translations/zh/products/cli-generator/features.mdx index 4cf6513acc..f9d1f545a3 100644 --- a/fern/translations/zh/products/cli-generator/features.mdx +++ b/fern/translations/zh/products/cli-generator/features.mdx @@ -39,7 +39,7 @@ contoso plants get --params '{"plantId": "abc"}' --dry-run ## 分页 -对于标注了 [`x-fern-pagination`](/learn/api-definitions/openapi/extensions/pagination) 的端点,CLI 在设置 `--page-all` 标志时自动分页。 +对于标注了 [`x-fern-pagination`](/learn/zh/api-definitions/openapi/extensions/pagination) 的端点,CLI 在设置 `--page-all` 标志时自动分页。 | 标志 | 描述 | 默认值 | | --- | --- | --- | @@ -75,7 +75,7 @@ contoso plants create \ ## 服务器 URL 变量 -对于具有[模板化服务器 URL](/learn/api-definitions/openapi/extensions/server-names-and-url-templating)(如 `https://api.example.com/stores/{store_hash}/v3`)的 API,CLI 自动将每个模板变量暴露为 CLI 标志和环境变量。 +对于具有[模板化服务器 URL](/learn/zh/api-definitions/openapi/extensions/server-names-and-url-templating)(如 `https://api.example.com/stores/{store_hash}/v3`)的 API,CLI 自动将每个模板变量暴露为 CLI 标志和环境变量。 ```bash # 以标志形式传递变量 diff --git a/fern/translations/zh/products/cli-generator/local-generation.mdx b/fern/translations/zh/products/cli-generator/local-generation.mdx index f60000cfdc..8df0ccd44f 100644 --- a/fern/translations/zh/products/cli-generator/local-generation.mdx +++ b/fern/translations/zh/products/cli-generator/local-generation.mdx @@ -8,7 +8,7 @@ availability: beta CLI 生成器处于抢先体验阶段。[联系我们](https://buildwithfern.com/book-demo?type=cli)开始使用。 -默认情况下,`fern generate` [在 Fern 的云基础设施上运行 CLI 生成器](/learn/cli-generator/get-started/quickstart)。传入 `--local` 可改为在本地机器上运行生成。API 定义数据不会离开您的机器:唯一的网络调用是组织验证和拉取 Docker 镜像(如果未缓存)。这适合有严格安全或合规要求、需要将规范保留在 Fern 基础设施之外的组织。 +默认情况下,`fern generate` [在 Fern 的云基础设施上运行 CLI 生成器](/learn/zh/cli-generator/get-started/quickstart)。传入 `--local` 可改为在本地机器上运行生成。API 定义数据不会离开您的机器:唯一的网络调用是组织验证和拉取 Docker 镜像(如果未缓存)。这适合有严格安全或合规要求、需要将规范保留在 Fern 基础设施之外的组织。 ## 云生成与本地生成的比较 @@ -25,19 +25,19 @@ CLI 生成器处于抢先体验阶段。[联系我们](https://buildwithfern.com - [Fern CLI](https://www.npmjs.com/package/fern-api) v5.37.9 或更高版本(`npm install -g fern-api`) - [Docker](https://docs.docker.com/get-docker/) 在您的机器上运行 - [Rust 工具链](https://rustup.rs/)(stable)用于构建生成的输出 -- 用于组织验证的 `FERN_TOKEN`(通过 `fern token` 生成或从 [Dashboard](/learn/dashboard/configuration/api-keys) 获取) +- 用于组织验证的 `FERN_TOKEN`(通过 `fern token` 生成或从 [Dashboard](/learn/zh/dashboard/configuration/api-keys) 获取) ## 设置 -本页假设您已完成[快速开始](/learn/cli-generator/get-started/quickstart),因此您的 `generators.yml` 已写入 [`local-file-system`](/learn/cli-generator/get-started/configuration#output) 输出路径。添加 `--local` 会通过 Docker 而非 Fern 的云运行相同的配置。 +本页假设您已完成[快速开始](/learn/zh/cli-generator/get-started/quickstart),因此您的 `generators.yml` 已写入 [`local-file-system`](/learn/zh/cli-generator/get-started/configuration#output) 输出路径。添加 `--local` 会通过 Docker 而非 Fern 的云运行相同的配置。 -自托管生成仍需要网络调用来验证您的组织。通过 `fern token` 或从 [Fern Dashboard](/learn/dashboard/configuration/api-keys) 生成令牌,然后导出: +自托管生成仍需要网络调用来验证您的组织。通过 `fern token` 或从 [Fern Dashboard](/learn/zh/dashboard/configuration/api-keys) 生成令牌,然后导出: ```bash export FERN_TOKEN= @@ -69,7 +69,7 @@ cargo build ## 自定义容器注册表 -默认情况下,`--local` 从 Docker Hub 拉取生成器镜像。要从私有注册表拉取,将 `name` 字段替换为 [`image`](/learn/sdks/reference/generators-yml#image) 对象: +默认情况下,`--local` 从 Docker Hub 拉取生成器镜像。要从私有注册表拉取,将 `name` 字段替换为 [`image`](/learn/zh/sdks/reference/generators-yml#image) 对象: ```yaml title="generators.yml" {4-6} groups: diff --git a/fern/translations/zh/products/cli-generator/openapi-extensions.mdx b/fern/translations/zh/products/cli-generator/openapi-extensions.mdx index c6377b689c..f22bf9f7ad 100644 --- a/fern/translations/zh/products/cli-generator/openapi-extensions.mdx +++ b/fern/translations/zh/products/cli-generator/openapi-extensions.mdx @@ -8,7 +8,7 @@ availability: beta CLI 生成器处于抢先体验阶段。[联系我们](https://buildwithfern.com/book-demo?type=cli)开始使用。 -CLI 生成器读取多个 [Fern OpenAPI 扩展](/learn/api-definitions/openapi/extensions/overview)来塑造生成的 CLI。您可以直接在规范中添加这些扩展,也可以通过 [overlays](/learn/api-definitions/openapi/overlays) 应用。 +CLI 生成器读取多个 [Fern OpenAPI 扩展](/learn/zh/api-definitions/openapi/extensions/overview)来塑造生成的 CLI。您可以直接在规范中添加这些扩展,也可以通过 [overlays](/learn/zh/api-definitions/openapi/overlays) 应用。 ## 命令结构 @@ -45,7 +45,7 @@ paths: 如果两个扩展都未设置,CLI 回退到 `operationId`。 -参见 [SDK 方法名称](/learn/api-definitions/openapi/extensions/method-names)了解更多详情。 +参见 [SDK 方法名称](/learn/zh/api-definitions/openapi/extensions/method-names)了解更多详情。 ## 过滤 @@ -74,7 +74,7 @@ paths: type: string ``` -参见[忽略元素](/learn/api-definitions/openapi/extensions/ignoring-elements)了解更多详情。 +参见[忽略元素](/learn/zh/api-definitions/openapi/extensions/ignoring-elements)了解更多详情。 ## 可用性徽章 @@ -100,7 +100,7 @@ paths: OpenAPI 的标准 `deprecated: true` 也会被识别,在未设置 `x-fern-availability` 时映射为 `[Deprecated]`。 -参见[可用性](/learn/api-definitions/openapi/extensions/availability)了解更多详情。 +参见[可用性](/learn/zh/api-definitions/openapi/extensions/availability)了解更多详情。 ## 参数命名 @@ -122,7 +122,7 @@ paths: 生成 `--api-version` 而非 `--x-api-version`。 -参见[自定义参数名称](/learn/api-definitions/openapi/extensions/parameter-names)了解更多详情。 +参见[自定义参数名称](/learn/zh/api-definitions/openapi/extensions/parameter-names)了解更多详情。 ## 分页 @@ -141,4 +141,4 @@ paths: results: $response.results ``` -参见[分页](/learn/api-definitions/openapi/extensions/pagination)了解所有支持的分页方案(offset、cursor、URI 和 path)。 +参见[分页](/learn/zh/api-definitions/openapi/extensions/pagination)了解所有支持的分页方案(offset、cursor、URI 和 path)。 diff --git a/fern/translations/zh/products/cli-generator/publishing.mdx b/fern/translations/zh/products/cli-generator/publishing.mdx index 6ea6789a54..b0908899db 100644 --- a/fern/translations/zh/products/cli-generator/publishing.mdx +++ b/fern/translations/zh/products/cli-generator/publishing.mdx @@ -8,12 +8,12 @@ availability: beta CLI 生成器处于抢先体验阶段。[联系我们](https://buildwithfern.com/book-demo?type=cli)开始使用。 -将生成的 CLI 发布到 npm、Homebrew 和 GitHub Releases。完成本页步骤后,每次标记发布都会自动构建跨平台二进制文件并发布。如需在自有基础设施上进行生成,可以[自托管生成器](/learn/cli-generator/get-started/local-generation),而非使用 Fern 的云服务。 +将生成的 CLI 发布到 npm、Homebrew 和 GitHub Releases。完成本页步骤后,每次标记发布都会自动构建跨平台二进制文件并发布。如需在自有基础设施上进行生成,可以[自托管生成器](/learn/zh/cli-generator/get-started/local-generation),而非使用 Fern 的云服务。 本页假设您已具备: -* 一个已初始化的 `fern` 文件夹,其中 `generators.yml` 已配置 CLI 生成器。参见[快速开始](/learn/cli-generator/get-started/quickstart)。 +* 一个已初始化的 `fern` 文件夹,其中 `generators.yml` 已配置 CLI 生成器。参见[快速开始](/learn/zh/cli-generator/get-started/quickstart)。 * 一个已有的 GitHub 仓库用于存放生成的 CLI 源码,并已安装 [Fern GitHub App](https://github.com/apps/fern-api)。 diff --git a/fern/translations/zh/products/cli-generator/quickstart.mdx b/fern/translations/zh/products/cli-generator/quickstart.mdx index 7e0b722ef4..f74e7ecac3 100644 --- a/fern/translations/zh/products/cli-generator/quickstart.mdx +++ b/fern/translations/zh/products/cli-generator/quickstart.mdx @@ -8,7 +8,7 @@ availability: beta CLI 生成器处于抢先体验阶段。[联系我们](https://buildwithfern.com/book-demo?type=cli)开始使用。 -本指南介绍从 OpenAPI 规范生成 CLI 并在本地运行。完成后,您将拥有一个编译好的二进制文件,它[将每个 API 端点映射为子命令](/learn/cli-generator/get-started/openapi-extensions#command-structure),并从规范中配置好[身份验证](/learn/cli-generator/get-started/authentication)、[输出格式化](/learn/cli-generator/get-started/features#output-formatting)和[分页](/learn/cli-generator/get-started/features#pagination)。 +本指南介绍从 OpenAPI 规范生成 CLI 并在本地运行。完成后,您将拥有一个编译好的二进制文件,它[将每个 API 端点映射为子命令](/learn/zh/cli-generator/get-started/openapi-extensions#command-structure),并从规范中配置好[身份验证](/learn/zh/cli-generator/get-started/authentication)、[输出格式化](/learn/zh/cli-generator/get-started/features#output-formatting)和[分页](/learn/zh/cli-generator/get-started/features#pagination)。 ## 前提条件 @@ -32,7 +32,7 @@ fern init --organization my-org -将规范放在 `fern/openapi.yml`(或在下一步中引用的任何路径)。规范必须包含至少一个路径,`components` 下声明的任何 `securitySchemes` 将成为 CLI [在运行时读取的凭据](/learn/cli-generator/get-started/authentication)。 +将规范放在 `fern/openapi.yml`(或在下一步中引用的任何路径)。规范必须包含至少一个路径,`components` 下声明的任何 `securitySchemes` 将成为 CLI [在运行时读取的凭据](/learn/zh/cli-generator/get-started/authentication)。 @@ -79,9 +79,9 @@ cargo build -- 通过在 `generators.yml` 上叠加 [overrides 和 overlays](/learn/cli-generator/get-started/customization#overrides-and-overlays) 来重命名命令、隐藏端点或修补元数据,无需分叉规范。 -- 通过在 `api.specs` 下列出多个规范,使用[多规范合并](/learn/cli-generator/get-started/customization#multi-spec-merging)发布一个驱动多个 API 的二进制文件。 -- 使用[自定义命令](/learn/cli-generator/get-started/customization#custom-commands)添加不映射到端点的子命令 — 登录流程、配置助手、本地工具。 +- 通过在 `generators.yml` 上叠加 [overrides 和 overlays](/learn/zh/cli-generator/get-started/customization#overrides-and-overlays) 来重命名命令、隐藏端点或修补元数据,无需分叉规范。 +- 通过在 `api.specs` 下列出多个规范,使用[多规范合并](/learn/zh/cli-generator/get-started/customization#multi-spec-merging)发布一个驱动多个 API 的二进制文件。 +- 使用[自定义命令](/learn/zh/cli-generator/get-started/customization#custom-commands)添加不映射到端点的子命令 — 登录流程、配置助手、本地工具。 diff --git a/fern/translations/zh/products/dashboard/pages/api-keys.mdx b/fern/translations/zh/products/dashboard/pages/api-keys.mdx index a6afaafca0..9dfe3101fd 100644 --- a/fern/translations/zh/products/dashboard/pages/api-keys.mdx +++ b/fern/translations/zh/products/dashboard/pages/api-keys.mdx @@ -3,7 +3,7 @@ title: API 密钥 description: 在 CI/CD 环境中创建和管理用于 CLI 身份验证的 API 密钥。 --- -[管理员](/learn/dashboard/configuration/permissions)可以在 [Fern Dashboard](https://dashboard.buildwithfern.com/fern/tokens) 中创建和管理 API 密钥。API 密钥用于在 CI/CD 流水线中验证 Fern CLI 身份,例如从 GitHub Actions 发布 SDK 或文档时。 +[管理员](/learn/zh/dashboard/configuration/permissions)可以在 [Fern Dashboard](https://dashboard.buildwithfern.com/fern/tokens) 中创建和管理 API 密钥。API 密钥用于在 CI/CD 流水线中验证 Fern CLI 身份,例如从 GitHub Actions 发布 SDK 或文档时。
` 组件在 API 参考页面底部(响应部分下方)添加内容。` ``` - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2025-12-10.mdx b/fern/translations/zh/products/docs/pages/changelog/2025-12-10.mdx index cb28484078..a5dabc1812 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2025-12-10.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2025-12-10.mdx @@ -16,4 +16,4 @@ tags: ["components", "api-reference"] ``` - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2025-12-11.mdx b/fern/translations/zh/products/docs/pages/changelog/2025-12-11.mdx index b83fd0a1db..6e676715ff 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2025-12-11.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2025-12-11.mdx @@ -13,7 +13,7 @@ logo: right-text: Docs ``` - + ## 画布主体主题 @@ -26,4 +26,4 @@ theme: 画布主题适用于所有页面布局,包括指南、概览和 API 参考文档页面。它使用您配置的 `card-background` 颜色和 `border` 颜色,与您站点的配色方案保持一致的样式。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2025-12-14.mdx b/fern/translations/zh/products/docs/pages/changelog/2025-12-14.mdx index fec41d0ceb..e993105821 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2025-12-14.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2025-12-14.mdx @@ -8,4 +8,4 @@ Fern 使用 AI 自动为您的 API 参考文档生成真实的请求和响应示 这些示例与您的规范保持同步 - 当您更改或添加字段时,生成的示例会自动更新。您可以自定义生成示例的样式,直接编辑它们,或者完全禁用此功能。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2025-12-15.mdx b/fern/translations/zh/products/docs/pages/changelog/2025-12-15.mdx index e6fd3e0336..8cdb62e46e 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2025-12-15.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2025-12-15.mdx @@ -19,4 +19,4 @@ page-actions: 自定义操作支持 `{slug}`、`{domain}` 和 `{url}` 等 URL 占位符,可以动态地将页面信息插入到链接中。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2025-12-16.mdx b/fern/translations/zh/products/docs/pages/changelog/2025-12-16.mdx index 43431a18aa..eb8ce869c4 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2025-12-16.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2025-12-16.mdx @@ -8,4 +8,4 @@ tags: ["customization"] 一旦启用,嵌入模式会在同一会话的导航事件中保持启用状态。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2025-12-20.mdx b/fern/translations/zh/products/docs/pages/changelog/2025-12-20.mdx index da82bf8e44..526f2aca8c 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2025-12-20.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2025-12-20.mdx @@ -17,4 +17,4 @@ Card 和 Icon 组件支持 SVG 文件的相对路径。使用像 `./images/icon. 自定义 SVG 图标 ``` - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-01-05.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-01-05.mdx index c891df2813..62a90fd061 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-01-05.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-01-05.mdx @@ -12,12 +12,12 @@ tags: ["components", "api-reference", "docs.yml"] 这对于在页面上嵌入多个端点或减少视觉混乱同时保持交互式 API 测试功能很有用。 - + ## 默认启用动态 SDK 代码片段 动态 SDK 代码片段现在默认启用。当您配置 SDK 代码片段时,用户可以修改参数并实时查看所有支持语言的代码示例更新。 -如果您更喜欢静态代码示例,可以在 `docs.yml` 中[禁用动态代码片段](/learn/docs/configuration/site-level-settings#experimentaldynamic-snippets)。 +如果您更喜欢静态代码示例,可以在 `docs.yml` 中[禁用动态代码片段](/learn/zh/docs/configuration/site-level-settings#experimentaldynamic-snippets)。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-01-09.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-01-09.mdx index 20e955be91..3f5f19bf7f 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-01-09.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-01-09.mdx @@ -19,4 +19,4 @@ tags: ["components"] 这对于显示特定版本的文档、安装说明或 API 示例非常有用,无需复制页面。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-01-15.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-01-15.mdx index 6092025437..27043bf8e6 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-01-15.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-01-15.mdx @@ -15,4 +15,4 @@ tags: ["components", "api-reference"] 当未指定 `languages` 时,将显示所有可用语言,`payload` 显示在最后。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-01-17.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-01-17.mdx index 23dbded5d0..e4b36691cc 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-01-17.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-01-17.mdx @@ -22,4 +22,4 @@ tags: ["components", "navigation"] 您还可以使用 `not` 属性来反转条件,当当前产品或版本不匹配时显示内容。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-01-22.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-01-22.mdx index b6c08e6aec..97d9e27bca 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-01-22.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-01-22.mdx @@ -11,4 +11,4 @@ def get_plant(plant_id): return plants.get(plant_id) ``` - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-01-30.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-01-30.mdx index 14025c5c81..7b4cb633f8 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-01-30.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-01-30.mdx @@ -34,7 +34,7 @@ tags: ["components", "configuration", "docs.yml"] ``` - + ## 切换器位置配置 @@ -45,7 +45,7 @@ layout: switcher-placement: sidebar ``` - + ## 代码块中的智能续行 @@ -60,4 +60,4 @@ fern check fern docs dev ``` - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-03.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-03.mdx index 352dcbf300..bd823ff580 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-03.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-03.mdx @@ -6,7 +6,7 @@ tags: ["components", "configuration", "navigation", "docs.yml"] `` 组件现在包含一个试用按钮,允许用户访问端点浏览器并直接从代码片段测试 API 端点。 - + ## 前置元数据可用性 @@ -21,7 +21,7 @@ availability: beta 有效值为:`stable`、`generally-available`、`in-development`、`pre-release`、`deprecated` 或 `beta`。 - + ## 使用索引文件的文件夹节概述 @@ -40,4 +40,4 @@ availability: beta - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-04.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-04.mdx index 778bcbb747..2c60b71b5d 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-04.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-04.mdx @@ -12,7 +12,7 @@ import { CustomCard } from "@/components/CustomCard" 仍然支持相对导入。 - + ## 文件夹导航的标题源 @@ -27,4 +27,4 @@ navigation: 没有前置元数据 `title` 的文件会回退到从文件名派生的值。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-05.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-05.mdx index 8d9a6ab94b..cd244b9ca3 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-05.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-05.mdx @@ -13,4 +13,4 @@ footer: ./components/CustomFooter.tsx 组件是服务器端渲染的,具有更好的 SEO 和性能,在页面加载过程中没有布局偏移。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-06.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-06.mdx index e98cbd3b0f..453b8e34c7 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-06.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-06.mdx @@ -6,7 +6,7 @@ tags: ["ai", "search", "navigation", "configuration", "docs.yml"] 使用查询参数直接从 URL 打开 Ask Fern 或搜索对话框。添加 `?searchType=ai&query={prompt}` 以使用提示打开 Ask AI,或使用 `?query={search}` 进行常规搜索。搜索打开后,参数将从 URL 中移除。 - + ## 全局文件夹标题来源设置 @@ -22,4 +22,4 @@ navigation: title-source: filename # 覆盖全局设置 ``` - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-09.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-09.mdx index 02d0295aeb..d2d5e0cbce 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-09.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-09.mdx @@ -12,4 +12,4 @@ api: - graphql: schema.graphql ``` - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-10.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-10.mdx index a5521c446a..4dc9ff24b6 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-10.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-10.mdx @@ -13,4 +13,4 @@ navigation: - operation: MUTATION createPlant ``` - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-11.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-11.mdx index 158f4fbf7a..4002fba7c6 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-11.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-11.mdx @@ -1,11 +1,11 @@ ## 自托管文档的 API 密钥注入 -自托管部署通过环境变量支持 [API 密钥注入](/learn/docs/authentication/features/api-key-injection)。启用 `FERN_API_KEY_INJECTION_ENABLED` 在 API Explorer 中显示 **登录** 按钮,而无需对整个站点要求登录。使用 `FERN_AUTH_ALLOWLIST` 和 `FERN_AUTH_DENYLIST` 控制页面级别的访问。 +自托管部署通过环境变量支持 [API 密钥注入](/learn/zh/docs/authentication/features/api-key-injection)。启用 `FERN_API_KEY_INJECTION_ENABLED` 在 API Explorer 中显示 **登录** 按钮,而无需对整个站点要求登录。使用 `FERN_AUTH_ALLOWLIST` 和 `FERN_AUTH_DENYLIST` 控制页面级别的访问。 - + ## 多个 API 密钥和每环境密钥 -API 密钥注入支持 [多个 API 密钥](/learn/docs/authentication/setup/jwt#build-the-fern-claim) 和 [每环境凭据](/learn/docs/authentication/setup/jwt#build-the-fern-claim)。在 `bearer_token` 中提供多个密钥作为 JSON 编码的数组,并使用 `env_state` 通过子字符串匹配为每个环境设置不同的凭据。 +API 密钥注入支持 [多个 API 密钥](/learn/zh/docs/authentication/setup/jwt#build-the-fern-claim) 和 [每环境凭据](/learn/zh/docs/authentication/setup/jwt#build-the-fern-claim)。在 `bearer_token` 中提供多个密钥作为 JSON 编码的数组,并使用 `env_state` 通过子字符串匹配为每个环境设置不同的凭据。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-12.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-12.mdx index e1d0214af6..64ec152193 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-12.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-12.mdx @@ -2,4 +2,4 @@ JWT 回调端点(`/api/fern-docs/auth/jwt/callback`)现在除了接受带查询参数的 `GET` 请求外,还接受带 `application/x-www-form-urlencoded` 主体的 `POST` 请求。POST 避免在 URL 和服务器日志中暴露 JWT 令牌。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-17.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-17.mdx index 23d7828eb5..f36b40ef8c 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-17.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-17.mdx @@ -6,4 +6,4 @@ tags: ["components"] 当使用 `` 与 markdown 标题语法时,步骤条目现在在目录中以匹配其标题级别的深度显示——`##` 标题在深度 2,`###` 标题在深度 3。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-23.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-23.mdx index 8db2bb2106..9116d1de90 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-23.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-23.mdx @@ -12,4 +12,4 @@ tags: ["writing-content"] 这在 Markdown 页面、OpenAPI `description` 字段和 Fern Definition `docs` 字段中都有效。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-25.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-25.mdx index 6ea28539aa..791081be63 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-25.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-25.mdx @@ -6,4 +6,4 @@ tags: ["customization", "configuration", "fern-editor"] 您现在可以直接在 Fern Editor 中更新站点的徽标、图标和标题——无需手动编辑配置文件。在编辑器中导航到站点设置以进行可视化更改。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-26.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-26.mdx index 3efb57e5bf..e8282f341b 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-26.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-26.mdx @@ -6,4 +6,4 @@ tags: ["api-reference", "ai"] 您的 Fern 文档站点现在在 `/openapi.json` 和 `/openapi.yaml` 提供原始的 OpenAPI 3.1 规范。可下载用于 SDK 生成、契约测试或导入到 Postman 等工具中。该规范还链接在您站点的 `llms.txt` 中,因此 AI 编程助手可以自动发现并使用它。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-27.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-27.mdx index d6c03e126d..20f63034ba 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-27.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-27.mdx @@ -6,7 +6,7 @@ tags: ["fern-editor", "ai"] 您现在可以查看和编辑队友的 Fern Editor 会话。如果队友创建了编辑器会话,您可以从仪表板打开他们的会话并直接将更改提交到他们的 PR 中。这样可以轻松调整文案或修复内容,无需切换到 GitHub。 -了解更多关于 [Fern Editor](/learn/docs/writing-content/fern-editor) 的信息。 +了解更多关于 [Fern Editor](/learn/zh/docs/writing-content/fern-editor) 的信息。 ## Fern Writer 中的拉取请求归属 @@ -19,4 +19,4 @@ Fern Writer 现在在每个拉取请求描述中包含 **请求者** 字段, /> - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-02-28.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-02-28.mdx index dc825606c6..7a4ce2f4f9 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-02-28.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-02-28.mdx @@ -4,7 +4,7 @@ tags: ["customization", "configuration", "docs.yml"] ## 使用 Fern Editor 的"编辑此页面"功能 -"编辑此页面"按钮现在除了链接到 GitHub 外,还可以打开 Fern Editor。[当您将启动模式设置为 `dashboard`](/learn/docs/configuration/site-level-settings#edit-this-page-configuration) 时,点击按钮会让用户选择在 Fern Editor 中编辑页面或在 GitHub 上查看源代码。这对于内部文档站点特别有用,因为大多数查看者也是编辑者。 +"编辑此页面"按钮现在除了链接到 GitHub 外,还可以打开 Fern Editor。[当您将启动模式设置为 `dashboard`](/learn/zh/docs/configuration/site-level-settings#edit-this-page-configuration) 时,点击按钮会让用户选择在 Fern Editor 中编辑页面或在 GitHub 上查看源代码。这对于内部文档站点特别有用,因为大多数查看者也是编辑者。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-04-10.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-04-10.mdx index 09c40ff078..28a6c05307 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-04-10.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-04-10.mdx @@ -16,4 +16,4 @@ agents: 需要 Fern CLI 版本 `4.67.0` 或更高版本。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-04-11.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-04-11.mdx index 9fc946e5b0..a738dfb585 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-04-11.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-04-11.mdx @@ -6,4 +6,4 @@ tags: ["api-reference", "ai"] 对于包含 WebSocket 通道的站点,Fern 文档站点在 `/asyncapi.json` 和 `/asyncapi.yaml` 提供您的原始 AsyncAPI 2.6.0 规范。下载它用于客户端生成、合约测试或导入到兼容 AsyncAPI 的工具中。该规范也从您站点的 `llms.txt` 链接,因此 AI 编码助手可以自动发现和使用它。 - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-04-14.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-04-14.mdx index 6ea8f6b289..47921d8444 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-04-14.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-04-14.mdx @@ -6,7 +6,7 @@ tags: ["ai-features", "api-reference", "mdx"] Ask Fern 现在使用 [Claude 4.6 Sonnet](https://www.anthropic.com/news/claude-sonnet-4-6) 和 [Claude 4.5 Haiku](https://www.anthropic.com/news/claude-haiku-4-5)。 - + ## 使用 `api:` 语法链接到 API Reference 部分 @@ -16,4 +16,4 @@ Ask Fern 现在使用 [Claude 4.6 Sonnet](https://www.anthropic.com/news/claude- Explore the [Plant Store API](api:plant-store) reference. ``` - \ No newline at end of file + \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-04-20.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-04-20.mdx index 2f625246a7..a3f8fbe930 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-04-20.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-04-20.mdx @@ -4,7 +4,7 @@ tags: ["navigation", "configuration", "docs.yml"] ## 移动端目录栏 -使用 [`guide` 和 `overview` 布局](/learn/docs/configuration/page-level-settings#layout)的页面现在可以在移动端和平板设备视口中在头部下方显示粘性目录栏。该栏显示滚动进度指示器和当前标题,点击时展开为完整目录。 +使用 [`guide` 和 `overview` 布局](/learn/zh/docs/configuration/page-level-settings#layout)的页面现在可以在移动端和平板设备视口中在头部下方显示粘性目录栏。该栏显示滚动进度指示器和当前标题,点击时展开为完整目录。 - + ## 每条目更新日志标签 @@ -32,4 +32,4 @@ 单个条目页面上的标签可点击,点击后链接回时间线并预选该标签作为过滤器。 - + diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-06-30.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-06-30.mdx index 8d8e200766..bedbd0a075 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-06-30.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-06-30.mdx @@ -12,4 +12,4 @@ page-actions: mcp: false ``` - + diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-07-01.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-07-01.mdx index 48ac91323c..ef896f38ab 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-07-01.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-07-01.mdx @@ -24,4 +24,4 @@ layout: classic 单个更新日志的覆盖优先于站点范围设置。 - + diff --git a/fern/translations/zh/products/docs/pages/changelog/2026-07-07.mdx b/fern/translations/zh/products/docs/pages/changelog/2026-07-07.mdx index 3b199070ef..8cc0fd0b68 100644 --- a/fern/translations/zh/products/docs/pages/changelog/2026-07-07.mdx +++ b/fern/translations/zh/products/docs/pages/changelog/2026-07-07.mdx @@ -4,4 +4,4 @@ 对不存在的 `.md` URL 的请求现在会返回最多三个链接到最接近匹配来源的"相似页面"建议,使 agent 无需单独查找即可从损坏的链接中恢复。 - + diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/badges.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/badges.mdx index 91bd103bb8..9db6099a13 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/badges.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/badges.mdx @@ -5,7 +5,7 @@ sidebar-title: 徽章组件 --- -使用 `` 组件来显示小块信息,例如状态指示器、类别、版本或发布日期。要显示更长的注释,请使用[标注](/learn/docs/writing-content/components/callouts)。 +使用 `` 组件来显示小块信息,例如状态指示器、类别、版本或发布日期。要显示更长的注释,请使用[标注](/learn/zh/docs/writing-content/components/callouts)。 ## 用法 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/button.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/button.mdx index ce572f9bd3..2fd2489830 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/button.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/button.mdx @@ -107,7 +107,7 @@ sidebar-title: 按钮组件
- +
diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/callouts.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/callouts.mdx index 79b9872ab9..6f7feb79b4 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/callouts.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/callouts.mdx @@ -6,7 +6,7 @@ sidebar-title: 提示框组件 `` 组件用于在文档中突出显示重要信息、警告或提示。使用提示框来强调读者不应错过的关键细节,如破坏性更改、先决条件或有用的最佳实践。 -要显示非常简短的信息(如状态指示器和版本号),请使用[标记](/learn/docs/writing-content/components/badges)。 +要显示非常简短的信息(如状态指示器和版本号),请使用[标记](/learn/zh/docs/writing-content/components/badges)。 ## 使用方法 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/cards.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/cards.mdx index b8fe8d9d92..1c17d69001 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/cards.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/cards.mdx @@ -16,7 +16,7 @@ description: '使用卡片在框中展示内容' icon 字段引用一个 Font Awesome 图标。 @@ -43,28 +43,28 @@ description: '使用卡片在框中展示内容' 了解如何为植物浇水 了解不同植物的光照需求 为植物的最佳生长选择合适的土壤 施肥以保持植物健康 @@ -113,7 +113,7 @@ description: '使用卡片在框中展示内容' } - href="/learn/docs/writing-content/components/cards" + href="/learn/zh/docs/writing-content/components/cards" > 传入 image 标签以使用自定义图标。 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/code-blocks.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/code-blocks.mdx index d390606edf..e67f874bec 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/code-blocks.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/code-blocks.mdx @@ -544,7 +544,7 @@ garden = store.getGarden(garden_id="456")
- 代码块会自动与[相同语言的标签页](/learn/docs/writing-content/components/tabs#language-synchronization)同步。 + 代码块会自动与[相同语言的标签页](/learn/zh/docs/writing-content/components/tabs#language-synchronization)同步。 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/download.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/download.mdx index d75a786fc6..2779637dfa 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/download.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/download.mdx @@ -7,7 +7,7 @@ sidebar-title: 下载组件 `` 组件允许用户直接从您的文档中下载诸如 PDF 等资源。您可以将其用于单个文件或将多个文件打包为 ZIP 下载。 -有关如何嵌入图像、PDF 和其他资源的信息,请查看 [Markdown 富媒体](/learn/docs/writing-content/markdown-media) 文档。 +有关如何嵌入图像、PDF 和其他资源的信息,请查看 [Markdown 富媒体](/learn/zh/docs/writing-content/markdown-media) 文档。 ## 用法 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/endpoint-request-snippet.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/endpoint-request-snippet.mdx index c0a89c36ec..ab42c4fbeb 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/endpoint-request-snippet.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/endpoint-request-snippet.mdx @@ -108,7 +108,7 @@ description: 了解如何在 Fern 中使用 EndpointRequestSnippet 组件,在 ## 属性 - 要显示的端点,格式为 `METHOD /path`(例如:`POST /chat/{domain}`)。如果您的 API 使用[命名空间](/learn/api-definitions/overview/project-structure#combined-sdks-from-multiple-apis),请在前面加上命名空间和 `::`(例如:`payments::POST /chat/{domain}`)。 + 要显示的端点,格式为 `METHOD /path`(例如:`POST /chat/{domain}`)。如果您的 API 使用[命名空间](/learn/zh/api-definitions/overview/project-structure#combined-sdks-from-multiple-apis),请在前面加上命名空间和 `::`(例如:`payments::POST /chat/{domain}`)。 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/endpoint-response-snippet.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/endpoint-response-snippet.mdx index 95157f0a9e..953a473fbf 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/endpoint-response-snippet.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/endpoint-response-snippet.mdx @@ -53,7 +53,7 @@ description: '从你的 API 参考中引用端点响应' ## 属性 - 要显示的端点,格式为 `METHOD /path`(例如 `POST /chat/{domain}`)。如果你的 API 使用[命名空间](/learn/api-definitions/overview/project-structure#combined-sdks-from-multiple-apis),请在前面添加命名空间和 `::`(例如 `payments::POST /chat/{domain}`)。 + 要显示的端点,格式为 `METHOD /path`(例如 `POST /chat/{domain}`)。如果你的 API 使用[命名空间](/learn/zh/api-definitions/overview/project-structure#combined-sdks-from-multiple-apis),请在前面添加命名空间和 `::`(例如 `payments::POST /chat/{domain}`)。 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/endpoint-schema-snippet.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/endpoint-schema-snippet.mdx index d7e59d552c..03a123e2c9 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/endpoint-schema-snippet.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/endpoint-schema-snippet.mdx @@ -7,7 +7,7 @@ sidebar-title: 端点模式代码片段 `` 组件显示来自 API Reference 的端点模式。默认情况下,它渲染完整的模式,或者您可以使用 `selector` 属性来显示特定部分,如请求体、响应、路径参数或查询参数。 -要按名称显示任何类型定义(不限于端点模式),请使用 [``](/learn/docs/writing-content/components/schema) 组件。 +要按名称显示任何类型定义(不限于端点模式),请使用 [``](/learn/zh/docs/writing-content/components/schema) 组件。 尚不支持富 Markdown 字段描述,将显示为纯文本。请参见下面的[请求路径](#request-path)示例。 @@ -107,7 +107,7 @@ sidebar-title: 端点模式代码片段 ## 属性 - 要显示的端点,格式为 `METHOD /path`(例如,`POST /chat/{domain}`)。如果您的 API 使用[命名空间](/learn/api-definitions/overview/project-structure#combined-sdks-from-multiple-apis),请在前面加上命名空间和 `::`(例如,`payments::POST /chat/{domain}`)。 + 要显示的端点,格式为 `METHOD /path`(例如,`POST /chat/{domain}`)。如果您的 API 使用[命名空间](/learn/zh/api-definitions/overview/project-structure#combined-sdks-from-multiple-apis),请在前面加上命名空间和 `::`(例如,`payments::POST /chat/{domain}`)。 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/files.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/files.mdx index 11a8851366..8f55f0b520 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/files.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/files.mdx @@ -21,7 +21,7 @@ sidebar-title: 文件组件 - +
@@ -66,7 +66,7 @@ sidebar-title: 文件组件 - +
@@ -101,15 +101,15 @@ sidebar-title: 文件组件
- - - - + + + + - +
@@ -145,7 +145,7 @@ sidebar-title: 文件组件 - +
@@ -168,7 +168,7 @@ sidebar-title: 文件组件 ### 行高亮和注释 -使用 `highlighted` 属性来高亮显示特定的文件或文件夹,以强调背景颜色。使用 `comment` 属性添加出现在项目旁边的解释性文本。这些属性对于引起对重要文件的注意或提供额外上下文很有用,类似于代码块支持[行高亮](/learn/docs/writing-content/components/code-blocks#line-highlighting)和内联注释。 +使用 `highlighted` 属性来高亮显示特定的文件或文件夹,以强调背景颜色。使用 `comment` 属性添加出现在项目旁边的解释性文本。这些属性对于引起对重要文件的注意或提供额外上下文很有用,类似于代码块支持[行高亮](/learn/zh/docs/writing-content/components/code-blocks#line-highlighting)和内联注释。
@@ -181,7 +181,7 @@ sidebar-title: 文件组件 - +
diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/if.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/if.mdx index 707e6a4318..5a9ef56510 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/if.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/if.mdx @@ -10,7 +10,7 @@ sidebar-title: 条件组件 ### 按产品 -使用 `products` 属性来仅在读者查看特定[产品](/learn/docs/configuration/products)时显示内容。`products` 数组中的值对应于您的 `docs.yml` 中定义的产品标识符。 +使用 `products` 属性来仅在读者查看特定[产品](/learn/zh/docs/configuration/products)时显示内容。`products` 数组中的值对应于您的 `docs.yml` 中定义的产品标识符。 ```jsx Markdown @@ -24,7 +24,7 @@ sidebar-title: 条件组件 ### 按版本 -使用 `versions` 属性来仅在读者查看特定[版本](/learn/docs/configuration/versions)时显示内容。`versions` 数组中的值对应于您的 `docs.yml` 中定义的版本标识符。 +使用 `versions` 属性来仅在读者查看特定[版本](/learn/zh/docs/configuration/versions)时显示内容。`versions` 数组中的值对应于您的 `docs.yml` 中定义的版本标识符。 ```jsx Markdown @@ -38,7 +38,7 @@ sidebar-title: 条件组件 ### 按角色 -使用 `roles` 属性来根据已认证用户的角色显示内容。`roles` 数组中的值对应于您的[基于角色的访问控制](/learn/docs/authentication/features/rbac)配置中定义的角色。 +使用 `roles` 属性来根据已认证用户的角色显示内容。`roles` 数组中的值对应于您的[基于角色的访问控制](/learn/zh/docs/authentication/features/rbac)配置中定义的角色。 ```jsx Markdown diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/overview.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/overview.mdx index e4271e3ffc..5e3c167159 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/overview.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/overview.mdx @@ -11,182 +11,182 @@ Fern 包含 26 个内置组件,用于创建交互式文档。选择下面的 用于常见问题和可折叠内容的可展开部分 为段落、表格和其他内容提供可链接的锚点 定位在页面右侧的内容粘性容器 用于状态、版本和元数据的小标签 具有多种变体和意图的交互式按钮组件 用于重要信息、警告和提示的突出显示框 带有可选图标和链接的视觉上独特的框 具有语法高亮和交互功能的代码示例 使文本可通过点击复制按钮进行复制 下载 PDF 和其他资源 来自您的 API 参考的端点请求片段 来自您的 API 参考的端点响应片段 来自您的 API 参考的端点模式片段 显示带有可展开文件夹的交互式文件树结构 带有可选标题和背景的图像容器 用于视觉元素的 Font Awesome 图标 根据实例、产品、版本或用户角色显示或隐藏内容 为嵌套内容提供缩进和引导线的视觉层次结构 具有一致格式的 API 参数文档 用于测试 API 端点的交互式请求构建器 显示来自您的 API 参考的任何类型定义 具有自动编号和锚点链接的顺序指令 在行和列中显示数据,带有可选的粘性标题 用于组织相关内容的选项卡界面 在悬停时显示的附加信息 根据版本选择显示不同内容 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/prompt.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/prompt.mdx index 08ae55b9a9..9223b792b2 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/prompt.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/prompt.mdx @@ -216,7 +216,7 @@ Generate a TypeScript SDK from my OpenAPI spec. Follow the [TypeScript SDK quick - 显示在提示文本左侧的 [Font Awesome 图标](/learn/docs/writing-content/components/icons)名称或图片 URL。省略时默认为闪光图标。 + 显示在提示文本左侧的 [Font Awesome 图标](/learn/zh/docs/writing-content/components/icons)名称或图片 URL。省略时默认为闪光图标。 @@ -230,7 +230,7 @@ Generate a TypeScript SDK from my OpenAPI spec. Follow the [TypeScript SDK quick 自定义操作的目标 URL。使用 `{prompt}` 作为 URL 编码提示主体的占位符。如果省略,提示将作为 `prompt` 查询参数附加。仅支持 `http` 和 `https` URL。 - 显示在自定义操作按钮中的 [Font Awesome 图标](/learn/docs/writing-content/components/icons)名称或图片 URL。省略时默认为闪光图标。 + 显示在自定义操作按钮中的 [Font Awesome 图标](/learn/zh/docs/writing-content/components/icons)名称或图片 URL。省略时默认为闪光图标。 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/runnable-endpoint.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/runnable-endpoint.mdx index f683d28904..c724b54bd1 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/runnable-endpoint.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/runnable-endpoint.mdx @@ -33,7 +33,7 @@ description: 使用 RunnableEndpoint 在您的文档中添加可测试的 API ## 属性 - 端点定位符,格式为 "METHOD /path"。例如:`"POST /api/users"` 或 `"GET /api/users/{id}"`。如果您的 API 使用[命名空间](/learn/api-definitions/overview/project-structure#combined-sdks-from-multiple-apis),请在前面加上命名空间和 `::` (例如,`"payments::POST /api/users"`)。 + 端点定位符,格式为 "METHOD /path"。例如:`"POST /api/users"` 或 `"GET /api/users/{id}"`。如果您的 API 使用[命名空间](/learn/zh/api-definitions/overview/project-structure#combined-sdks-from-multiple-apis),请在前面加上命名空间和 `::` (例如,`"payments::POST /api/users"`)。 @@ -41,7 +41,7 @@ description: 使用 RunnableEndpoint 在您的文档中添加可测试的 API - 设置端点的默认环境。该值必须对应于 API 规范中定义的服务器 URL 的 [`x-fern-server-name`](/learn/api-definitions/openapi/extensions/server-names-and-url-templating)。如果未指定,默认使用第一个环境。 + 设置端点的默认环境。该值必须对应于 API 规范中定义的服务器 URL 的 [`x-fern-server-name`](/learn/zh/api-definitions/openapi/extensions/server-names-and-url-templating)。如果未指定,默认使用第一个环境。 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/schema-snippet.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/schema-snippet.mdx index 1bb804fc7a..359f442ec8 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/schema-snippet.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/schema-snippet.mdx @@ -4,7 +4,7 @@ description: 了解如何在 Fern 中使用 SchemaSnippet 组件在文档中将 sidebar-title: 模式代码片段 --- -`` 组件将 API 参考中的类型定义显示为 JSON 代码块。您可以单独使用它来显示 JSON 表示,或将其与 [``](/learn/docs/writing-content/components/schema) 组件配对使用,同时显示逐字段分解和 JSON。 +`` 组件将 API 参考中的类型定义显示为 JSON 代码块。您可以单独使用它来显示 JSON 表示,或将其与 [``](/learn/zh/docs/writing-content/components/schema) 组件配对使用,同时显示逐字段分解和 JSON。 该组件仅发现由端点引用的类型。专门由 websocket 或 webhook 使用的类型将不可用。如果多个 API 具有相同的类型名称,该组件会返回第一个匹配项。 @@ -12,7 +12,7 @@ sidebar-title: 模式代码片段 ## 用法 -该组件与[已在 `docs.yml` 中配置的 API 参考](/learn/docs/api-references/overview)一起使用。此示例将 `AIChatConfig` 类型显示为 JSON 代码块: +该组件与[已在 `docs.yml` 中配置的 API 参考](/learn/zh/docs/api-references/overview)一起使用。此示例将 `AIChatConfig` 类型显示为 JSON 代码块:
diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/schema.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/schema.mdx index bc0a17fca3..7bf28c76e5 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/schema.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/schema.mdx @@ -6,7 +6,7 @@ sidebar-title: 模式组件 `` 组件可以在您的文档中的任何位置显示API参考中的类型定义。使用它来在API参考页面之外引用数据模型、请求对象或响应类型。 -与 [``](/learn/docs/writing-content/components/endpoint-schema-snippet) 类似,但接受任何类型名称,而不仅限于端点特定的模式。可以与 [``](/learn/docs/writing-content/components/schema-snippet) 配对使用,在字段分解旁边显示JSON表示。 +与 [``](/learn/zh/docs/writing-content/components/endpoint-schema-snippet) 类似,但接受任何类型名称,而不仅限于端点特定的模式。可以与 [``](/learn/zh/docs/writing-content/components/schema-snippet) 配对使用,在字段分解旁边显示JSON表示。 该组件只能发现被端点引用的类型。仅被WebSocket或Webhook使用的类型将不可用。如果多个API具有相同的类型名称,组件会返回第一个匹配项。 @@ -14,7 +14,7 @@ sidebar-title: 模式组件 ## 使用方法 -该组件与[已在您的 `docs.yml` 中配置的API参考](/learn/docs/api-references/overview)配合使用。此示例显示来自 `docs-yml` API的 `AIChatConfig` 类型: +该组件与[已在您的 `docs.yml` 中配置的API参考](/learn/zh/docs/api-references/overview)配合使用。此示例显示来自 `docs-yml` API的 `AIChatConfig` 类型:
diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/tabs.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/tabs.mdx index 59dfa41f31..42bb3ad4fe 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/tabs.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/tabs.mdx @@ -43,7 +43,7 @@ description: 标签页组件支持以分页视图展示相关内容,并可在 ### 语言同步 -设置了 [相同语言](/learn/docs/writing-content/components/code-blocks#supported-languages) 的标签页会在整个文档站点中自动同步。当用户选择某种语言时,所有该语言的标签页都会同步切换。语言偏好会跨浏览器会话保留。 +设置了 [相同语言](/learn/zh/docs/writing-content/components/code-blocks#supported-languages) 的标签页会在整个文档站点中自动同步。当用户选择某种语言时,所有该语言的标签页都会同步切换。语言偏好会跨浏览器会话保留。
@@ -108,7 +108,7 @@ description: 标签页组件支持以分页视图展示相关内容,并可在 - 启用了语言的标签页会自动与 [相同语言的代码块](/learn/docs/writing-content/components/code-blocks#language-synchronization) 同步。 + 启用了语言的标签页会自动与 [相同语言的代码块](/learn/zh/docs/writing-content/components/code-blocks#language-synchronization) 同步。 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/versions.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/versions.mdx index 4144d54be6..5c2eeb07d5 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/versions.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/versions.mdx @@ -8,7 +8,7 @@ sidebar-title: 版本 `` 组件根据版本选择显示不同内容。用户可以使用下拉菜单在版本之间切换,选择的版本会持久化保存在 URL 查询参数中。 - 若要对整个文档站点进行版本控制,请使用[站点级版本控制](/learn/docs/configuration/versions)。您可以独立使用站点级版本控制和 `` 组件,也可以同时使用。 + 若要对整个文档站点进行版本控制,请使用[站点级版本控制](/learn/zh/docs/configuration/versions)。您可以独立使用站点级版本控制和 `` 组件,也可以同时使用。 ## 用法 diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/webhook-payload-snippet.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/webhook-payload-snippet.mdx index fd643ad284..be806ffe55 100644 --- a/fern/translations/zh/products/docs/pages/component-library/default-components/webhook-payload-snippet.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/default-components/webhook-payload-snippet.mdx @@ -6,7 +6,7 @@ description: 从您的 API 参考中引用 webhook 负载,以在文档中显 `` 组件从您的 API 参考中显示 webhook 的请求负载架构。它呈现与 webhook 完整 API 参考页面相同的字段、类型和示例值,因此读者可以在您的内容中内联检查负载。 -要显示常规 HTTP 端点的架构,请使用 [``](/learn/docs/writing-content/components/endpoint-schema-snippet) 组件。 +要显示常规 HTTP 端点的架构,请使用 [``](/learn/zh/docs/writing-content/components/endpoint-schema-snippet) 组件。 ## 用法 @@ -25,5 +25,5 @@ description: 从您的 API 参考中引用 webhook 负载,以在文档中显 ## 属性 - 要显示的 webhook 的 `operationId`。如果您的 API 使用[命名空间](/learn/api-definitions/overview/project-structure#combined-sdks-from-multiple-apis),请使用命名空间和 `::` 作为前缀(例如,`payments::on-payment-succeeded`)。 + 要显示的 webhook 的 `operationId`。如果您的 API 使用[命名空间](/learn/zh/api-definitions/overview/project-structure#combined-sdks-from-multiple-apis),请使用命名空间和 `::` 作为前缀(例如,`payments::on-payment-succeeded`)。 diff --git a/fern/translations/zh/products/docs/pages/component-library/writing-content/markdown-basics.mdx b/fern/translations/zh/products/docs/pages/component-library/writing-content/markdown-basics.mdx index 5595f55624..47b9c1a8a9 100644 --- a/fern/translations/zh/products/docs/pages/component-library/writing-content/markdown-basics.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/writing-content/markdown-basics.mdx @@ -13,7 +13,7 @@ description: 使用 Markdown 和 MDX 为你的 Fern 文档站点添加内容, 通过创建 Markdown (`.md`) 或 MDX (`.mdx`) 文件手动为你的文档添加页面。初次接触 Markdown?查看 [Markdown Guide: Getting started](https://www.markdownguide.org/getting-started/)。 -将你的页面放在 `fern/` 文件夹内,并在 `docs.yml` 文件的[导航设置](/learn/docs/configuration/navigation)中链接到它们。 +将你的页面放在 `fern/` 文件夹内,并在 `docs.yml` 文件的[导航设置](/learn/zh/docs/configuration/navigation)中链接到它们。 在下面的例子中,MDX 文件放在名为 `pages/` 的文件夹内。 @@ -55,10 +55,10 @@ Fern 使用 `docs.yml` 中的 `page` 值自动为每个页面生成 `

` 页 ### 链接格式 -要链接到文档站点上的另一个页面,请写目标的**已发布站点路径**,以 `/` 开头。Fern 从你的[`docs.yml` 和产品 YAML 文件](/learn/docs/configuration/navigation)中的 slugs 构建此路径,而不是从磁盘上的文件位置构建。要链接到另一个页面的标题,请在路径后追加 `#anchor`。 +要链接到文档站点上的另一个页面,请写目标的**已发布站点路径**,以 `/` 开头。Fern 从你的[`docs.yml` 和产品 YAML 文件](/learn/zh/docs/configuration/navigation)中的 slugs 构建此路径,而不是从磁盘上的文件位置构建。要链接到另一个页面的标题,请在路径后追加 `#anchor`。 - 内页链接不支持文件相对路径如 `./` 和 `../` — 请使用已发布的站点路径代替。(文件相对路径仍然适用于[图片和其他媒体](/learn/docs/writing-content/markdown-media)以及 YAML 配置中的 `path:` 引用。) + 内页链接不支持文件相对路径如 `./` 和 `../` — 请使用已发布的站点路径代替。(文件相对路径仍然适用于[图片和其他媒体](/learn/zh/docs/writing-content/markdown-media)以及 YAML 配置中的 `path:` 引用。) @@ -69,11 +69,11 @@ Fern 使用 `docs.yml` 中的 `page` 值自动为每个页面生成 `

` 页 ``` -在[版本化文档](/learn/docs/configuration/versions)中,相同的路径会根据你写的是无版本形式(默认版本)还是有版本形式(例如 `/learn/docs/v2/getting-started`)而跳转到不同版本。对于单个页面内的内联版本特定内容,请使用 [``](/learn/docs/writing-content/components/if#by-version) 或 [``](/learn/docs/writing-content/components/versions)。 +在[版本化文档](/learn/zh/docs/configuration/versions)中,相同的路径会根据你写的是无版本形式(默认版本)还是有版本形式(例如 `/learn/docs/v2/getting-started`)而跳转到不同版本。对于单个页面内的内联版本特定内容,请使用 [``](/learn/zh/docs/writing-content/components/if#by-version) 或 [``](/learn/zh/docs/writing-content/components/versions)。 ### 验证链接 -Fern 提供两种捕获损坏链接的方法。[`broken-links` 规则](/learn/docs/configuration/site-level-settings#check-configuration) — 由 [`fern check`](/learn/cli-api-reference/cli-reference/commands#fern-check) 运行,包括在 `fern docs dev` 期间 — 验证每个内部链接是否符合从你的**本地** YAML 构建的导航树。要检查已发布站点上的链接,请使用 [`fern docs link check`](/learn/cli-api-reference/cli-reference/commands#fern-docs-link-check) 或 [Fern Dashboard](https://dashboard.buildwithfern.com/)。 +Fern 提供两种捕获损坏链接的方法。[`broken-links` 规则](/learn/zh/docs/configuration/site-level-settings#check-configuration) — 由 [`fern check`](/learn/zh/cli-api-reference/cli-reference/commands#fern-check) 运行,包括在 `fern docs dev` 期间 — 验证每个内部链接是否符合从你的**本地** YAML 构建的导航树。要检查已发布站点上的链接,请使用 [`fern docs link check`](/learn/zh/cli-api-reference/cli-reference/commands#fern-docs-link-check) 或 [Fern Dashboard](https://dashboard.buildwithfern.com/)。 | | `fern check` broken-links 规则 | `fern docs link check` | |---|---|---| @@ -90,7 +90,7 @@ Fern 提供两种捕获损坏链接的方法。[`broken-links` 规则](/learn/do -[了解更多](/learn/docs/configuration/navigation)关于链接和其他导航元素。 +[了解更多](/learn/zh/docs/configuration/navigation)关于链接和其他导航元素。 ## 表格 @@ -103,8 +103,8 @@ Fern 提供两种捕获损坏链接的方法。[`broken-links` 规则](/learn/do | 行 2 | 数据 | 数据 | ``` -对于更高级的表格功能,如为较长数据集提供粘性标题,请参阅 [Table 组件](/learn/docs/writing-content/components/tables)文档。 +对于更高级的表格功能,如为较长数据集提供粘性标题,请参阅 [Table 组件](/learn/zh/docs/writing-content/components/tables)文档。 ## Fern 组件 -Fern 有一个内置的组件库,你可以在 Markdown 中使用。[探索这些组件。](/learn/docs/writing-content/components/overview) +Fern 有一个内置的组件库,你可以在 Markdown 中使用。[探索这些组件。](/learn/zh/docs/writing-content/components/overview) diff --git a/fern/translations/zh/products/docs/pages/component-library/writing-content/markdown-media.mdx b/fern/translations/zh/products/docs/pages/component-library/writing-content/markdown-media.mdx index 07aa86a637..009f8953c7 100644 --- a/fern/translations/zh/products/docs/pages/component-library/writing-content/markdown-media.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/writing-content/markdown-media.mdx @@ -198,7 +198,7 @@ sidebar-title: Markdown 中的富媒体 -[嵌入 Fern 文档站点](/learn/docs/customization/embedded-mode)到其他应用程序时,请在 URL 后追加 `?embedded=true` 以隐藏页头和页脚。 +[嵌入 Fern 文档站点](/learn/zh/docs/customization/embedded-mode)到其他应用程序时,请在 URL 后追加 `?embedded=true` 以隐藏页头和页脚。 ## LaTeX diff --git a/fern/translations/zh/products/docs/pages/component-library/writing-content/visual-editor.mdx b/fern/translations/zh/products/docs/pages/component-library/writing-content/visual-editor.mdx index ee59a1956d..48b9eda316 100644 --- a/fern/translations/zh/products/docs/pages/component-library/writing-content/visual-editor.mdx +++ b/fern/translations/zh/products/docs/pages/component-library/writing-content/visual-editor.mdx @@ -48,20 +48,20 @@ Fern Editor 让团队成员(如内容作者、产品经理和营销人员) -安装 [Fern GitHub 应用](https://github.com/apps/fern-api),然后在[控制台](https://dashboard.buildwithfern.com/)中[连接您的仓库](/learn/dashboard/configuration/github-repo)。 +安装 [Fern GitHub 应用](https://github.com/apps/fern-api),然后在[控制台](https://dashboard.buildwithfern.com/)中[连接您的仓库](/learn/zh/dashboard/configuration/github-repo)。 GitLab 需要手动设置: 1. 在 GitLab 中[创建个人访问令牌](https://gitlab.com/-/user_settings/personal_access_tokens),包含以下权限范围:`read_user`、`api`、`write_repository`、`read_repository`、`read_api`。将过期日期设置得很久以后,以避免中断您的编辑器体验——您可以随时撤销令牌。 2. 通过 Slack 或[邮件](mailto:support@buildwithfern.com)联系 Fern 支持,提供您的访问令牌和 GitLab 仓库 URL。 -3. 一旦 Fern 配置了连接,在[控制台](https://dashboard.buildwithfern.com/)中[连接您的仓库](/learn/dashboard/configuration/github-repo)。 +3. 一旦 Fern 配置了连接,在[控制台](https://dashboard.buildwithfern.com/)中[连接您的仓库](/learn/zh/dashboard/configuration/github-repo)。 ### 设置权限 -为您的组织配置[成员权限](/learn/dashboard/configuration/permissions),以控制谁可以使用 Fern Editor。管理员和编辑者可以进行更改;查看者只有只读访问权限。 +为您的组织配置[成员权限](/learn/zh/dashboard/configuration/permissions),以控制谁可以使用 Fern Editor。管理员和编辑者可以进行更改;查看者只有只读访问权限。 ### 打开编辑器 @@ -81,25 +81,25 @@ Fern Editor 支持创建和编辑以下组件: | 组件 | 支持状态 | | --- | --- | -| [手风琴](/learn/docs/writing-content/components/accordions) | 已支持 | -| [手风琴组](/learn/docs/writing-content/components/accordion-groups) | 已支持 | -| [侧边栏](/learn/docs/writing-content/components/aside) | 即将推出 | -| [按钮](/learn/docs/writing-content/components/button) | 已支持 | -| [标注](/learn/docs/writing-content/components/callouts) | 已支持 | -| [卡片](/learn/docs/writing-content/components/cards) | 已支持 | -| [卡片组](/learn/docs/writing-content/components/card-groups) | 已支持 | -| [代码块](/learn/docs/writing-content/components/code-blocks) | 已支持 | -| [嵌入](/learn/docs/writing-content/components/embed) | 已支持 | -| [端点请求片段](/learn/docs/writing-content/components/request-snippet) | 已支持 | -| [端点响应片段](/learn/docs/writing-content/components/response-snippet) | 已支持 | -| [端点模式片段](/learn/docs/writing-content/components/endpoint-schema-snippet) | 已支持 | -| [框架](/learn/docs/writing-content/components/frames) | 即将推出 | -| [图标](/learn/docs/writing-content/components/icons) | 即将推出 | -| [参数字段](/learn/docs/writing-content/components/parameter-fields) | 已支持 | -| [步骤](/learn/docs/writing-content/components/steps) | 已支持 | -| [表格](/learn/docs/writing-content/components/tables) | 已支持 | -| [固定表格](/learn/docs/writing-content/components/tables#sticky-tables) | 即将推出 | -| [标签页](/learn/docs/writing-content/components/tabs) | 已支持 | -| [工具提示](/learn/docs/writing-content/components/tooltips) | 已支持 | +| [手风琴](/learn/zh/docs/writing-content/components/accordions) | 已支持 | +| [手风琴组](/learn/zh/docs/writing-content/components/accordions) | 已支持 | +| [侧边栏](/learn/zh/docs/writing-content/components/aside) | 即将推出 | +| [按钮](/learn/zh/docs/writing-content/components/button) | 已支持 | +| [标注](/learn/zh/docs/writing-content/components/callouts) | 已支持 | +| [卡片](/learn/zh/docs/writing-content/components/cards) | 已支持 | +| [卡片组](/learn/zh/docs/writing-content/components/cards) | 已支持 | +| [代码块](/learn/zh/docs/writing-content/components/code-blocks) | 已支持 | +| [嵌入](/learn/zh/docs/writing-content/components/download) | 已支持 | +| [端点请求片段](/learn/zh/docs/writing-content/components/request-snippet) | 已支持 | +| [端点响应片段](/learn/zh/docs/writing-content/components/response-snippet) | 已支持 | +| [端点模式片段](/learn/zh/docs/writing-content/components/endpoint-schema-snippet) | 已支持 | +| [框架](/learn/zh/docs/writing-content/components/frames) | 即将推出 | +| [图标](/learn/zh/docs/writing-content/components/icons) | 即将推出 | +| [参数字段](/learn/zh/docs/writing-content/components/parameter-fields) | 已支持 | +| [步骤](/learn/zh/docs/writing-content/components/steps) | 已支持 | +| [表格](/learn/zh/docs/writing-content/components/tables) | 已支持 | +| [固定表格](/learn/zh/docs/writing-content/components/tables#sticky-tables) | 即将推出 | +| [标签页](/learn/zh/docs/writing-content/components/tabs) | 已支持 | +| [工具提示](/learn/zh/docs/writing-content/components/tooltips) | 已支持 | \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/customization/announcement-banner.mdx b/fern/translations/zh/products/docs/pages/customization/announcement-banner.mdx index a20e32a311..8db181febf 100644 --- a/fern/translations/zh/products/docs/pages/customization/announcement-banner.mdx +++ b/fern/translations/zh/products/docs/pages/customization/announcement-banner.mdx @@ -11,7 +11,7 @@ announcement: message: "🚀 新功能:公告功能已上线!(了解更多) 🚀" ``` -公告消息支持 Markdown 和 HTML。您可以包含链接、图片和其他格式。可以使用[自定义 CSS](/learn/docs/customization/custom-css-js#custom-css) 来自定义公告的样式。 +公告消息支持 Markdown 和 HTML。您可以包含链接、图片和其他格式。可以使用[自定义 CSS](/learn/zh/docs/customization/custom-css-js#custom-css) 来自定义公告的样式。 ## 在多个级别配置公告 diff --git a/fern/translations/zh/products/docs/pages/customization/css-selectors.mdx b/fern/translations/zh/products/docs/pages/customization/css-selectors.mdx index 7d714d6bdb..f9c0d583ba 100644 --- a/fern/translations/zh/products/docs/pages/customization/css-selectors.mdx +++ b/fern/translations/zh/products/docs/pages/customization/css-selectors.mdx @@ -667,7 +667,7 @@ Fern 选择器使用 Tailwind CSS 工具类和 CSS 自定义属性。本页面 -[代码块](/learn/docs/writing-content/components/code-blocks) 的复制按钮。 +[代码块](/learn/zh/docs/writing-content/components/code-blocks) 的复制按钮。 ```css Default CSS .fern-copy-button { @@ -681,7 +681,7 @@ Fern 选择器使用 Tailwind CSS 工具类和 CSS 自定义属性。本页面 -[设置 `maxLines` 的代码块](/learn/docs/writing-content/components/code-blocks#max-height) 的展开按钮。 +[设置 `maxLines` 的代码块](/learn/zh/docs/writing-content/components/code-blocks#max-height) 的展开按钮。 ```css Default CSS .fern-expand-button { @@ -718,7 +718,7 @@ Fern 选择器使用 Tailwind CSS 工具类和 CSS 自定义属性。本页面 ## 卡片组件 -用于[卡片](/learn/docs/writing-content/components/cards)的选择器。 +用于[卡片](/learn/zh/docs/writing-content/components/cards)的选择器。 @@ -1208,7 +1208,7 @@ input.fern-input[type="number"] { ## 下拉菜单与选择器组件 -用于下拉菜单和[产品选择器](/learn/docs/configuration/products)的选择器。 +用于下拉菜单和[产品选择器](/learn/zh/docs/configuration/products)的选择器。 @@ -1410,7 +1410,7 @@ input.fern-input[type="number"] { ## 手风琴组件 -用于[手风琴组件](/learn/docs/writing-content/components/accordions)的选择器。 +用于[手风琴组件](/learn/zh/docs/writing-content/components/accordions)的选择器。 @@ -1673,7 +1673,7 @@ input.fern-input[type="number"] { ## 徽章组件 -用于[徽章](/learn/docs/writing-content/components/badges)和 HTTP 方法标签的选择器。 +用于[徽章](/learn/zh/docs/writing-content/components/badges)和 HTTP 方法标签的选择器。 @@ -1770,7 +1770,7 @@ input.fern-input[type="number"] { -[标注](/learn/docs/writing-content/components/callouts),颜色与 intent 相匹配。 +[标注](/learn/zh/docs/writing-content/components/callouts),颜色与 intent 相匹配。 ```css Default CSS .fern-callout { @@ -1800,7 +1800,7 @@ input.fern-input[type="number"] { -带垂直引导线的[缩进组件](/learn/docs/writing-content/components/indent)。 +带垂直引导线的[缩进组件](/learn/zh/docs/writing-content/components/indent)。 ```css Default CSS .fern-indent { @@ -1827,7 +1827,7 @@ input.fern-input[type="number"] { -[步骤组件](/learn/docs/writing-content/components/steps)的容器。 +[步骤组件](/learn/zh/docs/writing-content/components/steps)的容器。 ```css Default CSS .fern-steps { @@ -1843,7 +1843,7 @@ input.fern-input[type="number"] { -单个[步骤](/learn/docs/writing-content/components/steps)。 +单个[步骤](/learn/zh/docs/writing-content/components/steps)。 ```css Default CSS .fern-step > .fern-anchor { @@ -1857,7 +1857,7 @@ input.fern-input[type="number"] { -用于深度链接的[锚点组件](/learn/docs/writing-content/components/anchor)。 +用于深度链接的[锚点组件](/learn/zh/docs/writing-content/components/anchor)。 ```css Default CSS a.fern-anchor { @@ -1927,7 +1927,7 @@ a.fern-anchor { -支持 `.sticky` 类的表格,可启用[粘性表头](/learn/docs/writing-content/components/tables#sticky-tables)。 +支持 `.sticky` 类的表格,可启用[粘性表头](/learn/zh/docs/writing-content/components/tables#sticky-tables)。 ```css Default CSS .fern-table { @@ -1974,7 +1974,7 @@ a.fern-anchor { ## 变更日志筛选器组件 -用于变更日志筛选 UI 的选择器。仅在带有标签的[变更日志页面](/learn/docs/configuration/changelogs)上出现。 +用于变更日志筛选 UI 的选择器。仅在带有标签的[变更日志页面](/learn/zh/docs/configuration/changelogs)上出现。 @@ -2156,7 +2156,7 @@ a.fern-anchor { ## API Reference 组件 -用于 [API Reference](/learn/docs/api-references/overview) 组件的选择器。 +用于 [API Reference](/learn/zh/docs/api-references/overview) 组件的选择器。 @@ -2241,7 +2241,7 @@ API 属性约束。 ## 工具组件 -用于[图标](/learn/docs/writing-content/components/icons)、[工具提示](/learn/docs/writing-content/components/tooltips)和其他元素的选择器。 +用于[图标](/learn/zh/docs/writing-content/components/icons)、[工具提示](/learn/zh/docs/writing-content/components/tooltips)和其他元素的选择器。 @@ -2377,7 +2377,7 @@ API 属性约束。 -[可运行端点](/learn/docs/writing-content/components/runnable-endpoint)。 +[可运行端点](/learn/zh/docs/writing-content/components/runnable-endpoint)。 ```css Default CSS .fern-runnable-endpoint ul { @@ -2522,7 +2522,7 @@ RSS 订阅按钮。 ## 变更日志组件 -用于[变更日志页面](/learn/docs/configuration/changelogs)的选择器。 +用于[变更日志页面](/learn/zh/docs/configuration/changelogs)的选择器。 diff --git a/fern/translations/zh/products/docs/pages/customization/custom-css-js.mdx b/fern/translations/zh/products/docs/pages/customization/custom-css-js.mdx index ceda05e937..b609471b4b 100644 --- a/fern/translations/zh/products/docs/pages/customization/custom-css-js.mdx +++ b/fern/translations/zh/products/docs/pages/customization/custom-css-js.mdx @@ -11,13 +11,13 @@ sidebar-title: 完全自定义文档 - **CSS** 用于样式设计、视觉变更和隐藏元素 - **JavaScript** 用于客户端行为、第三方集成和小部件 -对于 MDX 内容中的服务端渲染可重用元素,请参阅 [自定义 React 组件](/learn/docs/customization/custom-react-components)。要替换 Fern 的默认页眉或页脚,请参阅 [自定义页眉和页脚](/learn/docs/customization/header-and-footer)。 +对于 MDX 内容中的服务端渲染可重用元素,请参阅 [自定义 React 组件](/learn/zh/docs/customization/custom-react-components)。要替换 Fern 的默认页眉或页脚,请参阅 [自定义页眉和页脚](/learn/zh/docs/customization/header-and-footer)。 -你也可以[直接在 `docs.yml` 文件中自定义许多内容](/learn/docs/configuration/site-level-settings),包括颜色、排版、导航栏链接、布局、分析和元数据。在添加自定义代码之前,请先尝试这些内置选项。 +你也可以[直接在 `docs.yml` 文件中自定义许多内容](/learn/zh/docs/configuration/site-level-settings),包括颜色、排版、导航栏链接、布局、分析和元数据。在添加自定义代码之前,请先尝试这些内置选项。 ## 自定义 CSS -你可以为文档添加自定义 CSS,以进一步自定义外观和感觉。定义的类名会应用到所有 MDX 文件中。请参阅 [CSS 选择器参考](/learn/docs/customization/css-selectors-reference) 获取可用的 `.fern-*` 选择器完整列表。 +你可以为文档添加自定义 CSS,以进一步自定义外观和感觉。定义的类名会应用到所有 MDX 文件中。请参阅 [CSS 选择器参考](/learn/zh/docs/customization/css-selectors-reference) 获取可用的 `.fern-*` 选择器完整列表。 ### 创建 `styles.css` @@ -62,12 +62,12 @@ css: 要通过 Fern 的内置样式设计来自定义文档的背景、徽标、字体和布局, -请查看 [全局配置](/learn/docs/configuration/site-level-settings)。 +请查看 [全局配置](/learn/zh/docs/configuration/site-level-settings)。 ### 内置 CSS 颜色变量 -Fern 会从你的 [`docs.yml` 颜色配置](/learn/docs/configuration/site-level-settings#colors-configuration) 自动生成 CSS 变量,并将它们作为 CSS 自定义属性在样式表中提供。颜色会转换为 [oklch](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/oklch) 以确保一致的颜色管理,并为不支持的浏览器提供十六进制回退。这些变量会在明暗模式之间自动适配——明亮模式使用 `.light` 和 `:root` 选择器,而暗黑模式使用 `.dark` 选择器。 +Fern 会从你的 [`docs.yml` 颜色配置](/learn/zh/docs/configuration/site-level-settings#colors-configuration) 自动生成 CSS 变量,并将它们作为 CSS 自定义属性在样式表中提供。颜色会转换为 [oklch](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/oklch) 以确保一致的颜色管理,并为不支持的浏览器提供十六进制回退。这些变量会在明暗模式之间自动适配——明亮模式使用 `.light` 和 `:root` 选择器,而暗黑模式使用 `.dark` 选择器。 @@ -262,7 +262,7 @@ Fern 还会生成遵循 [Radix UI 步骤范式](https://www.radix-ui.com/colors/ ``` -你可以使用 CSS 类名来定位其他 Fern UI 组件。参阅 [CSS 选择器参考](/learn/docs/customization/css-selectors-reference) 获取所有可用选择器,或使用浏览器的开发者工具来检查元素。 +你可以使用 CSS 类名来定位其他 Fern UI 组件。参阅 [CSS 选择器参考](/learn/zh/docs/customization/css-selectors-reference) 获取所有可用选择器,或使用浏览器的开发者工具来检查元素。 @@ -416,6 +416,6 @@ js: ### 常见用例 -- **第三方集成:** 对于 `docs.yml` 中不原生支持的工具,通过将嵌入代码片段粘贴到自定义 JS 文件中来添加分析、会话录制、支持小部件或标签管理器。参阅 [集成第三方工具](/learn/docs/integrations/overview#connect-other-integrations-via-custom-javascript) 获取支持的工具和示例。 -- **自定义搜索:** 实现自定义搜索(还需要[你的 Algolia 凭据](/learn/docs/customization/search)) +- **第三方集成:** 对于 `docs.yml` 中不原生支持的工具,通过将嵌入代码片段粘贴到自定义 JS 文件中来添加分析、会话录制、支持小部件或标签管理器。参阅 [集成第三方工具](/learn/zh/docs/integrations/overview#connect-other-integrations-via-custom-javascript) 获取支持的工具和示例。 +- **自定义搜索:** 实现自定义搜索(还需要[你的 Algolia 凭据](/learn/zh/docs/customization/search)) - **脚本和小部件:** 插入任何客户端脚本或可嵌入的小部件 \ No newline at end of file diff --git a/fern/translations/zh/products/docs/pages/customization/custom-header-footer.mdx b/fern/translations/zh/products/docs/pages/customization/custom-header-footer.mdx index dd4a97ab0a..a20f2b1323 100644 --- a/fern/translations/zh/products/docs/pages/customization/custom-header-footer.mdx +++ b/fern/translations/zh/products/docs/pages/customization/custom-header-footer.mdx @@ -95,14 +95,14 @@ export default function CustomHeader({ Fern }) { | 组件 | 描述 | | --- | --- | -| `` | 您在 `docs.yml` 中配置的网站[标志](/learn/docs/configuration/site-level-settings#logo-configuration)。链接到主页。您可以使用 `document.querySelector('#fern-header [data-fern-logo]')` 来定位此组件。 | -| `` | [搜索](/learn/docs/customization/search)栏,如果启用的话包括 AI 搜索触发器。 | -| `` | 用于在[产品](/learn/docs/configuration/products)之间切换的下拉菜单。 | -| `` | 用于在[版本](/learn/docs/configuration/versions)之间切换的下拉菜单。 | -| `` | 用于切换活动 [SDK 语言](/learn/docs/configuration/site-level-settings#default-language)的下拉菜单。 | -| `` | 在 `docs.yml` 的 `navbar-links` 下配置的[导航链接](/learn/docs/configuration/site-level-settings#navbar-links-configuration)。 | -| `` | [身份验证文档](/learn/docs/authentication/overview)的登录/注册按钮。 | -| `` | 在[明暗模式](/learn/docs/configuration/site-level-settings#theme-configuration)之间切换。 | +| `` | 您在 `docs.yml` 中配置的网站[标志](/learn/zh/docs/configuration/site-level-settings#logo-configuration)。链接到主页。您可以使用 `document.querySelector('#fern-header [data-fern-logo]')` 来定位此组件。 | +| `` | [搜索](/learn/zh/docs/customization/search)栏,如果启用的话包括 AI 搜索触发器。 | +| `` | 用于在[产品](/learn/zh/docs/configuration/products)之间切换的下拉菜单。 | +| `` | 用于在[版本](/learn/zh/docs/configuration/versions)之间切换的下拉菜单。 | +| `` | 用于切换活动 [SDK 语言](/learn/zh/docs/configuration/site-level-settings#default-language)的下拉菜单。 | +| `` | 在 `docs.yml` 的 `navbar-links` 下配置的[导航链接](/learn/zh/docs/configuration/site-level-settings#navbar-links-configuration)。 | +| `` | [身份验证文档](/learn/zh/docs/authentication/overview)的登录/注册按钮。 | +| `` | 在[明暗模式](/learn/zh/docs/configuration/site-level-settings#theme-configuration)之间切换。 | | `` | Fern 内置的移动端侧边栏切换按钮。显示汉堡包/关闭图标并打开可关闭的侧边栏。仅在移动端视口上可见。 | diff --git a/fern/translations/zh/products/docs/pages/customization/custom-react-components.mdx b/fern/translations/zh/products/docs/pages/customization/custom-react-components.mdx index bbc5f5bd16..b7cdbf0b45 100644 --- a/fern/translations/zh/products/docs/pages/customization/custom-react-components.mdx +++ b/fern/translations/zh/products/docs/pages/customization/custom-react-components.mdx @@ -8,7 +8,7 @@ sidebar-title: 自定义 React 组件 您可以通过添加自定义 React 组件来扩展 Fern 的内置组件库。这允许您创建符合文档需求的独特交互式元素。组件采用服务端渲染,具有更好的 SEO 和性能表现,且不会出现布局偏移。 - 不要使用 React 组件来定义常量。请考虑使用[可重用片段](/learn/docs/writing-content/reusable-snippets)。 + 不要使用 React 组件来定义常量。请考虑使用[可重用片段](/learn/zh/docs/writing-content/reusable-snippets)。 ## MDX 中的自定义组件 diff --git a/fern/translations/zh/products/docs/pages/customization/embedded-mode.mdx b/fern/translations/zh/products/docs/pages/customization/embedded-mode.mdx index a3bf322014..4ba936bb5c 100644 --- a/fern/translations/zh/products/docs/pages/customization/embedded-mode.mdx +++ b/fern/translations/zh/products/docs/pages/customization/embedded-mode.mdx @@ -32,4 +32,4 @@ sidebar-title: 嵌入模式 ## 嵌入外部页面 -[在文档中嵌入外部页面](/learn/docs/writing-content/markdown-media#embed-external-sites)使用相同的 `