Skip to content

Version 2.1.28 seems to break oneOf #2192

@stratenh

Description

@stratenh

We have a Kotlin interface which gets implemented in multiple data classes:

@Schema(
    type = "object",
    oneOf = [A::class, B::class, C::class],
)
interface I {
    val userMessage: String
    val stepDataType: String
}

data class A(
    override val userMessage: String,
    @Schema(type = "enum", allowableValues = [INFO])
    override val classType: String = INFO,
) : I

data class B(
    override val userMessage: String,
    @Schema(type = "enum", allowableValues = [ERROR])
    override val classType: String = ERROR,
) : I

data class C(
    override val userMessage: String,
    val id: Int,
    val link: URI,
    @Schema(type = "enum", allowableValues = [FILE])
    override val classType: String = FILE,
) : I

This interface is used in a data class, which gets returned by the controller. In version 2.1.27 the return type got shown in the output. In version 2.1.28 the type got stripped. Is this a bug or do we need to change something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions