Skip to content

Commit 0c4d7e6

Browse files
Fix SDK config docs: correct field names, defaults, and add missing flags (#5208)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent dcb9f90 commit 0c4d7e6

9 files changed

Lines changed: 114 additions & 16 deletions

File tree

fern/products/sdks/generators/csharp/configuration.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,25 @@ When enabled, includes built-in exception handling utilities in the generated SD
6464
When enabled, path parameters are included as properties in the request object instead of being passed as separate method parameters. This creates a more unified request structure where all parameters are grouped together.
6565
</ParamField>
6666
67+
<ParamField path="maxRetries" type="number" required={false} toc={true}>
68+
The default number of retries for failed requests. When not set, the generated SDK uses its own built-in default. SDK users can still override this per-request via request options.
69+
</ParamField>
70+
6771
<ParamField path="namespace" type="string" required={false} toc={true}>
6872
Specifies the root namespace for all generated .NET code. This determines the namespace hierarchy that users will import when using the SDK.
6973
</ParamField>
7074
75+
<ParamField path="offset-semantics" type="'item-index' | 'page-index'" required={false} toc={true}>
76+
Controls how the offset parameter is interpreted for [auto-paginated](/learn/sdks/deep-dives/auto-pagination) endpoints.
77+
78+
* `item-index`: The offset counts individual items (e.g., offset 20 skips the first 20 items).
79+
* `page-index`: The offset counts pages (e.g., offset 3 skips to page 3).
80+
</ParamField>
81+
82+
<ParamField path="omit-fern-headers" type="boolean" default="false" required={false} toc={true}>
83+
When enabled, the generated SDK omits the `X-Fern-Language`, `X-Fern-SDK-Name`, and `X-Fern-SDK-Version` headers from HTTP requests.
84+
</ParamField>
85+
7186
<ParamField path="package-id" type="string" required={false} toc={true}>
7287
Sets the NuGet package identifier for the generated SDK. This is used when publishing the SDK to NuGet or other package repositories.
7388
</ParamField>

fern/products/sdks/generators/go/configuration.mdx

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ groups:
1919
path: ../generated/go
2020
```
2121
22-
<ParamField path="alwaysSendRequiredProperties" type="boolean" required={false} toc={true}>
22+
<ParamField path="alwaysSendRequiredProperties" type="boolean" default="true" required={false} toc={true}>
2323
When enabled, ensures that all required properties are always included in API requests, even if they have default values or are otherwise optional in the implementation.
2424
</ParamField>
2525
@@ -35,7 +35,22 @@ Specifies the name of the generated client struct. This determines the primary c
3535
Sets the name of the exported client that will be used in code snippets and documentation examples. This is useful for customizing how the client appears in generated documentation.
3636
</ParamField>
3737
38-
<ParamField path="enableWireTests" type="string" default="true" required={false} toc={true}>
38+
<ParamField path="maxRetries" type="number" required={false} toc={true}>
39+
The default number of retries for failed requests. When not set, the generated SDK uses its own built-in default. SDK users can still override this per-request via request options.
40+
</ParamField>
41+
42+
<ParamField path="offsetSemantics" type="'item-index' | 'page-index'" required={false} toc={true}>
43+
Controls how the offset parameter is interpreted for [auto-paginated](/learn/sdks/deep-dives/auto-pagination) endpoints.
44+
45+
* `item-index`: The offset counts individual items (e.g., offset 20 skips the first 20 items).
46+
* `page-index`: The offset counts pages (e.g., offset 3 skips to page 3).
47+
</ParamField>
48+
49+
<ParamField path="omitFernHeaders" type="boolean" default="false" required={false} toc={true}>
50+
When enabled, the generated SDK omits the `X-Fern-Language`, `X-Fern-SDK-Name`, and `X-Fern-SDK-Version` headers from HTTP requests.
51+
</ParamField>
52+
53+
<ParamField path="enableWireTests" type="boolean" default="true" required={false} toc={true}>
3954
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.
4055
</ParamField>
4156

@@ -69,11 +84,11 @@ with the relevant elements in your `go.mod` path. In this case, the generated Go
6984
When enabled, includes legacy client options for backward compatibility with older versions of the SDK. This is useful for maintaining compatibility when upgrading SDK versions.
7085
</ParamField>
7186

72-
<ParamField path="inlineFileProperties" type="boolean" required={false} toc={true}>
87+
<ParamField path="inlineFileProperties" type="boolean" default="true" required={false} toc={true}>
7388
Controls whether file upload properties are generated as inline request properties instead of separate parameters. When enabled, file upload fields become part of the request struct rather than being passed as individual function parameters.
7489
</ParamField>
7590

76-
<ParamField path="inlinePathParameters" type="boolean" required={false} toc={true}>
91+
<ParamField path="inlinePathParameters" type="boolean" default="true" required={false} toc={true}>
7792
When enabled, path parameters are inlined into request types rather than being passed as separate function parameters. This creates a more unified request structure where path parameters are included in the request object.
7893
</ParamField>
7994

@@ -135,18 +150,14 @@ replace "github.com/your/sdk" v0.0.0 => "path/to/generated/sdk"
135150

136151
</ParamField>
137152

138-
<ParamField path="packageLayout" type="'flat' | 'nested'" required={false} toc={true}>
139-
Controls the organization of the generated package structure. Choose 'flat' for a flatter package structure with fewer nested directories, or 'nested' for a more hierarchical organization that mirrors your API structure.
140-
</ParamField>
141-
142153
<ParamField path="packageName" type="string" required={false} toc={true}>
143154
Specifies the package name for the generated Go code. This determines the package declaration that will appear at the top of generated Go files and affects how users import the SDK.
144155
</ParamField>
145156

146-
<ParamField path="union" type="'v0' | 'v1'" required={false} toc={true}>
157+
<ParamField path="union" type="'v0' | 'v1'" default="v1" required={false} toc={true}>
147158
Controls the union type generation strategy. Use 'v0' for the legacy union implementation or 'v1' for the newer, more robust union handling approach that provides better type safety and discriminated union support.
148159
</ParamField>
149160

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

fern/products/sdks/generators/java/configuration.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,21 @@ When enabled, path parameters are included as properties in the request object i
9090
Controls Jackson's JSON serialization behavior for optional fields. Use 'non-empty' to exclude null and empty values, or 'non-absent' to only exclude null values while preserving empty collections and strings.
9191
</ParamField>
9292

93+
<ParamField path="maxRetries" type="number" required={false} toc={true}>
94+
The default number of retries for failed requests. When not set, the generated SDK uses its own built-in default. SDK users can still override this per-request via request options.
95+
</ParamField>
96+
97+
<ParamField path="offset-semantics" type="'item-index' | 'page-index'" required={false} toc={true}>
98+
Controls how the offset parameter is interpreted for [auto-paginated](/learn/sdks/deep-dives/auto-pagination) endpoints.
99+
100+
* `item-index`: The offset counts individual items (e.g., offset 20 skips the first 20 items).
101+
* `page-index`: The offset counts pages (e.g., offset 3 skips to page 3).
102+
</ParamField>
103+
104+
<ParamField path="omit-fern-headers" type="boolean" default="false" required={false} toc={true}>
105+
When enabled, the generated SDK omits the `X-Fern-Language`, `X-Fern-SDK-Name`, and `X-Fern-SDK-Version` headers from HTTP requests.
106+
</ParamField>
107+
93108
<ParamField path="package-layout" type="'nested' | 'flat'" default="nested" required={false} toc={true}>
94109
Determines the organization of generated Java packages. Choose 'nested' for a hierarchical package structure that mirrors your API organization, or 'flat' for a simpler structure with fewer nested packages.
95110
</ParamField>

fern/products/sdks/generators/php/configuration.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,25 @@ When enabled, generates [mock server (wire) tests](/sdks/deep-dives/testing#mock
3434
When enabled, path parameters are included as properties in the request class instead of being passed as separate method parameters. This creates a more unified request structure where all parameters are grouped together in the request object.
3535
</ParamField>
3636

37+
<ParamField path="maxRetries" type="number" required={false} toc={true}>
38+
The default number of retries for failed requests. When not set, the generated SDK uses its own built-in default. SDK users can still override this per-request via request options.
39+
</ParamField>
40+
3741
<ParamField path="namespace" type="string" required={false} toc={true}>
3842
Specifies the PHP namespace for all generated code. This determines the namespace hierarchy that users will use when importing and using the SDK classes.
3943
</ParamField>
4044

45+
<ParamField path="offsetSemantics" type="'item-index' | 'page-index'" required={false} toc={true}>
46+
Controls how the offset parameter is interpreted for [auto-paginated](/learn/sdks/deep-dives/auto-pagination) endpoints.
47+
48+
* `item-index`: The offset counts individual items (e.g., offset 20 skips the first 20 items).
49+
* `page-index`: The offset counts pages (e.g., offset 3 skips to page 3).
50+
</ParamField>
51+
52+
<ParamField path="omitFernHeaders" type="boolean" default="false" required={false} toc={true}>
53+
When enabled, the generated SDK omits the `X-Fern-Language`, `X-Fern-SDK-Name`, and `X-Fern-SDK-Version` headers from HTTP requests.
54+
</ParamField>
55+
4156
<ParamField path="packageName" type="string" required={false} toc={true}>
4257
Sets the name of the PHP package as it will appear in Composer and Packagist. This is the name users will use to install the SDK via Composer (e.g., `composer require your/package-name`).
4358
</ParamField>

fern/products/sdks/generators/python/configuration.mdx

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ The name of the generated client class. Must be PascalCase. For example, setting
6161
The chunk size to use (if any) when processing a response bytes stream within `iter_bytes` or `aiter_bytes` results in: `for chunk in response.iter_bytes(chunk_size=<default_bytes_stream_chunk_size>):`
6262
</ParamField>
6363

64+
<ParamField path="default_max_retries" type="number" default="2" required={false} toc={true}>
65+
The default number of retries for failed requests in the generated SDK. Set to `0` to disable retries by default. SDK users can still override this per-request via request options.
66+
</ParamField>
67+
6468
<ParamField path="enable_wire_tests" type="bool" default="false" required={false} toc={true}>
6569
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.
6670
</ParamField>
@@ -145,7 +149,7 @@ When enabled, generates utility methods for working with union types, including
145149
Feature flag that removes the usage of request objects, and instead uses parameters in function signatures where possible.
146150
</ParamField>
147151

148-
<ParamField path="lazy_import" type="bool" default="true" required={false} toc={true}>
152+
<ParamField path="lazy_imports" type="bool" default="true" required={false} toc={true}>
149153
Enables lazy loading of client imports. When enabled, modules and classes are imported only when first accessed rather than at package initialization. This reduces memory footprint when using a small portion of a large API, at the cost of a latency penalty when first accessing a client.
150154

151155
Set to `false` to restore eager loading behavior.
@@ -161,7 +165,18 @@ For example, setting `package_name: "my_custom_package"` enables users to use
161165

162166
</ParamField>
163167

164-
<ParamField path="pyproject_python_version" type="string" default="^3.8" required={false} toc={true}>
168+
<ParamField path="offset_semantics" type="'item-index' | 'page-index'" default="item-index" required={false} toc={true}>
169+
Controls how the offset parameter is interpreted for [auto-paginated](/learn/sdks/deep-dives/auto-pagination) endpoints.
170+
171+
* `item-index`: The offset counts individual items (e.g., offset 20 skips the first 20 items).
172+
* `page-index`: The offset counts pages (e.g., offset 3 skips to page 3).
173+
</ParamField>
174+
175+
<ParamField path="omit_fern_headers" type="bool" default="false" required={false} toc={true}>
176+
When enabled, the generated SDK omits the `X-Fern-Language`, `X-Fern-SDK-Name`, and `X-Fern-SDK-Version` headers from HTTP requests.
177+
</ParamField>
178+
179+
<ParamField path="pyproject_python_version" type="string" default="^3.10" required={false} toc={true}>
165180
<Warning>This changes your declared python dependency, which is not meant to be done often if at all. This is a last resort if any dependencies force you to change your version requirements.</Warning>
166181
</ParamField>
167182

fern/products/sdks/generators/ruby/configuration.mdx

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ groups:
1313
- name: fernapi/fern-ruby-sdk
1414
version: <Markdown src="/snippets/version-number-ruby.mdx"/>
1515
config:
16-
module: YourModuleName
16+
moduleName: YourModuleName
1717
enableWireTests: true
1818
extraDependencies:
1919
faraday: "~> 2.0"
@@ -62,12 +62,16 @@ Specify additional dependencies to include in the generated SDK's gemspec. This
6262
Specify additional development dependencies to include in the generated SDK's Gemfile. These are dependencies used for development and testing but not required by end users.
6363
</ParamField>
6464

65-
<ParamField path="module" type="string" required={false} toc={true}>
65+
<ParamField path="maxRetries" type="number" required={false} toc={true}>
66+
The default number of retries for failed requests. When not set, the generated SDK uses its own built-in default. SDK users can still override this per-request via request options.
67+
</ParamField>
68+
69+
<ParamField path="moduleName" type="string" required={false} toc={true}>
6670
Custom module name for the generated SDK. This sets the top-level Ruby module that wraps all generated code. By default, the module name is derived from the package name in your publish configuration or your organization name.
6771

6872
```yaml
6973
config:
70-
module: MyCustomModule
74+
moduleName: MyCustomModule
7175
```
7276

7377
This generates code like:
@@ -81,6 +85,17 @@ end
8185
```
8286
</ParamField>
8387

88+
<ParamField path="offsetSemantics" type="'item-index' | 'page-index'" required={false} toc={true}>
89+
Controls how the offset parameter is interpreted for [auto-paginated](/learn/sdks/deep-dives/auto-pagination) endpoints.
90+
91+
* `item-index`: The offset counts individual items (e.g., offset 20 skips the first 20 items).
92+
* `page-index`: The offset counts pages (e.g., offset 3 skips to page 3).
93+
</ParamField>
94+
95+
<ParamField path="omitFernHeaders" type="boolean" default="false" required={false} toc={true}>
96+
When enabled, the generated SDK omits the `X-Fern-Language`, `X-Fern-SDK-Name`, and `X-Fern-SDK-Version` headers from HTTP requests.
97+
</ParamField>
98+
8499
<ParamField path="requirePaths" type="array of strings" required={false} toc={true}>
85100
<Markdown src="/snippets/pro-plan.mdx"/>
86101

fern/products/sdks/generators/rust/configuration.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ When enabled, generates [mock server (wire) tests](/learn/sdks/deep-dives/testin
5858
When enabled, generates code examples in the README and reference documentation.
5959
</ParamField>
6060

61+
<ParamField path="maxRetries" type="number" required={false} toc={true}>
62+
The default number of retries for failed requests. When not set, the generated SDK defaults to 3 retries. SDK users can still override this per-request via request options.
63+
</ParamField>
64+
6165
### Package metadata
6266

6367
Configure metadata for publishing to crates.io:

fern/products/sdks/generators/swift/configuration.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ The name of the generated environment enum. This allows you to customize the enu
3232
The module name used in client code (e.g., `import MyCustomModule`). When provided, this name is used consistently across the library, product, and target.
3333
</ParamField>
3434

35+
<ParamField path="maxRetries" type="number" required={false} toc={true}>
36+
The default number of retries for failed requests. When not set, the generated SDK uses its own built-in default. SDK users can still override this per-request via request options.
37+
</ParamField>
38+
3539
<ParamField path="enableWireTests" type="boolean" default="true" required={false} toc={true}>
3640
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.
3741
</ParamField>

fern/products/sdks/generators/typescript/configuration.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ Choose whether you want to support Node.js 16 and above (`Node16`), or Node.js 1
168168
* `Node18` uses the native FormData API, and accepts a wider range of types for file uploads, such as `Buffer`, `File`, `Blob`, `Readable`, `ReadableStream`, `ArrayBuffer`, and `Uint8Array`
169169
</ParamField>
170170

171-
<ParamField path="generateSubpackageExports" type="boolean" default="false" toc={true}>
171+
<ParamField path="generateSubpackageExports" type="boolean" default="true" toc={true}>
172172
Generates subpackage exports that allow users to import individual clients directly, rather than importing the entire SDK. This enables JavaScript bundlers to tree-shake unused code, significantly reducing bundle sizes.
173173

174174
```typescript
@@ -296,6 +296,10 @@ import { AcmePayments, AcmePaymentsClient } from "@acme/node";
296296

297297
</ParamField>
298298

299+
<ParamField path="maxRetries" type="number" required={false} toc={true}>
300+
The default number of retries for failed requests. When not set, the generated SDK uses its own built-in default. SDK users can still override this per-request via request options.
301+
</ParamField>
302+
299303
<ParamField path="naming" type="string | object" toc={true}>
300304
Customize the namespace export and class/type names. Accepts a string shorthand or a full object.
301305

0 commit comments

Comments
 (0)