How to document default argument with KDoc

945 Views Asked by At

Is there a syntax to documenting default arguments with KDoc, or should I do it manually?

/**
 * A group of *members*.
 *
 * This class has no useful logic; it's just a documentation example.
 *
 * @property name the name of this group. Default -"NoName"
 * @constructor Creates an empty group.
 */
class Group(val name: String = "NoName") {
    /**
     * Adds a [member] (default - NoMember) to this group.
     * @return the new size of the group.
     */
    fun add(member: String = "NoMember"): Int { ... }
}
0

There are 0 best solutions below