Ktor Gen Function
annotation class KtorGenFunction(val generate: Boolean = true, val customHeader: String = "")(source)
Indicates that a method within a @KtorGen-annotated interface should participate in code generation.
Example
interface UserRoutes {
@GET("/users")
suspend fun getUsers(): List<User>
@KtorGenFunction(generate = false)
@JvmSynthetic
@ExperimentalApi
fun getUsersBlocking(): List<User> = runBlocking { getUsers() }
}Content copied to clipboard
In the above example, the getUsersBlocking function will not be overridden by KtorGen.