# Swift configuration

> Configure Swift SDK generator settings including clientClassName, moduleName, environmentEnumName, and nullableAsOptional options.

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

```yaml {6-11} title="generators.yml"
groups:
  swift-sdk:
    generators:
      - name: fernapi/fern-swift-sdk
        version: 0.25.4
        config:
          clientClassName: YourClientName
          environmentEnumName: YourCustomEnvironment
          moduleName: MyCustomModule
          enableWireTests: false
          nullableAsOptional: true
```

<ParamField path="clientClassName" type="string" required={false} toc={true}>
  The name of the generated client class. This allows you to customize the class name that users will instantiate when using your SDK.
</ParamField>

<ParamField path="environmentEnumName" type="string" required={false} toc={true}>
  The name of the generated environment enum. This allows you to customize the enum name that defines your API environments (such as production, staging, development) and ensures consistent naming across SDK generations.
</ParamField>

<ParamField path="moduleName" type="string" required={false} toc={true}>
  The module name used in client code (e.g., `import MyCustomModule`). When provided, this name is used consistently across the library, product, and target.
</ParamField>

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

<ParamField path="nullableAsOptional" type="boolean" default="false" required={false} toc={true}>
  When enabled, nullable fields are decoded as Swift optionals (`T?`) instead of the `Nullable<T>` wrapper type. This simplifies type handling but loses the ability to distinguish between explicit `null` values and absent fields. When disabled (default), nullable fields use the `Nullable<T>` wrapper type which preserves the distinction between fields explicitly set to `null` and fields that are missing from the response.
</ParamField>