kroegerama / openapi-kgen

Generate modern API Clients in Kotlin from OpenAPI specifications. Supports OpenAPI >= 3.0.0.
Apache License 2.0
22 stars 4 forks source link

Add support for kotlinx-serialization #4

Open sschuberth opened 2 years ago

sschuberth commented 2 years ago

It would be great if in addition to / instead of Moshi kotlinx-serialization would be supported as a (de-)serializer as that would be a step towards multiplatform support.

kroegerama commented 2 years ago

Actually, I'm currently in the process of rewriting the generator to kotlinx-serialization + ktor-client. This should make a huge step towards multiplatform. I'm just quite blocked, because I'm waiting for the new ktor 2 API to become stable.

sschuberth commented 2 years ago

I'm just quite blocked, because I'm waiting for the new ktor 2 API to become stable.

Out of curiosity, do you know about any ETA for that?

kroegerama commented 2 years ago

I don't really know about an ETA for Ktor 2. But they recently released a beta, so I think the APIs should be quite stable now. It's just not documented at all (at least I couldn't find an official documentation). I did write some example codes, though, and have some ideas, how the generated code should look like in the future.

I cannot give any ETA for the generator currently, sorry. But I have a few upcoming projects, which would greatly benefit from the rewritten generator. Also, I have a few days off in feb/march and might just deep dive into the code and finish this.

sschuberth commented 2 years ago

Let me know if there's anything contributors could help with.

sschuberth commented 2 years ago

Ktor 2 has been out for a while. Are there any updates to this issue (also WRT accepting help)?