From fb98c3e63e6d7ebb7b5604192ff1247b9e2a19ff Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 31 Jul 2026 17:09:17 +0000 Subject: [PATCH 1/5] docs: document user-agent template behavior with platform headers Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../sdks/generators/csharp/configuration.mdx | 13 ++++++++++++- .../products/sdks/generators/java/configuration.mdx | 4 +++- .../sdks/generators/python/configuration.mdx | 13 ++++++++++++- .../sdks/generators/typescript/configuration.mdx | 13 ++++++++++++- 4 files changed, 39 insertions(+), 4 deletions(-) diff --git a/fern/products/sdks/generators/csharp/configuration.mdx b/fern/products/sdks/generators/csharp/configuration.mdx index b440858a6d..0ef64bbded 100644 --- a/fern/products/sdks/generators/csharp/configuration.mdx +++ b/fern/products/sdks/generators/csharp/configuration.mdx @@ -96,7 +96,7 @@ When enabled, the generated SDK omits the `X-Fern-Language`, `X-Fern-SDK-Name`, -When enabled, the generated SDK sends a single structured `User-Agent` header of the form `{sdkName}/{version} ({os}; {arch}) {runtime}/{runtimeVersion}` (for example, `my-sdk/1.2.0 (linux; x86_64) dotnet/8.0.4`), carrying SDK, operating system, architecture, and runtime information in place of the default `User-Agent` and discrete platform headers. If `omit-fern-headers` is enabled, no `User-Agent` or platform headers are sent and this option has no effect. +When enabled, the generated SDK sends a single structured `User-Agent` header of the form `{sdkName}/{version} ({os}; {arch}) {runtime}/{runtimeVersion}` (for example, `my-sdk/1.2.0 (linux; x86_64) dotnet/8.0.4`), carrying SDK, operating system, architecture, and runtime information in place of the default `User-Agent` and discrete platform headers. A configured [`user-agent`](#user-agent) template supplies the leading product token. If `omit-fern-headers` is enabled, no `User-Agent` or platform headers are sent and this option has no effect. @@ -122,3 +122,14 @@ When enabled, places core SDK classes (like base client classes and utilities) i When enabled, generates discriminated union types for API responses that can contain multiple different object types. This provides type-safe handling of polymorphic responses. + + +Sets a custom `User-Agent` header template for requests sent by the generated SDK. The template is resolved at generation time and supports the `{packageName}`, `{version}`, `{language}`, `{generatorVersion}`, `{organization}`, and `{apiName}` placeholders. + +```yaml title="generators.yml" +config: + user-agent: "plantstore-dotnet-sdk/{version}" +``` + +This configuration sends `User-Agent: plantstore-dotnet-sdk/0.1.0`. With [`include-platform-headers`](#include-platform-headers) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: `User-Agent: plantstore-dotnet-sdk/0.1.0 (linux; x86_64) dotnet/8.0.4`. A resolved value whose trailing segment isn't a version, such as `plantstore/sdk-dotnet`, is used as-is and no version segment is added. + diff --git a/fern/products/sdks/generators/java/configuration.mdx b/fern/products/sdks/generators/java/configuration.mdx index 73473277d1..2347e06d14 100644 --- a/fern/products/sdks/generators/java/configuration.mdx +++ b/fern/products/sdks/generators/java/configuration.mdx @@ -110,7 +110,7 @@ When enabled, the generated SDK omits the `X-Fern-Language`, `X-Fern-SDK-Name`, -When enabled, the generated SDK sends a single structured `User-Agent` header of the form `{sdkName}/{version} ({os}; {arch}) {runtime}/{runtimeVersion}` (for example, `com.fern.sdk/0.0.1 (linux; x86_64) Java/17.0.13`), carrying SDK, operating system, architecture, and runtime information in place of the default `User-Agent` and discrete platform headers. If `omit-fern-headers` is enabled, no `User-Agent` or platform headers are sent and this option has no effect. +When enabled, the generated SDK sends a single structured `User-Agent` header of the form `{sdkName}/{version} ({os}; {arch}) {runtime}/{runtimeVersion}` (for example, `com.fern.sdk/0.0.1 (linux; x86_64) Java/17.0.13`), carrying SDK, operating system, architecture, and runtime information in place of the default `User-Agent` and discrete platform headers. A configured [`user-agent`](#user-agent) template supplies the leading product token. If `omit-fern-headers` is enabled, no `User-Agent` or platform headers are sent and this option has no effect. @@ -159,6 +159,8 @@ groups: ``` With this configuration, an organization named `plantstore` with an API named `plants` generates an SDK that sends `User-Agent: plantstore-plants/0.1.0 (java)`. + +With [`includePlatformHeaders`](#includeplatformheaders) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: a template of `plantstore-plants/{version}` sends `User-Agent: plantstore-plants/0.1.0 (linux; x86_64) Java/17.0.13`. A resolved value whose trailing segment isn't a version, such as `plantstore/sdk-java`, is used as-is and no version segment is added. diff --git a/fern/products/sdks/generators/python/configuration.mdx b/fern/products/sdks/generators/python/configuration.mdx index 14d45d14c9..ecac3fa47b 100644 --- a/fern/products/sdks/generators/python/configuration.mdx +++ b/fern/products/sdks/generators/python/configuration.mdx @@ -181,7 +181,7 @@ When enabled, the generated SDK omits the `X-Fern-Language`, `X-Fern-SDK-Name`, -When enabled, the generated SDK sends a single structured `User-Agent` header of the form `{sdkName}/{version} ({os}; {arch}) {runtime}/{runtimeVersion}` (for example, `fern_examples/0.0.1 (linux; x86_64) Python/3.11.0`), carrying SDK, operating system, architecture, and runtime information in place of the default `User-Agent` and discrete platform headers. If `omit_fern_headers` is enabled, no `User-Agent` or platform headers are sent and this option has no effect. +When enabled, the generated SDK sends a single structured `User-Agent` header of the form `{sdkName}/{version} ({os}; {arch}) {runtime}/{runtimeVersion}` (for example, `fern_examples/0.0.1 (linux; x86_64) Python/3.11.0`), carrying SDK, operating system, architecture, and runtime information in place of the default `User-Agent` and discrete platform headers. A configured [`user-agent`](#user-agent) template supplies the leading product token. If `omit_fern_headers` is enabled, no `User-Agent` or platform headers are sent and this option has no effect. @@ -219,6 +219,17 @@ When enabled, skips code formatting (like black) on the generated Python code. Sets the client timeout in seconds, or `infinity` to disable timeouts. + +Sets a custom `User-Agent` header template for requests sent by the generated SDK. Unlike the other Python options, this key is hyphenated. The template is resolved at generation time and supports the `{packageName}`, `{version}`, `{language}`, `{generatorVersion}`, `{organization}`, and `{apiName}` placeholders. + +```yaml title="generators.yml" +config: + user-agent: "plantstore-python-sdk/{version}" +``` + +This configuration sends `User-Agent: plantstore-python-sdk/0.1.0`. With [`include_platform_headers`](#include_platform_headers) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: `User-Agent: plantstore-python-sdk/0.1.0 (linux; x86_64) Python/3.11.0`. A resolved value whose trailing segment isn't a version, such as `plantstore/sdk-python`, is used as-is and no version segment is added. + + When enabled, includes the API name as part of the package structure and naming. diff --git a/fern/products/sdks/generators/typescript/configuration.mdx b/fern/products/sdks/generators/typescript/configuration.mdx index f9694f6160..ff994d217c 100644 --- a/fern/products/sdks/generators/typescript/configuration.mdx +++ b/fern/products/sdks/generators/typescript/configuration.mdx @@ -406,7 +406,7 @@ When enabled, the generated SDK omits the `X-Fern-Language`, `X-Fern-SDK-Name`, -When enabled, the generated SDK sends a single structured `User-Agent` header of the form `{sdkName}/{version} ({os}; {arch}) {runtime}/{runtimeVersion}` (for example, `my-sdk/0.0.1 (linux; x86_64) Node/20.11.0`), carrying SDK, operating system, architecture, and runtime information in place of the default `User-Agent` and discrete platform headers. If `omitFernHeaders` is enabled, no `User-Agent` or platform headers are sent and this option has no effect. +When enabled, the generated SDK sends a single structured `User-Agent` header of the form `{sdkName}/{version} ({os}; {arch}) {runtime}/{runtimeVersion}` (for example, `my-sdk/0.0.1 (linux; x86_64) Node/20.11.0`), carrying SDK, operating system, architecture, and runtime information in place of the default `User-Agent` and discrete platform headers. A configured [`user-agent`](#user-agent) template supplies the leading product token. If `omitFernHeaders` is enabled, no `User-Agent` or platform headers are sent and this option has no effect. @@ -526,6 +526,17 @@ The default is `web`. When `treatUnknownAsAny` is enabled, [unknown types from Fern are generated into TypeScript using `any` instead of the `unknown` type](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-0.html#new-unknown-top-type). + +Sets a custom `User-Agent` header template for requests sent by the generated SDK. Unlike the other TypeScript options, this key is hyphenated. The template is resolved at generation time and supports the `{packageName}`, `{version}`, `{language}`, `{generatorVersion}`, `{organization}`, and `{apiName}` placeholders. + +```yaml title="generators.yml" +config: + user-agent: "plantstore-node-sdk/{version}" +``` + +This configuration sends `User-Agent: plantstore-node-sdk/0.1.0`. With [`includePlatformHeaders`](#includeplatformheaders) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: `User-Agent: plantstore-node-sdk/0.1.0 (linux; x86_64) Node/20.11.0`. A resolved value whose trailing segment isn't a version, such as `@plantstore/sdk`, is used as-is and no version segment is added. + + 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. From 7c1847c34d3b8b1ffc8de09ce8950cd5aee416a3 Mon Sep 17 00:00:00 2001 From: "devin.logan" Date: Mon, 3 Aug 2026 14:57:27 +0000 Subject: [PATCH 2/5] docs: document user-agent for Go, PHP, and Ruby and in the generators.yml reference Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- fern/products/sdks/generators/go/configuration.mdx | 13 ++++++++++++- fern/products/sdks/generators/php/configuration.mdx | 13 ++++++++++++- .../products/sdks/generators/ruby/configuration.mdx | 13 ++++++++++++- .../sdks/reference/generators-yml-reference.mdx | 2 ++ 4 files changed, 38 insertions(+), 3 deletions(-) diff --git a/fern/products/sdks/generators/go/configuration.mdx b/fern/products/sdks/generators/go/configuration.mdx index e480de85fa..932709a0ce 100644 --- a/fern/products/sdks/generators/go/configuration.mdx +++ b/fern/products/sdks/generators/go/configuration.mdx @@ -55,7 +55,7 @@ When enabled, the generated SDK omits the `X-Fern-Language`, `X-Fern-SDK-Name`, -When enabled, the generated SDK sends a single structured `User-Agent` header of the form `{sdkName}/{version} ({os}; {arch}) {runtime}/{runtimeVersion}` (for example, `my-sdk/0.0.1 (linux; x86_64) Go/1.22.0`), carrying SDK, operating system, architecture, and runtime information in place of the default `User-Agent` and discrete platform headers. If `omitFernHeaders` is enabled, no `User-Agent` or platform headers are sent and this option has no effect. +When enabled, the generated SDK sends a single structured `User-Agent` header of the form `{sdkName}/{version} ({os}; {arch}) {runtime}/{runtimeVersion}` (for example, `my-sdk/0.0.1 (linux; x86_64) Go/1.22.0`), carrying SDK, operating system, architecture, and runtime information in place of the default `User-Agent` and discrete platform headers. A configured [`user-agent`](#user-agent) template supplies the leading product token. If `omitFernHeaders` is enabled, no `User-Agent` or platform headers are sent and this option has no effect. @@ -172,4 +172,15 @@ Controls the union type generation strategy. Use 'v0' for the legacy union imple When enabled, uses `io.Reader` interface for handling byte request bodies instead of byte slices. This is more memory-efficient for large payloads and follows Go best practices for streaming data. + + + +Sets a custom `User-Agent` header template for requests sent by the generated SDK. Unlike the other Go options, this key is hyphenated. The template is resolved at generation time and supports the `{packageName}`, `{version}`, `{language}`, `{generatorVersion}`, `{organization}`, and `{apiName}` placeholders. + +```yaml title="generators.yml" +config: + user-agent: "plantstore-go-sdk/{version}" +``` + +This configuration sends `User-Agent: plantstore-go-sdk/0.1.0`. With [`includePlatformHeaders`](#includeplatformheaders) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: `User-Agent: plantstore-go-sdk/0.1.0 (linux; x86_64) Go/1.22.0`. A resolved value whose trailing segment isn't a version, such as `plantstore/sdk-go`, is used as-is and no version segment is added. \ No newline at end of file diff --git a/fern/products/sdks/generators/php/configuration.mdx b/fern/products/sdks/generators/php/configuration.mdx index b330555d07..ef0fca9d05 100644 --- a/fern/products/sdks/generators/php/configuration.mdx +++ b/fern/products/sdks/generators/php/configuration.mdx @@ -58,7 +58,7 @@ When enabled, the generated SDK omits the `X-Fern-Language`, `X-Fern-SDK-Name`, -When enabled, the generated SDK sends a single structured `User-Agent` header of the form `{sdkName}/{version} ({os}; {arch}) {runtime}/{runtimeVersion}` (for example, `my-sdk/0.0.1 (linux; x86_64) PHP/8.2.0`), carrying SDK, operating system, architecture, and runtime information in place of the default `User-Agent` and discrete platform headers. If `omitFernHeaders` is enabled, no `User-Agent` or platform headers are sent and this option has no effect. +When enabled, the generated SDK sends a single structured `User-Agent` header of the form `{sdkName}/{version} ({os}; {arch}) {runtime}/{runtimeVersion}` (for example, `my-sdk/0.0.1 (linux; x86_64) PHP/8.2.0`), carrying SDK, operating system, architecture, and runtime information in place of the default `User-Agent` and discrete platform headers. A configured [`user-agent`](#user-agent) template supplies the leading product token. If `omitFernHeaders` is enabled, no `User-Agent` or platform headers are sent and this option has no effect. @@ -72,3 +72,14 @@ Specifies the directory path where the generated SDK source files should be plac Controls the access level of generated class properties. When set to 'public', properties are public and getter/setter methods are omitted. When set to 'private', properties are private and getter/setter methods are generated for encapsulation. + + +Sets a custom `User-Agent` header template for requests sent by the generated SDK. Unlike the other PHP options, this key is hyphenated. The template is resolved at generation time and supports the `{packageName}`, `{version}`, `{language}`, `{generatorVersion}`, `{organization}`, and `{apiName}` placeholders. + +```yaml title="generators.yml" +config: + user-agent: "plantstore-php-sdk/{version}" +``` + +This configuration sends `User-Agent: plantstore-php-sdk/0.1.0`. With [`includePlatformHeaders`](#includeplatformheaders) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: `User-Agent: plantstore-php-sdk/0.1.0 (linux; x86_64) PHP/8.2.0`. A resolved value whose trailing segment isn't a version, such as `plantstore/sdk-php`, is used as-is and no version segment is added. + diff --git a/fern/products/sdks/generators/ruby/configuration.mdx b/fern/products/sdks/generators/ruby/configuration.mdx index 5367712ed8..32518c1911 100644 --- a/fern/products/sdks/generators/ruby/configuration.mdx +++ b/fern/products/sdks/generators/ruby/configuration.mdx @@ -101,7 +101,7 @@ When enabled, the generated SDK omits the `X-Fern-Language`, `X-Fern-SDK-Name`, -When enabled, the generated SDK sends a single structured `User-Agent` header of the form `{sdkName}/{version} ({os}; {arch}) {runtime}/{runtimeVersion}` (for example, `my-sdk/0.0.1 (linux; x86_64) Ruby/3.2.0`), carrying SDK, operating system, architecture, and runtime information in place of the default `User-Agent` and discrete platform headers. If `omitFernHeaders` is enabled, no `User-Agent` or platform headers are sent and this option has no effect. +When enabled, the generated SDK sends a single structured `User-Agent` header of the form `{sdkName}/{version} ({os}; {arch}) {runtime}/{runtimeVersion}` (for example, `my-sdk/0.0.1 (linux; x86_64) Ruby/3.2.0`), carrying SDK, operating system, architecture, and runtime information in place of the default `User-Agent` and discrete platform headers. A configured [`user-agent`](#user-agent) template supplies the leading product token. If `omitFernHeaders` is enabled, no `User-Agent` or platform headers are sent and this option has no effect. @@ -118,3 +118,14 @@ config: This will load `lib//custom_integration.rb` and `lib//sentry_integration.rb` when the gem is required. + + +Sets a custom `User-Agent` header template for requests sent by the generated SDK. Unlike the other Ruby options, this key is hyphenated. The template is resolved at generation time and supports the `{packageName}`, `{version}`, `{language}`, `{generatorVersion}`, `{organization}`, and `{apiName}` placeholders. + +```yaml title="generators.yml" +config: + user-agent: "plantstore-ruby-sdk/{version}" +``` + +This configuration sends `User-Agent: plantstore-ruby-sdk/0.1.0`. With [`includePlatformHeaders`](#includeplatformheaders) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: `User-Agent: plantstore-ruby-sdk/0.1.0 (linux; x86_64) Ruby/3.2.0`. A resolved value whose trailing segment isn't a version, such as `plantstore/sdk-ruby`, is used as-is and no version segment is added. + diff --git a/fern/products/sdks/reference/generators-yml-reference.mdx b/fern/products/sdks/reference/generators-yml-reference.mdx index 1fa9ebdb25..af8c55b742 100644 --- a/fern/products/sdks/reference/generators-yml-reference.mdx +++ b/fern/products/sdks/reference/generators-yml-reference.mdx @@ -663,6 +663,8 @@ groups: noSerdeLayer: false ``` +Most keys are specific to one generator, but `user-agent` is resolved by the CLI, so it behaves identically in every generator's `config`: it sets a [`User-Agent` header template](/learn/sdks/generators/typescript/configuration#user-agent) interpolated at generation time, defaulting to `{packageName}/{version}`. The TypeScript, Python, Go, Java, .NET, PHP, and Ruby generators send the resolved value; the Rust and Swift generators ignore it. + } href="/sdks/generators/typescript/configuration"> From 041eb34488a760c500f23b278fd40854cc893481 Mon Sep 17 00:00:00 2001 From: "devin.logan" Date: Wed, 12 Aug 2026 21:02:42 +0000 Subject: [PATCH 3/5] docs: merge main and cross-link user-agent with app-info option Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- fern/products/sdks/generators/csharp/configuration.mdx | 2 +- fern/products/sdks/generators/go/configuration.mdx | 2 +- fern/products/sdks/generators/java/configuration.mdx | 2 +- fern/products/sdks/generators/php/configuration.mdx | 2 +- fern/products/sdks/generators/python/configuration.mdx | 2 +- fern/products/sdks/generators/ruby/configuration.mdx | 2 +- fern/products/sdks/generators/typescript/configuration.mdx | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fern/products/sdks/generators/csharp/configuration.mdx b/fern/products/sdks/generators/csharp/configuration.mdx index 7b3833ea99..49a545404e 100644 --- a/fern/products/sdks/generators/csharp/configuration.mdx +++ b/fern/products/sdks/generators/csharp/configuration.mdx @@ -140,5 +140,5 @@ config: user-agent: "plantstore-dotnet-sdk/{version}" ``` -This configuration sends `User-Agent: plantstore-dotnet-sdk/0.1.0`. With [`include-platform-headers`](#include-platform-headers) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: `User-Agent: plantstore-dotnet-sdk/0.1.0 (linux; x86_64) dotnet/8.0.4`. A resolved value whose trailing segment isn't a version, such as `plantstore/sdk-dotnet`, is used as-is and no version segment is added. +This configuration sends `User-Agent: plantstore-dotnet-sdk/0.1.0`. With [`include-platform-headers`](#include-platform-headers) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: `User-Agent: plantstore-dotnet-sdk/0.1.0 (linux; x86_64) dotnet/8.0.4`. A resolved value whose trailing segment isn't a version, such as `plantstore/sdk-dotnet`, is used as-is and no version segment is added. An application's own token from [`allow-user-agent-app-info`](#allow-user-agent-app-info) is appended after the resolved value. diff --git a/fern/products/sdks/generators/go/configuration.mdx b/fern/products/sdks/generators/go/configuration.mdx index b71fbc7386..d628f94735 100644 --- a/fern/products/sdks/generators/go/configuration.mdx +++ b/fern/products/sdks/generators/go/configuration.mdx @@ -191,5 +191,5 @@ config: user-agent: "plantstore-go-sdk/{version}" ``` -This configuration sends `User-Agent: plantstore-go-sdk/0.1.0`. With [`includePlatformHeaders`](#includeplatformheaders) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: `User-Agent: plantstore-go-sdk/0.1.0 (linux; x86_64) Go/1.22.0`. A resolved value whose trailing segment isn't a version, such as `plantstore/sdk-go`, is used as-is and no version segment is added. +This configuration sends `User-Agent: plantstore-go-sdk/0.1.0`. With [`includePlatformHeaders`](#includeplatformheaders) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: `User-Agent: plantstore-go-sdk/0.1.0 (linux; x86_64) Go/1.22.0`. A resolved value whose trailing segment isn't a version, such as `plantstore/sdk-go`, is used as-is and no version segment is added. An application's own token from [`allowUserAgentAppInfo`](#allowuseragentappinfo) is appended after the resolved value. \ No newline at end of file diff --git a/fern/products/sdks/generators/java/configuration.mdx b/fern/products/sdks/generators/java/configuration.mdx index 82c2bb74f7..43a779b1bf 100644 --- a/fern/products/sdks/generators/java/configuration.mdx +++ b/fern/products/sdks/generators/java/configuration.mdx @@ -173,7 +173,7 @@ groups: With this configuration, an organization named `plantstore` with an API named `plants` generates an SDK that sends `User-Agent: plantstore-plants/0.1.0 (java)`. -With [`includePlatformHeaders`](#includeplatformheaders) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: a template of `plantstore-plants/{version}` sends `User-Agent: plantstore-plants/0.1.0 (linux; x86_64) Java/17.0.13`. A resolved value whose trailing segment isn't a version, such as `plantstore/sdk-java`, is used as-is and no version segment is added. +With [`includePlatformHeaders`](#includeplatformheaders) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: a template of `plantstore-plants/{version}` sends `User-Agent: plantstore-plants/0.1.0 (linux; x86_64) Java/17.0.13`. A resolved value whose trailing segment isn't a version, such as `plantstore/sdk-java`, is used as-is and no version segment is added. An application's own token from [`allowUserAgentAppInfo`](#allowuseragentappinfo) is appended after the resolved value. diff --git a/fern/products/sdks/generators/php/configuration.mdx b/fern/products/sdks/generators/php/configuration.mdx index c0bc911a75..6fec23d9b5 100644 --- a/fern/products/sdks/generators/php/configuration.mdx +++ b/fern/products/sdks/generators/php/configuration.mdx @@ -94,5 +94,5 @@ config: user-agent: "plantstore-php-sdk/{version}" ``` -This configuration sends `User-Agent: plantstore-php-sdk/0.1.0`. With [`includePlatformHeaders`](#includeplatformheaders) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: `User-Agent: plantstore-php-sdk/0.1.0 (linux; x86_64) PHP/8.2.0`. A resolved value whose trailing segment isn't a version, such as `plantstore/sdk-php`, is used as-is and no version segment is added. +This configuration sends `User-Agent: plantstore-php-sdk/0.1.0`. With [`includePlatformHeaders`](#includeplatformheaders) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: `User-Agent: plantstore-php-sdk/0.1.0 (linux; x86_64) PHP/8.2.0`. A resolved value whose trailing segment isn't a version, such as `plantstore/sdk-php`, is used as-is and no version segment is added. An application's own token from [`allowUserAgentAppInfo`](#allowuseragentappinfo) is appended after the resolved value. diff --git a/fern/products/sdks/generators/python/configuration.mdx b/fern/products/sdks/generators/python/configuration.mdx index e0be8eb8a0..3a14244a0b 100644 --- a/fern/products/sdks/generators/python/configuration.mdx +++ b/fern/products/sdks/generators/python/configuration.mdx @@ -246,7 +246,7 @@ config: user-agent: "plantstore-python-sdk/{version}" ``` -This configuration sends `User-Agent: plantstore-python-sdk/0.1.0`. With [`include_platform_headers`](#include_platform_headers) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: `User-Agent: plantstore-python-sdk/0.1.0 (linux; x86_64) Python/3.11.0`. A resolved value whose trailing segment isn't a version, such as `plantstore/sdk-python`, is used as-is and no version segment is added. +This configuration sends `User-Agent: plantstore-python-sdk/0.1.0`. With [`include_platform_headers`](#include_platform_headers) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: `User-Agent: plantstore-python-sdk/0.1.0 (linux; x86_64) Python/3.11.0`. A resolved value whose trailing segment isn't a version, such as `plantstore/sdk-python`, is used as-is and no version segment is added. An application's own token from [`allow_user_agent_app_info`](#allow_user_agent_app_info) is appended after the resolved value, and [`runtime_version`](#runtime_version) replaces the resolved value's trailing version segment at runtime. diff --git a/fern/products/sdks/generators/ruby/configuration.mdx b/fern/products/sdks/generators/ruby/configuration.mdx index e7e8178949..ec6526e106 100644 --- a/fern/products/sdks/generators/ruby/configuration.mdx +++ b/fern/products/sdks/generators/ruby/configuration.mdx @@ -136,5 +136,5 @@ config: user-agent: "plantstore-ruby-sdk/{version}" ``` -This configuration sends `User-Agent: plantstore-ruby-sdk/0.1.0`. With [`includePlatformHeaders`](#includeplatformheaders) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: `User-Agent: plantstore-ruby-sdk/0.1.0 (linux; x86_64) Ruby/3.2.0`. A resolved value whose trailing segment isn't a version, such as `plantstore/sdk-ruby`, is used as-is and no version segment is added. +This configuration sends `User-Agent: plantstore-ruby-sdk/0.1.0`. With [`includePlatformHeaders`](#includeplatformheaders) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: `User-Agent: plantstore-ruby-sdk/0.1.0 (linux; x86_64) Ruby/3.2.0`. A resolved value whose trailing segment isn't a version, such as `plantstore/sdk-ruby`, is used as-is and no version segment is added. An application's own token from [`allowUserAgentAppInfo`](#allowuseragentappinfo) is appended after the resolved value. diff --git a/fern/products/sdks/generators/typescript/configuration.mdx b/fern/products/sdks/generators/typescript/configuration.mdx index fcd05eed0d..a7fd951138 100644 --- a/fern/products/sdks/generators/typescript/configuration.mdx +++ b/fern/products/sdks/generators/typescript/configuration.mdx @@ -559,7 +559,7 @@ config: user-agent: "plantstore-node-sdk/{version}" ``` -This configuration sends `User-Agent: plantstore-node-sdk/0.1.0`. With [`includePlatformHeaders`](#includeplatformheaders) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: `User-Agent: plantstore-node-sdk/0.1.0 (linux; x86_64) Node/20.11.0`. A resolved value whose trailing segment isn't a version, such as `@plantstore/sdk`, is used as-is and no version segment is added. +This configuration sends `User-Agent: plantstore-node-sdk/0.1.0`. With [`includePlatformHeaders`](#includeplatformheaders) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: `User-Agent: plantstore-node-sdk/0.1.0 (linux; x86_64) Node/20.11.0`. A resolved value whose trailing segment isn't a version, such as `@plantstore/sdk`, is used as-is and no version segment is added. An application's own token from [`allowUserAgentAppInfo`](#allowuseragentappinfo) is appended after the resolved value. From 7291cea03a1b31857b5db045f4f1d6f47b11de87 Mon Sep 17 00:00:00 2001 From: "devin.logan" Date: Wed, 12 Aug 2026 21:06:45 +0000 Subject: [PATCH 4/5] docs: tighten user-agent option prose Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- fern/products/sdks/generators/csharp/configuration.mdx | 2 +- fern/products/sdks/generators/go/configuration.mdx | 4 ++-- fern/products/sdks/generators/java/configuration.mdx | 2 +- fern/products/sdks/generators/php/configuration.mdx | 4 ++-- fern/products/sdks/generators/python/configuration.mdx | 4 ++-- fern/products/sdks/generators/ruby/configuration.mdx | 4 ++-- fern/products/sdks/generators/typescript/configuration.mdx | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/fern/products/sdks/generators/csharp/configuration.mdx b/fern/products/sdks/generators/csharp/configuration.mdx index 49a545404e..543b5151c1 100644 --- a/fern/products/sdks/generators/csharp/configuration.mdx +++ b/fern/products/sdks/generators/csharp/configuration.mdx @@ -140,5 +140,5 @@ config: user-agent: "plantstore-dotnet-sdk/{version}" ``` -This configuration sends `User-Agent: plantstore-dotnet-sdk/0.1.0`. With [`include-platform-headers`](#include-platform-headers) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: `User-Agent: plantstore-dotnet-sdk/0.1.0 (linux; x86_64) dotnet/8.0.4`. A resolved value whose trailing segment isn't a version, such as `plantstore/sdk-dotnet`, is used as-is and no version segment is added. An application's own token from [`allow-user-agent-app-info`](#allow-user-agent-app-info) is appended after the resolved value. +This sends `User-Agent: plantstore-dotnet-sdk/0.1.0`. With [`include-platform-headers`](#include-platform-headers) enabled, the resolved value leads the structured header: `User-Agent: plantstore-dotnet-sdk/0.1.0 (linux; x86_64) dotnet/8.0.4`. A value that doesn't end in a version, such as `plantstore/sdk-dotnet`, is used as-is. The [`allow-user-agent-app-info`](#allow-user-agent-app-info) token is appended after either form. diff --git a/fern/products/sdks/generators/go/configuration.mdx b/fern/products/sdks/generators/go/configuration.mdx index d628f94735..c538d4242c 100644 --- a/fern/products/sdks/generators/go/configuration.mdx +++ b/fern/products/sdks/generators/go/configuration.mdx @@ -184,12 +184,12 @@ When enabled, uses `io.Reader` interface for handling byte request bodies instea -Sets a custom `User-Agent` header template for requests sent by the generated SDK. Unlike the other Go options, this key is hyphenated. The template is resolved at generation time and supports the `{packageName}`, `{version}`, `{language}`, `{generatorVersion}`, `{organization}`, and `{apiName}` placeholders. +Sets a custom `User-Agent` header template for requests sent by the generated SDK. The template is resolved at generation time and supports the `{packageName}`, `{version}`, `{language}`, `{generatorVersion}`, `{organization}`, and `{apiName}` placeholders. ```yaml title="generators.yml" config: user-agent: "plantstore-go-sdk/{version}" ``` -This configuration sends `User-Agent: plantstore-go-sdk/0.1.0`. With [`includePlatformHeaders`](#includeplatformheaders) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: `User-Agent: plantstore-go-sdk/0.1.0 (linux; x86_64) Go/1.22.0`. A resolved value whose trailing segment isn't a version, such as `plantstore/sdk-go`, is used as-is and no version segment is added. An application's own token from [`allowUserAgentAppInfo`](#allowuseragentappinfo) is appended after the resolved value. +This sends `User-Agent: plantstore-go-sdk/0.1.0`. With [`includePlatformHeaders`](#includeplatformheaders) enabled, the resolved value leads the structured header: `User-Agent: plantstore-go-sdk/0.1.0 (linux; x86_64) Go/1.22.0`. A value that doesn't end in a version, such as `plantstore/sdk-go`, is used as-is. The [`allowUserAgentAppInfo`](#allowuseragentappinfo) token is appended after either form. \ No newline at end of file diff --git a/fern/products/sdks/generators/java/configuration.mdx b/fern/products/sdks/generators/java/configuration.mdx index 43a779b1bf..af9963dfaa 100644 --- a/fern/products/sdks/generators/java/configuration.mdx +++ b/fern/products/sdks/generators/java/configuration.mdx @@ -173,7 +173,7 @@ groups: With this configuration, an organization named `plantstore` with an API named `plants` generates an SDK that sends `User-Agent: plantstore-plants/0.1.0 (java)`. -With [`includePlatformHeaders`](#includeplatformheaders) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: a template of `plantstore-plants/{version}` sends `User-Agent: plantstore-plants/0.1.0 (linux; x86_64) Java/17.0.13`. A resolved value whose trailing segment isn't a version, such as `plantstore/sdk-java`, is used as-is and no version segment is added. An application's own token from [`allowUserAgentAppInfo`](#allowuseragentappinfo) is appended after the resolved value. +With [`includePlatformHeaders`](#includeplatformheaders) enabled, the resolved value leads the structured header: a template of `plantstore-plants/{version}` sends `User-Agent: plantstore-plants/0.1.0 (linux; x86_64) Java/17.0.13`. A value that doesn't end in a version, such as `plantstore/sdk-java`, is used as-is. The [`allowUserAgentAppInfo`](#allowuseragentappinfo) token is appended after either form. diff --git a/fern/products/sdks/generators/php/configuration.mdx b/fern/products/sdks/generators/php/configuration.mdx index 6fec23d9b5..f650d02229 100644 --- a/fern/products/sdks/generators/php/configuration.mdx +++ b/fern/products/sdks/generators/php/configuration.mdx @@ -87,12 +87,12 @@ Controls the access level of generated class properties. When set to 'public', p -Sets a custom `User-Agent` header template for requests sent by the generated SDK. Unlike the other PHP options, this key is hyphenated. The template is resolved at generation time and supports the `{packageName}`, `{version}`, `{language}`, `{generatorVersion}`, `{organization}`, and `{apiName}` placeholders. +Sets a custom `User-Agent` header template for requests sent by the generated SDK. The template is resolved at generation time and supports the `{packageName}`, `{version}`, `{language}`, `{generatorVersion}`, `{organization}`, and `{apiName}` placeholders. ```yaml title="generators.yml" config: user-agent: "plantstore-php-sdk/{version}" ``` -This configuration sends `User-Agent: plantstore-php-sdk/0.1.0`. With [`includePlatformHeaders`](#includeplatformheaders) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: `User-Agent: plantstore-php-sdk/0.1.0 (linux; x86_64) PHP/8.2.0`. A resolved value whose trailing segment isn't a version, such as `plantstore/sdk-php`, is used as-is and no version segment is added. An application's own token from [`allowUserAgentAppInfo`](#allowuseragentappinfo) is appended after the resolved value. +This sends `User-Agent: plantstore-php-sdk/0.1.0`. With [`includePlatformHeaders`](#includeplatformheaders) enabled, the resolved value leads the structured header: `User-Agent: plantstore-php-sdk/0.1.0 (linux; x86_64) PHP/8.2.0`. A value that doesn't end in a version, such as `plantstore/sdk-php`, is used as-is. The [`allowUserAgentAppInfo`](#allowuseragentappinfo) token is appended after either form. diff --git a/fern/products/sdks/generators/python/configuration.mdx b/fern/products/sdks/generators/python/configuration.mdx index 3a14244a0b..afcab82c9d 100644 --- a/fern/products/sdks/generators/python/configuration.mdx +++ b/fern/products/sdks/generators/python/configuration.mdx @@ -239,14 +239,14 @@ When enabled, skips code formatting (like black) on the generated Python code. -Sets a custom `User-Agent` header template for requests sent by the generated SDK. Unlike the other Python options, this key is hyphenated. The template is resolved at generation time and supports the `{packageName}`, `{version}`, `{language}`, `{generatorVersion}`, `{organization}`, and `{apiName}` placeholders. +Sets a custom `User-Agent` header template for requests sent by the generated SDK. The template is resolved at generation time and supports the `{packageName}`, `{version}`, `{language}`, `{generatorVersion}`, `{organization}`, and `{apiName}` placeholders. ```yaml title="generators.yml" config: user-agent: "plantstore-python-sdk/{version}" ``` -This configuration sends `User-Agent: plantstore-python-sdk/0.1.0`. With [`include_platform_headers`](#include_platform_headers) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: `User-Agent: plantstore-python-sdk/0.1.0 (linux; x86_64) Python/3.11.0`. A resolved value whose trailing segment isn't a version, such as `plantstore/sdk-python`, is used as-is and no version segment is added. An application's own token from [`allow_user_agent_app_info`](#allow_user_agent_app_info) is appended after the resolved value, and [`runtime_version`](#runtime_version) replaces the resolved value's trailing version segment at runtime. +This sends `User-Agent: plantstore-python-sdk/0.1.0`. With [`include_platform_headers`](#include_platform_headers) enabled, the resolved value leads the structured header: `User-Agent: plantstore-python-sdk/0.1.0 (linux; x86_64) Python/3.11.0`. A value that doesn't end in a version, such as `plantstore/sdk-python`, is used as-is. The [`allow_user_agent_app_info`](#allow_user_agent_app_info) token is appended after either form, and [`runtime_version`](#runtime_version) replaces the trailing version segment at runtime. diff --git a/fern/products/sdks/generators/ruby/configuration.mdx b/fern/products/sdks/generators/ruby/configuration.mdx index ec6526e106..887bae0e69 100644 --- a/fern/products/sdks/generators/ruby/configuration.mdx +++ b/fern/products/sdks/generators/ruby/configuration.mdx @@ -129,12 +129,12 @@ This will load `lib//custom_integration.rb` and `lib//sentry_integrati -Sets a custom `User-Agent` header template for requests sent by the generated SDK. Unlike the other Ruby options, this key is hyphenated. The template is resolved at generation time and supports the `{packageName}`, `{version}`, `{language}`, `{generatorVersion}`, `{organization}`, and `{apiName}` placeholders. +Sets a custom `User-Agent` header template for requests sent by the generated SDK. The template is resolved at generation time and supports the `{packageName}`, `{version}`, `{language}`, `{generatorVersion}`, `{organization}`, and `{apiName}` placeholders. ```yaml title="generators.yml" config: user-agent: "plantstore-ruby-sdk/{version}" ``` -This configuration sends `User-Agent: plantstore-ruby-sdk/0.1.0`. With [`includePlatformHeaders`](#includeplatformheaders) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: `User-Agent: plantstore-ruby-sdk/0.1.0 (linux; x86_64) Ruby/3.2.0`. A resolved value whose trailing segment isn't a version, such as `plantstore/sdk-ruby`, is used as-is and no version segment is added. An application's own token from [`allowUserAgentAppInfo`](#allowuseragentappinfo) is appended after the resolved value. +This sends `User-Agent: plantstore-ruby-sdk/0.1.0`. With [`includePlatformHeaders`](#includeplatformheaders) enabled, the resolved value leads the structured header: `User-Agent: plantstore-ruby-sdk/0.1.0 (linux; x86_64) Ruby/3.2.0`. A value that doesn't end in a version, such as `plantstore/sdk-ruby`, is used as-is. The [`allowUserAgentAppInfo`](#allowuseragentappinfo) token is appended after either form. diff --git a/fern/products/sdks/generators/typescript/configuration.mdx b/fern/products/sdks/generators/typescript/configuration.mdx index a7fd951138..a251fccf36 100644 --- a/fern/products/sdks/generators/typescript/configuration.mdx +++ b/fern/products/sdks/generators/typescript/configuration.mdx @@ -552,14 +552,14 @@ The default is `web`. -Sets a custom `User-Agent` header template for requests sent by the generated SDK. Unlike the other TypeScript options, this key is hyphenated. The template is resolved at generation time and supports the `{packageName}`, `{version}`, `{language}`, `{generatorVersion}`, `{organization}`, and `{apiName}` placeholders. +Sets a custom `User-Agent` header template for requests sent by the generated SDK. The template is resolved at generation time and supports the `{packageName}`, `{version}`, `{language}`, `{generatorVersion}`, `{organization}`, and `{apiName}` placeholders. ```yaml title="generators.yml" config: user-agent: "plantstore-node-sdk/{version}" ``` -This configuration sends `User-Agent: plantstore-node-sdk/0.1.0`. With [`includePlatformHeaders`](#includeplatformheaders) enabled, the resolved template becomes the product token of the structured header, followed by the platform and runtime segments: `User-Agent: plantstore-node-sdk/0.1.0 (linux; x86_64) Node/20.11.0`. A resolved value whose trailing segment isn't a version, such as `@plantstore/sdk`, is used as-is and no version segment is added. An application's own token from [`allowUserAgentAppInfo`](#allowuseragentappinfo) is appended after the resolved value. +This sends `User-Agent: plantstore-node-sdk/0.1.0`. With [`includePlatformHeaders`](#includeplatformheaders) enabled, the resolved value leads the structured header: `User-Agent: plantstore-node-sdk/0.1.0 (linux; x86_64) Node/20.11.0`. A value that doesn't end in a version, such as `@plantstore/sdk`, is used as-is. The [`allowUserAgentAppInfo`](#allowuseragentappinfo) token is appended after either form. From 69006b42e2620a5e8c16ec30117e83d79866d951 Mon Sep 17 00:00:00 2001 From: "devin.logan" Date: Wed, 12 Aug 2026 21:09:56 +0000 Subject: [PATCH 5/5] docs: drop user-agent note from generators.yml reference Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- fern/products/sdks/reference/generators-yml-reference.mdx | 2 -- 1 file changed, 2 deletions(-) diff --git a/fern/products/sdks/reference/generators-yml-reference.mdx b/fern/products/sdks/reference/generators-yml-reference.mdx index 1c8a34f1ec..5692567e02 100644 --- a/fern/products/sdks/reference/generators-yml-reference.mdx +++ b/fern/products/sdks/reference/generators-yml-reference.mdx @@ -663,8 +663,6 @@ groups: noSerdeLayer: false ``` -Most keys are specific to one generator, but `user-agent` is resolved by the CLI, so it behaves identically in every generator's `config`: it sets a [`User-Agent` header template](/learn/sdks/generators/typescript/configuration#user-agent) interpolated at generation time, defaulting to `{packageName}/{version}`. The TypeScript, Python, Go, Java, .NET, PHP, and Ruby generators send the resolved value; the Rust and Swift generators ignore it. - } href="/learn/sdks/generators/typescript/configuration">