[BUG][kotlin-spring] Generating schema model with additional properties in component leads to compile error
Created by: Alexichlol
Description
Generating schema model with additional properties leads to compile error.
Steps to reproduce: swagger.yaml:
JsonObjectItem:
description: example item of Json Object (could be anything)
properties:
something1:
type: string
something2:
type: string
additionalProperties:
type: string
generates
`data class JsonObjectItem (
@JsonProperty("something1") val something1: kotlin.String? = null,
@JsonProperty("something2") val something2: kotlin.String? = null
) : kotlin.mapOf<String, kotlin.String>{
}`
which leads to
JsonObjectItem.kt: (23, 12): Unresolved reference: mapOf
openapi-generator version
4.1.3
OpenAPI declaration file content or url
--> https://gist.github.com/Alexichlol/a4ce6f2a3742cc28a757fa736923a436
Command line used for generation
gradle plugin
Steps to reproduce
in description but basically just generate code and try to compile
Related issues/PRs
Suggest a fix
don't really know the idea behind current implementation but maybe either not using data class if want to inherit from map and inherit from hashmap like in spring java or use composition and have map as the field