Open
Description
With the following property definition:
"repositories": {
"description": "The list of repositories being sourced.",
"type": "object",
"format": "map",
"additionalProperties": {
"$ref": "https://aetheric.co.nz/schema/gsm/repository"
}
}
and the following config:
"customClasses": {
"format": {
"map": "kotlin.collections.Map"
}
}
I end up with:
import kotlin.collections.Map
data class Settings(
val repositories: Map? = null
)
which is invalid.
If I add the generic signature to the type, it includes it in the import, which is also invalid.
I worked around the issue by creating a typealias and mapping to that, but I can see two ways to improve the experience:
- Strip off generic typing on the import declaration.
- Make
object
types without an explicitname
or$id
default toMap<String,?>
where?
is the common property type.
Metadata
Metadata
Assignees
Labels
No labels