Search code examples
javajavadoc

Generate API docs with Javadoc


I am writing Javadocs for a project I am working on, and would like to leverage the @link tag to link each endpoint to the javadoc generated for each method.

Ideally, I'd like to do something simliar to this:

POST /api/resources      calls {@link Resource#getAll()     Resource@getAll}
GET  /api/resources/{id} calls {@link Resource#getById(int) Resource#getById}

I'm very open to any solutions that are similar.


Solution

  • Maven has a feature that allows you to write HTML markup in src/main/javadoc/overview.html and it will process all Javadoc tags and write the output to the main Javadoc page.

    This works pretty well when if you use markdown to generate the overview.html page