OpenAPITools / OpenAPITools/openapi-generator

[BUG][KOTLIN] Generator 7.16.0 for Kotlin uses experimental `kotlin.time.Instant` without marking it

Open
#22,170 10 comments 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

Description

OpenAPI generator v7.16 suddenly starts generating kotlin.time.Instant properties within data classes, however this is an experimental class that must be annotated with '@kotlin.time.ExperimentalTime'. Since it is not annotated with that annotation, compilation of the generated source code fails

openapi-generator version

7.16.0

Reproducer
  1. git clone https://gitlab.com/rug-digitallab/resources/docker-kotlin.git
  2. git checkout renovate/openapigeneratorversion
  3. Observe failure when running ./gradlew assemble

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 with the provided docker-kotlin reproducer, check out renovate/openapigeneratorversion, and run ./gradlew assemble to confirm the generated-source compilation failure. Trace where the Kotlin data classes and kotlin.time.Instant properties are generated; done means the generated project compiles without requiring an unmarked experimental API.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.