Skip to content

docs/generating-documentation#109

Merged
ebouchut merged 3 commits into
devfrom
docs/generating-documentation
Jul 14, 2026
Merged

docs/generating-documentation#109
ebouchut merged 3 commits into
devfrom
docs/generating-documentation

Conversation

@ebouchut

@ebouchut ebouchut commented Jul 14, 2026

Copy link
Copy Markdown
Owner

This PR adds the Maven Javadoc plugin (maven-javadoc-plugin) to generate Javadoc documentation for the backend.
This generates the Java API reference (target/reports/api) and a "make javadoc" target.

Note

Although the backend does not currently expose an API, this is in preparation for version 2, which will provide a REST API to handle React requests.

  • Configure Javadoc doclint to "`all,-missing " so it validates links and HTML but does not fail on missing param/@return (Checkstyle handles that).
  • Document that Lombok-generated accessors are not in Javadoc (delombok intentionally omitted).
  • Update CI (lint workflow) to build and publish Javadoc to GitHub Pages alongside the Checkstyle report, with assembly to avoid clobber and continue-on-error so Javadoc failures don't block merges.
  • Expand the documentation section: separate handwritten vs generated docs, list generated artifacts with commands and paths, add detailed sections for API reference and Merise diagrams, and link Check/JaCoCo reports.
  • Update README links to published javadoc.

ebouchut added 3 commits July 14, 2026 21:53
The project had no way to produce Java API documentation: no plugin, no
target, no CI step. maven-javadoc-plugin now renders the /** */ comments
to browsable HTML in target/reports/apidocs, reachable through a new
"make javadoc" target.

The plugin declares no executions, so it stays inert during a normal
build (verified: package never invokes it) and runs only when asked.
doclint is set to "all,-missing": it validates the syntax, the HTML, and
the {@link} references, but does not complain about missing @param or
@return, because Checkstyle already reports missing Javadoc
(MissingJavadocType, MissingJavadocMethod) and ADR-0011 keeps those
quality checks advisory rather than blocking.

Javadoc reads the source, so the accessors Lombok generates do not
appear in the output; delombok is deliberately not added.
The Lint workflow now also generates the API reference and publishes it
next to the Checkstyle report: https://www.ericbouchut.com/learn-dev/
lists both, under /javadoc/ and /checkstyle/.

The Javadoc rides along in this workflow on purpose rather than in one
of its own: GitHub Pages serves a single site artifact, so a second
workflow deploying Pages would clobber the Checkstyle report.

Both reports are written to target/reports, so the assembly step lifts
apidocs out first and only then copies what remains as the Checkstyle
site; the checkstyle-report artifact excludes apidocs for the same
reason. The job keeps continue-on-error, so a Javadoc failure can never
gate a merge, and the root index becomes a small landing page listing
both reports instead of redirecting to the only one there used to be.
The "Generating the Documentation" section held only a TODO. It now
separates the hand-written documentation (README, ARCHITECTURE, ADRs,
glossaries, RGAA, plans) from the generated one, and tabulates the four
generated artefacts with the command and the output path of each.

Two of them get a subsection, in the Locally/Online/On CI shape the
Checkstyle and JaCoCo sections already use: the API reference, with what
it contains, the absent Lombok accessors, and why Javadoc does not
police missing comments (Checkstyle does); and the Merise diagrams, with
their prerequisites, the generated-do-not-edit rule, and the schema
drift check. The Checkstyle and JaCoCo reports are cross-linked instead
of described twice.

The "Code Documentation" placeholder no longer claims the code reference
is unavailable: it points at the published Javadoc, as does the README
documentation list.
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.33%. Comparing base (a25e3e5) to head (f50361b).

Additional details and impacted files
@@            Coverage Diff            @@
##                dev     #109   +/-   ##
=========================================
  Coverage     80.33%   80.33%           
  Complexity      186      186           
=========================================
  Files            38       38           
  Lines           783      783           
  Branches         42       42           
=========================================
  Hits            629      629           
  Misses          124      124           
  Partials         30       30           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ebouchut ebouchut self-assigned this Jul 14, 2026
@ebouchut ebouchut added documentation Improvements or additions to documentation backend ci Continuous Integration labels Jul 14, 2026
@ebouchut ebouchut moved this to In Progress in learn-dev-project Jul 14, 2026
@ebouchut ebouchut moved this from In Progress to In Review in learn-dev-project Jul 14, 2026
@ebouchut
ebouchut merged commit 32ead80 into dev Jul 14, 2026
7 checks passed
@ebouchut
ebouchut deleted the docs/generating-documentation branch July 14, 2026 20:29
@github-project-automation github-project-automation Bot moved this from In Review to Done in learn-dev-project Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend ci Continuous Integration documentation Improvements or additions to documentation

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant