OpenAPITools / OpenAPITools/openapi-generator

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

Open
#14,061 3 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run the shown openapi-generator command with documentation.yaml and inspect the generated kotlin-server project, especially src/main/kotlin/org/openapitools/server/AppMain.kt. Compare its Ktor 1.5.4 setup with the current Ktor 2.1.3 and the Resources replacement for Locations; done means the generated project uses the current version and plugin.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.