Skip to content

Commit eb17414

Browse files
committed
generate event parameter description
1 parent 78fd8f2 commit eb17414

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/main/kotlin/de/rakhman/webextensions/Generator.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,16 @@ class Generator(val dir: File) {
134134

135135
return PropertySpec
136136
.builder(event.name, type)
137-
.apply { event.description?.let { addKdoc(it.cleanupDescription()) } }
137+
.apply { event.description?.let { addKdoc(buildString {
138+
append(it.cleanupDescription())
139+
event.parameters?.forEach {
140+
append('\n')
141+
append("@param ")
142+
append(it.name)
143+
append(' ')
144+
append(it.description)
145+
}
146+
}) } }
138147
.build()
139148
}
140149

0 commit comments

Comments
 (0)