OpenAPITools / OpenAPITools/openapi-generator

[BUG] Kotlin-Spring OpenAPI Generator Mustache Template Missing Interface Generation with Tags Annotations

Open
#17,211 1 comment 0 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

Bug Report Checklist
  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request
Description

I have identified an issue with the current Kotlin-Spring OpenAPI Generator that doesn't generate the API interface with the @Tag annotations
Looking at the mustache template modules/openapi-generator/src/main/resources/kotlin-spring/apiInterface.mustache, it seems that the logic to include the @Tag annotation doesn't exist.
Using the spring generator for java the template and the generator already have this logic.

Kotlin-Spring generator
Screenshot 2023-11-28 at 14 58 08

Spring Java generator
Screenshot 2023-11-28 at 14 59 30

openapi-generator version

v7.1.0 released

Suggest a fix

Apply the same behaviour as the spring generator for java where the @Tag annotations are added.

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

Start in modules/openapi-generator/src/main/resources/kotlin-spring/apiInterface.mustache and compare it with the Spring Java generator's corresponding template. Run the generator with the issue's reproduction spec, then verify that the generated Kotlin-Spring API interface includes the expected @Tag annotations.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin, spring
Domain
api, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.