Skip to content
Merged
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
21 changes: 20 additions & 1 deletion fern/products/sdks/overview/csharp/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Configuration options for the Fern .NET SDK.

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

```yml {7-8}
```yml {7-8} title="generators.yml"
default-group: local
groups:
local:
Expand All @@ -19,58 +19,77 @@ groups:
## SDK configuration options

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

<ParamField path="base-api-exception-class-name" type="string" required={false} toc={true}>
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.
</ParamField>

<ParamField path="base-exception-class-name" type="string" required={false} toc={true}>
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.
</ParamField>

<ParamField path="client-class-name" type="string" required={false} toc={true}>
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.
</ParamField>

<ParamField path="custom-pager-name" type="string" required={false} toc={true}>
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.
</ParamField>

<ParamField path="enable-forward-compatible-enums" type="boolean" required={false} toc={true}>
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.
</ParamField>

<ParamField path="environment-class-name" type="string" required={false} toc={true}>
Specifies the name of the environment configuration class used for managing different API environments (e.g., development, staging, production).
</ParamField>

<ParamField path="explicit-namespaces" type="boolean" required={false} toc={true}>
When enabled, generates code with explicit namespace declarations throughout the SDK. This can help avoid naming conflicts and improve code clarity in larger projects.
</ParamField>

<ParamField path="exported-client-class-name" type="string" required={false} toc={true}>
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.
</ParamField>

<ParamField path="generate-error-types" type="boolean" required={false} toc={true}>
When enabled, generates specific error type classes for different API errors. This provides strongly-typed error handling instead of using generic exception types.
</ParamField>

<ParamField path="generate-mock-server-tests" type="boolean" required={false} toc={true}>
When enabled, generates mock server tests alongside the SDK code. This helps with testing and validation of the SDK functionality during development.
</ParamField>

<ParamField path="include-exception-handler" type="boolean" required={false} toc={true}>
When enabled, includes built-in exception handling utilities in the generated SDK. This provides convenience methods for common error handling scenarios.
</ParamField>

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

<ParamField path="namespace" type="string" required={false} toc={true}>
Specifies the root namespace for all generated .NET code. This determines the namespace hierarchy that users will import when using the SDK.
</ParamField>

<ParamField path="package-id" type="string" required={false} toc={true}>
Sets the NuGet package identifier for the generated SDK. This is used when publishing the SDK to NuGet or other package repositories.
</ParamField>

<ParamField path="read-only-memory-types" type="List<string>" required={false} toc={true}>
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.
</ParamField>

<ParamField path="root-client-class-access" type="'public' | 'internal'" required={false} toc={true}>
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.
</ParamField>

<ParamField path="root-namespace-for-core-classes" type="boolean" required={false} toc={true}>
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.
</ParamField>

<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>
15 changes: 13 additions & 2 deletions fern/products/sdks/overview/go/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Configuration options for the Fern Go SDK.

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

```yaml {7-8}
```yaml {7-8} title="generators.yml"
default-group: local
groups:
local:
Expand All @@ -22,15 +22,19 @@ groups:
## SDK Configuration Options

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

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

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

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

<ParamField path="importPath" type="string" required={false} toc={true}>
Expand Down Expand Up @@ -60,15 +64,18 @@ with the relevant elements in your `go.mod` path. In this case, the generated Go
</ParamField>

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

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

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

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

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

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

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

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

<ParamField path="useReaderForBytesRequest" type="boolean" 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>
17 changes: 16 additions & 1 deletion fern/products/sdks/overview/java/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Configuration options for the Fern Java SDK.
---
You can customize the behavior of the Java SDK generator in `generators.yml`:

```yaml {7-9}
```yaml {7-9} title="generators.yml"
default-group: local
groups:
local:
Expand All @@ -18,9 +18,11 @@ groups:
## SDK Configuration Options

<ParamField path="base-api-exception-class-name" type="string" required={false} toc={true}>
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.
</ParamField>

<ParamField path="base-exception-class-name" type="string" required={false} toc={true}>
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.
</ParamField>

<ParamField path="client-class-name" type="string" default="<Organization>ApiClient" required={false} toc={true}>
Expand All @@ -42,6 +44,7 @@ Example:
</ParamField>

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

<ParamField path="enable-extensible-builders" type="boolean" default="false" required={false} toc={true}>
Expand All @@ -50,9 +53,11 @@ When enabled, generates extensible builder classes that support customization th
</ParamField>

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

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

<ParamField path="enable-public-constructors" type="boolean" default="false" required={false} toc={true}>
Expand All @@ -61,18 +66,23 @@ When enabled, generates public constructors for model types.
</ParamField>

<ParamField path="generate-unknown-as-json-node" type="boolean" default="false" required={false} toc={true}>
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.
</ParamField>

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

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

<ParamField path="json-include" type="'non-empty' | 'non-absent'" default="non-absent" required={false} toc={true}>
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.
</ParamField>

<ParamField path="package-layout" type="'nested' | 'flat'" default="nested" required={false} toc={true}>
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.
</ParamField>

<ParamField path="package-prefix" type="string" required={false} toc={true}>
Expand Down Expand Up @@ -114,12 +124,17 @@ If you want to customize how your publishing metadata looks in your
```

<ParamField path="author" type="string" required={false} toc={true}>
Specifies the author name that will appear in the generated package metadata and build configuration files.
</ParamField>
<ParamField path="email" type="string" required={false} toc={true}>
Sets the contact email address for the package author that will be included in the generated package metadata.
</ParamField>
<ParamField path="license" type="'MIT' | 'Apache-2.0' | { custom: 'Custom License Name' }" required={false} toc={true}>
Defines the software license for the generated SDK. Choose from standard licenses like 'MIT' or 'Apache-2.0', or specify a custom license name.
</ParamField>
<ParamField path="package-description" type="string" required={false} toc={true}>
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.
</ParamField>
<ParamField path="reference-url" type="string" required={false} toc={true}>
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.
</ParamField>
9 changes: 8 additions & 1 deletion fern/products/sdks/overview/php/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Configuration options for the Fern PHP SDK.

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

```yaml {7-8}
```yaml {7-8} title="generators.yml"
default-group: local
groups:
local:
Expand All @@ -19,22 +19,29 @@ groups:
## SDK Configuration Options

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

<ParamField path="composerJson" type="Record<string, any>" required={false} toc={true}>
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.
</ParamField>

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

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

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

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

<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>
2 changes: 1 addition & 1 deletion fern/products/sdks/overview/python/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Configuration options for the Fern Python SDK.

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

```yaml {7-16}
```yaml {7-16} title="generators.yml"
default-group: local
groups:
local:
Expand Down
2 changes: 1 addition & 1 deletion fern/products/sdks/overview/ruby/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Configuration options for the Fern Ruby SDK.

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

```yaml {7-8}
```yaml {7-8} title="generators.yml"
default-group: local
groups:
local:
Expand Down
2 changes: 1 addition & 1 deletion fern/products/sdks/overview/typescript/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Configuration options for the Fern TypeScript SDK.

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

```yml {7-8}
```yml {7-8} title="generators.yml"
default-group: local
groups:
local:
Expand Down