Ktor OpenApi documentation with type descriptions

Hi. 

I am able to generate OpenApi documentation from my Ktor project. However, as I am returning json objects from my API, I would love to generate documentation for the returned types also. 

E.g. If I return:

@Serializable
// I want to have this in my OpenApi doc that describes Foo  
data class Foo (
    // I want to have this in my OpenApi doc that describes someString 
    val someString: String,
    val version: String,
)

I would like to have the comments in my OpenApi doc as description. Even better if I can write the examples in the code as well. Is this possible?

Timo

0

请先登录再写评论。