SMILEY4 / ktor-swagger-ui

Kotlin Ktor plugin to generate OpenAPI and provide Swagger UI
Apache License 2.0
182 stars 33 forks source link

refactor: ktor 3 compatibility #140

Closed sahitono closed 1 month ago

sahitono commented 1 month ago

KTOR 3 Compatibility will close #136 , there are many breaking change to the Route of ktor. There are issue in my environment that i can not run CustomizedSchemaGenerator.kt as it says i need kotlin 2.0 to run kotlinx 1.7.3. I am not sure is that happen only at my environment because i use kotlin 2.0

sahitono commented 1 month ago

image

it looks like need to change the kotlinx serialization to 1.7.3 because ktor 3 is using that. but that means it need to be kotlin 2.0, what do you think ? should it be postponed or create a new branch @SMILEY4

SMILEY4 commented 1 month ago

(without having tested or looked anything up) i dont see any issue with upgrading kotlinx-serialization. Im just thinking if we should also maybe test this with https://github.com/SMILEY4/schema-kenerator first. If there could be any issues, its will be there.

SMILEY4 commented 1 month ago

I did some quick testing schema-kenerator and this project and i don't think upgrading kotlin (2.0.21?) and serialization (1.7.3) should be an issue :+1: I would move the schema-kenerator project to those versions aswell.

sahitono commented 1 month ago

got it, i will update both and the schema kenerator

SMILEY4 commented 1 month ago

Thank you. I already started it for schema-kenerator https://github.com/SMILEY4/schema-kenerator/compare/upgrade-to-kotlin-2. I dont think there is much more to do. Is there a reason you chose kotlin version "2.0.20" over "2.0.21" ?

sahitono commented 1 month ago

Thank you. I already started it for schema-kenerator SMILEY4/schema-kenerator@upgrade-to-kotlin-2 (compare). I dont think there is much more to do. Is there a reason you chose kotlin version "2.0.20" over "2.0.21" ?

no, my mistake i thought 2.0.20 is the latest. i will bump it

mcxinyu commented 1 month ago

I think we should not develop the compatibility of ktor3.0 in the develop branch, or at least create a new module for the compatibility of ktor3.0. Otherwise, this modification will affect other users who use ktor2.+.

mcxinyu commented 1 month ago

The maintenance of the features of ktor2.+ may continue for some time, and it is recommended to wait until the next major version (for this project) before abandoning ktor 2.+ .

SMILEY4 commented 1 month ago

I think we should not develop the compatibility of ktor3.0 in the develop branch, or at least create a new module for the compatibility of ktor3.0. Otherwise, this modification will affect other users who use ktor2.+.

Agreed, my current plan would be to create one more minor version with some small features/improvements and then split off some branch for the maintenance of this project with ktor 2.x.