openapi-kgen icon indicating copy to clipboard operation
openapi-kgen copied to clipboard

Add support for kotlinx-serialization

Open sschuberth opened this issue 3 years ago • 5 comments

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.

sschuberth avatar Dec 20 '21 11:12 sschuberth

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.

kroegerama avatar Dec 20 '21 14:12 kroegerama

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?

sschuberth avatar Jan 03 '22 13:01 sschuberth

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.

kroegerama avatar Jan 04 '22 16:01 kroegerama

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

sschuberth avatar Jan 04 '22 17:01 sschuberth

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

sschuberth avatar Jul 05 '22 08:07 sschuberth