Skip to content

Multi-type items #65

@DanySK

Description

@DanySK

Hi,
I'd like to be able to express the following valid configurations:

multitype: somestring
multitype:
  a: map

I can support either one, but not both:

object FooSpec : ConfigSpec("") {
    val multitype by required<String>() // former case
}
object FooSpec : ConfigSpec("") {
    val multitype by required<Map<String, String>>() // latter case
}

Is there a way to capture both cases? I cannot rename the key.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions