OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.29k stars 6.44k forks source link

[REQ] Feature Request Description #12947

Open Marek00Malik opened 2 years ago

Marek00Malik commented 2 years ago

Is your feature request related to a problem? Please describe.

When can we see the upgrade of the kotlin plugin to use Ktor 2.x.x ? It's the LTS version now.

I noticed that the following PR was closed https://github.com/OpenAPITools/openapi-generator/pull/11994

wing328 commented 2 years ago

Not sure why that one is closed. Can you please submit a new one and we'll review accordingly? Thanks.

Marek00Malik commented 2 years ago

👍

grEvenX commented 1 year ago

@Marek00Malik @wing328 Maybe one of you could update the title and labels of this one so it doesn't drown in all the other issues?

With kotlin 1.7.20 it doesn't seem it's possible to use OpenAPI generator anymore to generate OpenAPI clients for Kotlin multiplatform due to issues with compiling against Ktor 1.x.x which is no longer maintained, thus making this issue maybe a higher priority? Did you ever get to submit a new PR for this @Marek00Malik ?

Marek00Malik commented 1 year ago

Hey @grEvenX, Sorry but I didn't worked on this issue, don't know if I will have time to do it outside my working hours anytime soon. Might be a good idea to actually raise a separate issue, give an actual sample in there.

Marek00Malik commented 1 year ago

This one is supposed to be closed as the plug-in supports Ktor 2.1.x know

Marek00Malik commented 1 year ago

@grEvenX I just raised the following PR. https://github.com/OpenAPITools/openapi-generator/pull/14045

Please feel free to add anything if you see the need.

grEvenX commented 1 year ago

Thanks @Marek00Malik ! We recently updated the OpenAPI generator to the latest release which uses ktor 2.1.x and it seems like the OpenAPI generator has a pretty serious bug which doesn't just affect multiplatform, but any kotlin based API client generated with the Ktor library (missing the ContentType of type Json) as shown in your pull-request. The severity of this issue should probably be raised? I just discovered serialization issues in one of the projects where we had updated to the latest OpenAPI version supporting ktor 2.1.x.

I can confirm that the changes in your PR solves the bugs we were experiencing when serializing the input parameters to our API endpoints and the OpenAPI project should probably try to get in this fix as soon as possible. Are you able to rebase it or can I help you with that to speed up the process? cc @wing328