I guess nobody have built a custom swagger codegen...
# ktor
h
I guess nobody have built a custom swagger codegen generator that can output a ktor client? 😄
c
There is a Kotlin generator for OpenApi Generator, but I don’t think it’s been updated in a while (generated client uses Kotlin 1.3.61), and the quality of code it generated wasn’t very good (couldn’t configure the http client, for example). Things may have improved since I last used it about a year ago, though, so you may give it a try https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/kotlin.md
h
Yep. I saw that. I wonder how much work it would be to implement something for Ktor.
c
The multiplatform options will generate a client SDK based on Ktor Client. But the Ktor client itself can’t be configured at runtime with the default multiplatform implementation. It’s all based on Handlebars templates, which can be customized, but they’re horribly complex (that’s how I tried with it initially, and it kinda worked but it wasn’t very easy)
m
Yeah, only chance is to modify or create new templates…