Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion fern/products/sdks/generators/csharp/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ When enabled, the generated SDK omits the `X-Fern-Language`, `X-Fern-SDK-Name`,
</ParamField>

<ParamField path="include-platform-headers" type="boolean" default="false" required={false} toc={true}>
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.
</ParamField>

<ParamField path="allow-user-agent-app-info" type="boolean" default="false" required={false} toc={true}>
Expand Down Expand Up @@ -131,3 +131,14 @@ When enabled, places core SDK classes (like base client classes and utilities) i
<ParamField path="use-discriminated-unions" type="boolean" required={false} toc={true}>
When enabled, generates discriminated union types for API responses that can contain multiple different object types. This provides type-safe handling of polymorphic responses.
</ParamField>

<ParamField path="user-agent" type="string" default="{packageName}/{version}" required={false} toc={true}>
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 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.
</ParamField>
13 changes: 12 additions & 1 deletion fern/products/sdks/generators/go/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ When enabled, the generated SDK omits the `X-Fern-Language`, `X-Fern-SDK-Name`,
</ParamField>

<ParamField path="includePlatformHeaders" type="boolean" default="false" required={false} toc={true}>
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.
</ParamField>

<ParamField path="allowUserAgentAppInfo" type="boolean" default="false" required={false} toc={true}>
Expand Down Expand Up @@ -181,4 +181,15 @@ Controls the union type generation strategy. Use 'v0' for the legacy union imple

<ParamField path="useReaderForBytesRequest" type="boolean" default="true" required={false} toc={true}>
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.
</ParamField>

<ParamField path="user-agent" type="string" default="{packageName}/{version}" required={false} toc={true}>
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 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.
</ParamField>
4 changes: 3 additions & 1 deletion fern/products/sdks/generators/java/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ When enabled, the generated SDK omits the `X-Fern-Language`, `X-Fern-SDK-Name`,
</ParamField>

<ParamField path="includePlatformHeaders" type="boolean" default="false" required={false} toc={true}>
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.
</ParamField>

<ParamField path="allowUserAgentAppInfo" type="boolean" default="false" required={false} toc={true}>
Expand Down Expand Up @@ -172,6 +172,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 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.
</ParamField>

<ParamField path="wrapped-aliases" type="boolean" default="false" required={false} toc={true}>
Expand Down
13 changes: 12 additions & 1 deletion fern/products/sdks/generators/php/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ When enabled, the generated SDK omits the `X-Fern-Language`, `X-Fern-SDK-Name`,
</ParamField>

<ParamField path="includePlatformHeaders" type="boolean" default="false" required={false} toc={true}>
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.
</ParamField>

<ParamField path="allowUserAgentAppInfo" type="boolean" default="false" required={false} toc={true}>
Expand All @@ -85,3 +85,14 @@ Specifies the directory path where the generated SDK source files should be plac
<ParamField path="propertyAccess" type="'public' | 'private'" required={false} toc={true}>
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.
</ParamField>

<ParamField path="user-agent" type="string" default="{packageName}/{version}" required={false} toc={true}>
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 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.
</ParamField>
13 changes: 12 additions & 1 deletion fern/products/sdks/generators/python/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ When enabled, the generated SDK omits the `X-Fern-Language`, `X-Fern-SDK-Name`,
</ParamField>

<ParamField path="include_platform_headers" type="bool" default="false" required={false} toc={true}>
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.
</ParamField>

<ParamField path="allow_user_agent_app_info" type="bool" default="false" required={false} toc={true}>
Expand Down Expand Up @@ -238,6 +238,17 @@ When enabled, skips code formatting (like black) on the generated Python code.
Sets the client timeout in seconds, or `infinity` to disable timeouts.
</ParamField>

<ParamField path="user-agent" type="string" default="{packageName}/{version}" required={false} toc={true}>
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 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.
</ParamField>

<ParamField path="use_api_name_in_package" type="bool" default="false" required={false} toc={true}>
When enabled, includes the API name as part of the package structure and naming.
</ParamField>
Expand Down
13 changes: 12 additions & 1 deletion fern/products/sdks/generators/ruby/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ When enabled, the generated SDK omits the `X-Fern-Language`, `X-Fern-SDK-Name`,
</ParamField>

<ParamField path="includePlatformHeaders" type="boolean" default="false" required={false} toc={true}>
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.
</ParamField>

<ParamField path="allowUserAgentAppInfo" type="boolean" default="false" required={false} toc={true}>
Expand All @@ -127,3 +127,14 @@ config:

This will load `lib/<gem>/custom_integration.rb` and `lib/<gem>/sentry_integration.rb` when the gem is required.
</ParamField>

<ParamField path="user-agent" type="string" default="{packageName}/{version}" required={false} toc={true}>
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 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.
</ParamField>
13 changes: 12 additions & 1 deletion fern/products/sdks/generators/typescript/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ When enabled, the generated SDK omits the `X-Fern-Language`, `X-Fern-SDK-Name`,
</ParamField>

<ParamField path="includePlatformHeaders" type="boolean" default="false" toc={true}>
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.
</ParamField>

<ParamField path="allowUserAgentAppInfo" type="boolean" default="false" toc={true}>
Expand Down Expand Up @@ -551,6 +551,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).
</ParamField>

<ParamField path="user-agent" type="string" default="{packageName}/{version}" required={false} toc={true}>
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 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.
</ParamField>

<ParamField path="useBigInt" type="boolean" default="false" toc={true}>
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.

Expand Down
Loading