[KotlinSpring] Generated model is invalid if 'inheritance' is used
Created by: mikezx6r
Description
The Kotlin Spring generator currently generates inheritance of data classes if a schema/type uses allOf
and $ref
. Kotlin data classes do not support inheritance, so this is invalid code.
The generator will need to generate properties from the main object, as well as the sub-object directly.
openapi-generator version
3.2.3, 3.3.0 and 3.3.1-SNAPSHOT
OpenAPI declaration file content or url
https://gitlab.com/mikezx6r/openapi-test/blob/master/src/main/resources/api.yml
Command line used for generation
Using Gradle. kotlin-spring language. Refer to https://gitlab.com/mikezx6r/openapi-test/blob/master/build.gradle for specifics.
Steps to reproduce
./gradlew oAGenerate and view the models generated into the src/main/generated-kotlin folder
Related issues/PRs
Suggest a fix/enhancement
The data class needs to contain all the properties from itself as well as from the 'child' class directly.