Skip to navigation

Swift configuration

View as Markdown

Configure the Swift SDK in the generation block of its target in sdk-config.yml:

sdk-config.yml
targets:
- language: swift
generation:
naming:
clientName: YourClientName
nullableAsOptional: true

The target’s generation block also accepts the shared generation options, such as naming, wireTests, and customCode. Shared options set in the top-level generation block apply to every target, and a target’s generation block overrides them. For generators.yml options, see the Legacy Swift configuration.

Swift options

moduleName
string

The Swift module name for the generated package.

nullableAsOptional
boolean

Whether nullable values are represented as Swift optionals.