我有一个巨大的@OpenApi
注释(基本上它是Javalin /Kotlin 端点的文档),它占据了很多行:
@OpenApi(
summary = "",
description = "Lists all customers",
path = "customers",
queryParams =
// ...........
// ...........
// etc
)
override fun handle(context: Context) {
// body of the REST handler
}
我必须滚动很多才能看到实际的处理程序。因此,我想以某种方式隔离它:
@GetCustomersDoc
override fun handle(context: Context) {
// body of the REST handler
}
我对使文档转到其他地方的其他解决方案感到满意。
这将使代码更清晰,文档被隔离。