Skip to content

Commit d33abf1

Browse files
authored
Fill out config option descriptions for Go, Java, .NET, and PHP (SDKs) (#530)
1 parent 2cb94a1 commit d33abf1

File tree

7 files changed

+60
-8
lines changed

7 files changed

+60
-8
lines changed

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

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Configuration options for the Fern .NET SDK.
55

66
You can customize the behavior of the C#/.NET SDK generator in `generators.yml`:
77

8-
```yml {7-8}
8+
```yml {7-8} title="generators.yml"
99
default-group: local
1010
groups:
1111
local:
@@ -19,58 +19,77 @@ groups:
1919
## SDK configuration options
2020
2121
<ParamField path="additional-properties" type="boolean" required={false} toc={true}>
22+
When enabled, allows handling of additional properties not explicitly defined in the API specification. This provides flexibility for APIs that may include extra fields in responses.
2223
</ParamField>
2324
2425
<ParamField path="base-api-exception-class-name" type="string" required={false} toc={true}>
26+
Customizes the name of the base API exception class that all API-specific exceptions will inherit from. This allows you to define a custom base exception class name for better integration with your existing error handling patterns.
2527
</ParamField>
2628
2729
<ParamField path="base-exception-class-name" type="string" required={false} toc={true}>
30+
Specifies the name of the base exception class that all generated exceptions will inherit from. This provides a common parent class for all SDK exceptions, enabling consistent exception handling patterns.
2831
</ParamField>
2932
3033
<ParamField path="client-class-name" type="string" required={false} toc={true}>
34+
Sets the name of the generated API client class. This determines the primary client type name that users will interact with in the generated .NET SDK.
3135
</ParamField>
3236
3337
<ParamField path="custom-pager-name" type="string" required={false} toc={true}>
38+
Customizes the name of the pagination helper class used for handling paginated API responses. This allows you to specify a custom name that fits your naming conventions.
3439
</ParamField>
3540
3641
<ParamField path="enable-forward-compatible-enums" type="boolean" required={false} toc={true}>
42+
When enabled, generates enum types that can handle unknown values gracefully. This allows the SDK to process new enum values that may be added to the API without breaking existing client code, improving forward compatibility.
3743
</ParamField>
3844
3945
<ParamField path="environment-class-name" type="string" required={false} toc={true}>
46+
Specifies the name of the environment configuration class used for managing different API environments (e.g., development, staging, production).
4047
</ParamField>
4148
4249
<ParamField path="explicit-namespaces" type="boolean" required={false} toc={true}>
50+
When enabled, generates code with explicit namespace declarations throughout the SDK. This can help avoid naming conflicts and improve code clarity in larger projects.
4351
</ParamField>
4452
4553
<ParamField path="exported-client-class-name" type="string" required={false} toc={true}>
54+
Sets the name of the exported client class that will be used in code examples and documentation. This is useful for customizing how the client appears in generated documentation.
4655
</ParamField>
4756
4857
<ParamField path="generate-error-types" type="boolean" required={false} toc={true}>
58+
When enabled, generates specific error type classes for different API errors. This provides strongly-typed error handling instead of using generic exception types.
4959
</ParamField>
5060
5161
<ParamField path="generate-mock-server-tests" type="boolean" required={false} toc={true}>
62+
When enabled, generates mock server tests alongside the SDK code. This helps with testing and validation of the SDK functionality during development.
5263
</ParamField>
5364
5465
<ParamField path="include-exception-handler" type="boolean" required={false} toc={true}>
66+
When enabled, includes built-in exception handling utilities in the generated SDK. This provides convenience methods for common error handling scenarios.
5567
</ParamField>
5668
5769
<ParamField path="inline-path-parameters" type="boolean" required={false} toc={true}>
70+
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.
5871
</ParamField>
5972
6073
<ParamField path="namespace" type="string" required={false} toc={true}>
74+
Specifies the root namespace for all generated .NET code. This determines the namespace hierarchy that users will import when using the SDK.
6175
</ParamField>
6276
6377
<ParamField path="package-id" type="string" required={false} toc={true}>
78+
Sets the NuGet package identifier for the generated SDK. This is used when publishing the SDK to NuGet or other package repositories.
6479
</ParamField>
6580
6681
<ParamField path="read-only-memory-types" type="List<string>" required={false} toc={true}>
82+
Specifies a list of types that should be generated using ReadOnlyMemory&lt;T&gt; instead of regular arrays or collections. This can improve performance for large data transfers by reducing memory allocations.
6783
</ParamField>
6884
6985
<ParamField path="root-client-class-access" type="'public' | 'internal'" required={false} toc={true}>
86+
Controls the access modifier for the root client class. Use 'public' to make the client accessible from other assemblies, or 'internal' to restrict access within the same assembly.
7087
</ParamField>
7188
7289
<ParamField path="root-namespace-for-core-classes" type="boolean" required={false} toc={true}>
90+
When enabled, places core SDK classes (like base client classes and utilities) in the root namespace instead of nested namespaces. This can simplify imports for commonly used types.
7391
</ParamField>
7492
7593
<ParamField path="use-discriminated-unions" type="boolean" required={false} toc={true}>
94+
When enabled, generates discriminated union types for API responses that can contain multiple different object types. This provides type-safe handling of polymorphic responses.
7695
</ParamField>

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Configuration options for the Fern Go SDK.
55

66
You can customize the behavior of the Go SDK generator in `generators.yml`:
77

8-
```yaml {7-8}
8+
```yaml {7-8} title="generators.yml"
99
default-group: local
1010
groups:
1111
local:
@@ -22,15 +22,19 @@ groups:
2222
## SDK Configuration Options
2323
2424
<ParamField path="alwaysSendRequiredProperties" type="boolean" required={false} toc={true}>
25+
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.
2526
</ParamField>
2627
2728
<ParamField path="clientConstructorName" type="string" required={false} toc={true}>
29+
Customizes the name of the client constructor function. This allows you to specify a custom name for the function that users will call to create a new instance of the client.
2830
</ParamField>
2931
3032
<ParamField path="clientName" type="string" required={false} toc={true}>
33+
Specifies the name of the generated client struct. This determines the primary client type name that users will interact with in the generated Go SDK.
3134
</ParamField>
3235
3336
<ParamField path="exportedClientName" type="string" required={false} toc={true}>
37+
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.
3438
</ParamField>
3539
3640
<ParamField path="importPath" type="string" required={false} toc={true}>
@@ -60,15 +64,18 @@ with the relevant elements in your `go.mod` path. In this case, the generated Go
6064
</ParamField>
6165

6266
<ParamField path="includeLegacyClientOptions" type="boolean" required={false} toc={true}>
67+
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.
6368
</ParamField>
6469

6570
<ParamField path="inlineFileProperties" type="boolean" required={false} toc={true}>
71+
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.
6672
</ParamField>
6773

6874
<ParamField path="inlinePathParameters" type="boolean" required={false} toc={true}>
75+
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.
6976
</ParamField>
7077

71-
<ParamField path="module" type="ModuleConfigSchema" required={false} toc={true}>
78+
<ParamField path="module" type="object" required={false} toc={true}>
7279
Use this option if you plan to distribute the generated Go SDK as a separate, published Go module.
7380

7481
<Note>If you only plan to use the generated SDK within your own Go module, use the `importPath` configuration option instead.</Note>
@@ -127,13 +134,17 @@ replace "github.com/your/sdk" v0.0.0 => "path/to/generated/sdk"
127134
</ParamField>
128135

129136
<ParamField path="packageLayout" type="'flat' | 'nested'" required={false} toc={true}>
137+
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.
130138
</ParamField>
131139

132140
<ParamField path="packageName" type="string" required={false} toc={true}>
141+
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.
133142
</ParamField>
134143

135144
<ParamField path="union" type="'v0' | 'v1'" required={false} toc={true}>
145+
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.
136146
</ParamField>
137147

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

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

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Configuration options for the Fern Java SDK.
44
---
55
You can customize the behavior of the Java SDK generator in `generators.yml`:
66

7-
```yaml {7-9}
7+
```yaml {7-9} title="generators.yml"
88
default-group: local
99
groups:
1010
local:
@@ -18,9 +18,11 @@ groups:
1818
## SDK Configuration Options
1919
2020
<ParamField path="base-api-exception-class-name" type="string" required={false} toc={true}>
21+
Customizes the name of the base API exception class that all API-specific exceptions will extend. This allows you to define a custom base exception class name for better integration with your existing error handling patterns.
2122
</ParamField>
2223
2324
<ParamField path="base-exception-class-name" type="string" required={false} toc={true}>
25+
Specifies the name of the base exception class that all generated exceptions will inherit from. This provides a common parent class for all SDK exceptions, enabling consistent exception handling patterns.
2426
</ParamField>
2527
2628
<ParamField path="client-class-name" type="string" default="<Organization>ApiClient" required={false} toc={true}>
@@ -42,6 +44,7 @@ Example:
4244
</ParamField>
4345
4446
<ParamField path="disable-required-property-builder-checks" type="boolean" default="false" required={false} toc={true}>
47+
When enabled, disables validation checks in builder patterns for required properties. This removes compile-time checks that ensure all required fields are set before building an object, providing more flexibility but less safety.
4548
</ParamField>
4649
4750
<ParamField path="enable-extensible-builders" type="boolean" default="false" required={false} toc={true}>
@@ -50,9 +53,11 @@ When enabled, generates extensible builder classes that support customization th
5053
</ParamField>
5154
5255
<ParamField path="enable-forward-compatible-enums" type="boolean" default="false" required={false} toc={true}>
56+
When enabled, generates enum classes that can handle unknown values gracefully. This allows the SDK to process new enum values that may be added to the API without breaking existing client code, improving forward compatibility.
5357
</ParamField>
5458
5559
<ParamField path="enable-inline-types" type="boolean" default="false" required={false} toc={true}>
60+
When enabled, generates inline types for nested schemas instead of creating separate classes. This results in cleaner type definitions where nested objects are defined within their parent types, reducing the number of generated files.
5661
</ParamField>
5762
5863
<ParamField path="enable-public-constructors" type="boolean" default="false" required={false} toc={true}>
@@ -61,18 +66,23 @@ When enabled, generates public constructors for model types.
6166
</ParamField>
6267
6368
<ParamField path="generate-unknown-as-json-node" type="boolean" default="false" required={false} toc={true}>
69+
When enabled, generates unknown or untyped properties as structured JSON objects instead of raw Object types. This provides better type safety and easier manipulation of dynamic JSON content while maintaining flexibility for unknown data structures.
6470
</ParamField>
6571
6672
<ParamField path="inline-file-properties" type="boolean" default="false" required={false} toc={true}>
73+
Controls whether file upload properties are generated as inline request properties instead of separate method parameters. When enabled, file fields become part of the request object rather than being passed as individual function arguments.
6774
</ParamField>
6875
6976
<ParamField path="inline-path-parameters" type="boolean" default="false" required={false} toc={true}>
77+
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.
7078
</ParamField>
7179
7280
<ParamField path="json-include" type="'non-empty' | 'non-absent'" default="non-absent" required={false} toc={true}>
81+
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.
7382
</ParamField>
7483
7584
<ParamField path="package-layout" type="'nested' | 'flat'" default="nested" required={false} toc={true}>
85+
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.
7686
</ParamField>
7787
7888
<ParamField path="package-prefix" type="string" required={false} toc={true}>
@@ -114,12 +124,17 @@ If you want to customize how your publishing metadata looks in your
114124
```
115125

116126
<ParamField path="author" type="string" required={false} toc={true}>
127+
Specifies the author name that will appear in the generated package metadata and build configuration files.
117128
</ParamField>
118129
<ParamField path="email" type="string" required={false} toc={true}>
130+
Sets the contact email address for the package author that will be included in the generated package metadata.
119131
</ParamField>
120132
<ParamField path="license" type="'MIT' | 'Apache-2.0' | { custom: 'Custom License Name' }" required={false} toc={true}>
133+
Defines the software license for the generated SDK. Choose from standard licenses like 'MIT' or 'Apache-2.0', or specify a custom license name.
121134
</ParamField>
122135
<ParamField path="package-description" type="string" required={false} toc={true}>
136+
Provides a description of the SDK package that will appear in package metadata and documentation. This helps users understand what the SDK is for and its purpose.
123137
</ParamField>
124138
<ParamField path="reference-url" type="string" required={false} toc={true}>
139+
Sets the reference URL (typically the API documentation or project website) that will be included in the package metadata for users to find additional information.
125140
</ParamField>

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Configuration options for the Fern PHP SDK.
55

66
You can customize the behavior of the PHP SDK generator in `generators.yml`:
77

8-
```yaml {7-8}
8+
```yaml {7-8} title="generators.yml"
99
default-group: local
1010
groups:
1111
local:
@@ -19,22 +19,29 @@ groups:
1919
## SDK Configuration Options
2020
2121
<ParamField path="clientName" type="string" required={false} toc={true}>
22+
Sets the name of the generated API client class. This determines the primary client type name that users will interact with in the generated PHP SDK.
2223
</ParamField>
2324
2425
<ParamField path="composerJson" type="Record<string, any>" required={false} toc={true}>
26+
Allows customization of the generated `composer.json` file contents. You can specify additional metadata, dependencies, or configuration that will be merged into the package's composer configuration file.
2527
</ParamField>
2628

2729
<ParamField path="inlinePathParameters" type="boolean" required={false} toc={true}>
30+
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.
2831
</ParamField>
2932

3033
<ParamField path="namespace" type="string" required={false} toc={true}>
34+
Specifies the PHP namespace for all generated code. This determines the namespace hierarchy that users will use when importing and using the SDK classes.
3135
</ParamField>
3236

3337
<ParamField path="packageName" type="string" required={false} toc={true}>
38+
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`).
3439
</ParamField>
3540

3641
<ParamField path="packagePath" type="string" required={false} toc={true}>
42+
Specifies the directory path where the generated SDK source files should be placed. This determines the file system location of the generated PHP code relative to the output directory.
3743
</ParamField>
3844

3945
<ParamField path="propertyAccess" type="'public' | 'private'" required={false} toc={true}>
46+
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.
4047
</ParamField>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Configuration options for the Fern Python SDK.
55

66
You can customize the behavior of the Python SDK generator in `generators.yml`:
77

8-
```yaml {7-16}
8+
```yaml {7-16} title="generators.yml"
99
default-group: local
1010
groups:
1111
local:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Configuration options for the Fern Ruby SDK.
55

66
You can customize the behavior of the Ruby SDK generator in `generators.yml`:
77

8-
```yaml {7-8}
8+
```yaml {7-8} title="generators.yml"
99
default-group: local
1010
groups:
1111
local:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Configuration options for the Fern TypeScript SDK.
55

66
You can customize the behavior of the TypeScript SDK generator in `generators.yml`:
77

8-
```yml {7-8}
8+
```yml {7-8} title="generators.yml"
99
default-group: local
1010
groups:
1111
local:

0 commit comments

Comments
 (0)