dokka icon indicating copy to clipboard operation
dokka copied to clipboard

Reporting values of const vals (Strings)

Open G00fY2 opened this issue 4 years ago • 2 comments

In Javadoc there is the @value tag to reference values of a static field. Currently there seems to be no equivalent way with KDoc / dokka.

I am not sure why #488 got closed by #1489, because this PR only added a presentation for primitive types.

Please add a way to reference and present non primitive values (Strings) of static fields in the documentation.

G00fY2 avatar Jul 08 '21 09:07 G00fY2

It became visually inconsistent with the new change from 1.6.20: supported default values in the main declaration image

atyrin avatar Apr 25 '22 13:04 atyrin

It would be great if the implementation here would also work for enums.

enum class Options(val defaultValue: String? = null) {
    OPTION_1("foo"),
    OPTION_2 // no default
}

Documenting enum properties per case without having to manually specify them again in the kdoc would be very convenient.

naddeoa avatar Aug 31 '22 18:08 naddeoa