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

[BUG] The generator creates a 'kotlin-server' project that uses the old Ktor version #14061

Open andreyaksenov opened 1 year ago

andreyaksenov commented 1 year ago

The command below generates a new Ktor project from the documentation.yaml spec:

openapi-generator generate -g kotlin-server -i documentation.yaml -o /tmp/openapi/kotlin-server/

The resulting project uses an old Ktor version (1.5.4), while the current version is 2.1.3. The project also uses the Locations plugin (AppMain.kt) that can be replaced with a new Resources plugin.

andreyaksenov commented 1 year ago

cc @rsinukov

rsinukov commented 1 year ago

Hi, I am from Ktor team. I can take this ticket once we release 2.2.0. It's estimated to be out by the end of this month.

klimkow commented 1 year ago

@rsinukov as you work on the fix could you please take a look at the scoping issue as well?

Currently when you generate server side without supporting classes using --global-property models,apis the generated Paths class is not usable.