describeResource

fun describeResource(description: OperationDsl.() -> Unit): ResourceDescription

Function that should be used to implement ResourceDescription on resource classes.

For example, you can do the following:

@Serializable
@Resource("/foo/{bar}")
class MyResourceClass(val bar: String) {
companion object : ResourceDescription by describeResource({
description = "Baz"
})
}