[BUG][Kotlin] Invalid code being generated for interface inheritance
Created by: nicolashaan
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 (example)
Description
The following specification https://github.com/nicolashaan/openapi-generator/blob/bc7df2bb38e3fe26dabc2ad453bafeb8c403d57b/modules/openapi-generator/src/test/resources/3_0/kotlin/kotlin_interface.yaml
generates invalid Kolin code : -> https://github.com/nicolashaan/openapi-generator/blob/bc7df2bb38e3fe26dabc2ad453bafeb8c403d57b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Video.kt
Video
inherits from Media
interface but the inheritance is inherited by using Media()
openapi-generator version
master
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Related issues/PRs
Suggest a fix
Here is a working fix: https://github.com/nicolashaan/openapi-generator/commit/1f68eba6d805f995af1820f36a0f018f08ecf750
What spec and sample can I use to create a non-regression test for the fix (instead of creating a whole new sample and spec)?