0

I have a spring boot project with methods that have annotations on them, e.g.:

@PreAuthorize("hasPermission('organization', '$USERS_MANAGE' )")
fun listUsers(userContext: UserContext): List<User> {
    return userDAO.list(userContext.organizationId).map { it.toUser() }
}

When I use dokka to generate the kdoc the PreAuthorize annotation is not included. Here is the generated kdoc:

list     fun listUsers(userContext: UserContext): List<User>

Is there a way to include the annotation in the generated doc?

Dambakk
  • 595
  • 4
  • 20
  • It also has a different return type. Are you sure it's the same method? – Alexey Romanov Nov 01 '19 at 17:04
  • Sorry, copy paste error. Edited it now. – Dambakk Nov 02 '19 at 13:14
  • Is the `PreAuthorize` annotation itself annotated as `@Documented?` If you generate Javadoc for a _Java_ function with the same signature and annotations, does `PreAuthorize` show up in the generated Javadoc? – Bass Nov 05 '19 at 11:37
  • Yes, `PreAuthorize` has the `@Documented` annotation. And the generated Javadoc includes the `PreAuthorize` and other annotations. Do you know if it is possible to "convert" generated javadoc to kdoc? – Dambakk Nov 05 '19 at 13:26

0 Answers0