Closed fyam1997 closed 1 day ago
found a solution, just add this in ExpressionsVisitorK2
override fun visitReturnExpression(returnExpression: FirReturnExpression, data: KtorElement?): List<KtorElement> {
val funCall = returnExpression.result as? FirFunctionCall
funCall?.accept(this, data)
return super.visitReturnExpression(returnExpression, data)
}
here is an example project for this issue https://github.com/fyam1997/KtorDocTest
route method with return type was ignored when generating document. In example below,
blockBodyWithReturn
andexpressBody
was ignoredand output yaml would be