-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new Kotlin generator? #539
Comments
Hi, the preference would definitely be to extend the existing generator and make it flexible to use different json serialization libraries. The config which code to generate can be passed in via attributes on the invocation_form, see https://app.apibuilder.io/apicollective/apibuilder-generator/0.14.85#model-invocation_form For example the scala generators make use of this to be able to choose between play-json and circe and between joda and java-time libraries for date and datetime types. See https://github.com/apicollective/apibuilder-generator/blob/master/scala-generator/src/main/scala/models/Config.scala |
To create a new generator under To create a new Kotlin generator, I can think of a few ways:
As for the difference between Jackson and Moshi, the generator itself doesn't really use Jackson but rather generates stuff like |
I am looking into adopting ApiBuilder and to leverage the generators in client side apps. I mainly deal with Android.
Our Android stack makes use of:
Kotlin
RxJava2
Retrofit2
Moshi
I noticed the Kotlin generator that currently exists uses most of the same stack but uses Jackson instead for de/serializing of Json.
Any advice if I want to create a new client to use Moshi instead? What about being able to configure the generator so that the client can use Moshi, Gson, or Jackson?
The text was updated successfully, but these errors were encountered: