Skip to content
This repository was archived by the owner on Mar 31, 2025. It is now read-only.

Support for Polymorphism #597

@BierDav

Description

@BierDav

Is your feature request related to a problem? Please describe.
We have some dto's that share a few properties which is sometimes useful to have an interface or abstract class for and currently there is also no problem when doing this like in this example:

@Serializable
data class Foo(
    val bar: String,
    override val name: String
) : Named

@Serializable
data class Bar(
    val foo: String,
    override val name: String
) : Named

interface Named {
    val name: String
}

But unfortunately we do not get the inheritance information in our documentation. which would be quite nice.

Describe the solution you'd like

For interfaces and abstract classes an additional schema should be generated with their corresponding fields which than can be inherited using allOf in the documentation.

It is important that we get an setting for this behavior to be able to opt out of the new behavior or vice versa.

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