Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Include documentation from event listener methods in module canvas #143

Closed
odrotbohm opened this issue Dec 14, 2020 · 1 comment
Closed
Assignees
Labels
in: documentation support Documentation generation in: module model Code module meta model type: enhancement New feature or request
Milestone

Comments

@odrotbohm
Copy link
Collaborator

A typical event listener method looks like this:

@Component
class MyEventListeners {

  /**
   * Some documentation about what this does.
   *
   * @param event
   */
  @EventListener
  void on(SomethingHappened event) { … }
}

It would be cool if the method comment was included in the module canvas generated and listed under the event listeners section.

@odrotbohm odrotbohm added in: module model Code module meta model in: documentation support Documentation generation labels Dec 14, 2020
@odrotbohm odrotbohm added this to the 1.1 M2 milestone Dec 14, 2020
@odrotbohm odrotbohm self-assigned this Dec 14, 2020
odrotbohm added a commit that referenced this issue Dec 15, 2020
…stener methods.

ArchitecturallyEvidentTyoe now exposes a Stream<ReferenceMethod> getReferenceMethods() that exposes all methods considered event listeners in case of the type being an event listener in the first place.

Asciidoctor uses that information to look up the extracted Javadoc documentation for those to generate more detailed documentation if available.

The documentation lookup is hidden behind a DocumetnationSource interface for which we currently ship one implementation that uses the documentation generated by Spring Auto REST Docs' Doclet [0].

https://htmlpreview.github.io/?https://github.com/ScaCap/spring-auto-restdocs/blob/v2.0.9/docs/index.html#gettingstarted-usage
@odrotbohm
Copy link
Collaborator Author

That's available now:

Bildschirmfoto 2020-12-15 um 13 25 16

odrotbohm added a commit that referenced this issue Dec 17, 2020
…nces.

If Javadoc comments contain {@code …} and {@link …} references, we now treat those as code references and potentially link to the source if the target is contained in a module.
odrotbohm added a commit that referenced this issue Dec 17, 2020
…rences.

We now properly handle method references (SomeType#someMethod(Type, AnotherType)) when replacing {@code …} and {@link …} elements found in documentation by pointing to the type if a Javadoc base is given.
odrotbohm added a commit that referenced this issue Dec 17, 2020
@odrotbohm odrotbohm added the type: enhancement New feature or request label Feb 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
in: documentation support Documentation generation in: module model Code module meta model type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant