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.
3.2.3, 3.3.0 and 3.3.1-SNAPSHOT
https://gitlab.com/mikezx6r/openapi-test/blob/master/src/main/resources/api.yml
Using Gradle. kotlin-spring language. Refer to https://gitlab.com/mikezx6r/openapi-test/blob/master/build.gradle for specifics.
./gradlew oAGenerate and view the models generated into the src/main/generated-kotlin folder
The data class needs to contain all the properties from itself as well as from the 'child' class directly.
Hi,
Tested with the 3.3.3 and still not working.
Best
Just tested, and this is fixed in 4.0.0-beta. A data class is generated with all the properties explicitly defined rather than attempting invalid inheritance. Now just need that to be released ;)
@wing328 Maybe this Issue can be closed.
Most helpful comment
Just tested, and this is fixed in 4.0.0-beta. A data class is generated with all the properties explicitly defined rather than attempting invalid inheritance. Now just need that to be released ;)