generateKotlinClient
Generate a native Kotlin client from a Kizuna API with OkHttp, kotlinx.serialization, and coroutines.
Generate a native Kotlin client from your routes. The generated client uses OkHttp for HTTP, kotlinx.serialization for JSON, and Kotlin coroutines for async.
Parameters
| Parameter | Type | Description |
|---|---|---|
api | ApiDefinition | The api from defineConfig |
config | KotlinConfig | Generation configuration |
KotlinConfig
| Option | Type | Required | Description |
|---|---|---|---|
namespaceName | string | Yes | Name for the generated object and client class (e.g. 'API') |
packageName | string | No | Package declaration for the generated file (e.g. 'com.example.api') |
camelCaseProperties | boolean | No | Convert wire field names to camelCase properties, mapped back via @SerialName. Default false |
unknownEnumCase | boolean | No | Emit enums as a sealed interface with an Unknown(wireValue) member so unrecognised wire values decode instead of throwing. Default false |
Example
See the Kotlin client guide for CLI usage and integration patterns.