Skip to content

Add wiki documentation generator for Java components#175

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/generate-documentation-for-java-components
Draft

Add wiki documentation generator for Java components#175
Copilot wants to merge 3 commits intomainfrom
copilot/generate-documentation-for-java-components

Conversation

Copy link
Contributor

Copilot AI commented Mar 21, 2026

Adds a JavaParser-based documentation generator that produces GitHub Wiki pages (one per public Java component) with detailed descriptions, code examples, version compatibility, and @since version extracted from source.

New module: microsphere-spring-doc-generator

  • JavaSourceParser — Parses all module source trees using JavaParser (Java 17 language level). Extracts Javadoc, @since, @author, @see, code examples from <pre>{@code} blocks (with raw comment fallback for curly-brace truncation), public method signatures, type hierarchy. Handles implicit public on interface methods.
  • MarkdownRenderer — Renders each component as a Markdown wiki page: overview table, cleaned description (HTML→Markdown), code examples (extracted or auto-generated per component type), public API, version compatibility matrix, see-also references.
  • WikiDocGenerator — Orchestrator scanning all 8 project modules, producing per-component pages + Home.md index + _Sidebar.md navigation. Entry point: java -jar microsphere-spring-doc-generator.jar <projectRoot> <outputDir>.
  • JavaComponentInfo — Data carrier for extracted component metadata.

GitHub Actions workflow: generate-wiki-docs.yml

Triggers on push to main (when **/src/main/java/** changes) or workflow_dispatch. Builds the generator, runs it, and pushes output to the project's wiki repository.

Usage

# Build
mvn compile -pl microsphere-spring-doc-generator -am -DskipTests

# Generate 276 wiki pages from 305 source files across 8 modules
mvn exec:java -pl microsphere-spring-doc-generator \
  -Dexec.mainClass="io.microsphere.spring.doc.WikiDocGenerator" \
  -Dexec.args=". ./wiki-output"

Generated page structure per component:

# BeanDependencyResolver
## Overview          — module, package, type, since, author
## Description       — cleaned Javadoc with HTML→Markdown
## Code Examples     — extracted from <pre>{@code} or auto-generated
## Public API        — method signatures + descriptions
## Version Compatibility — branch matrix + Spring profile table
## See Also          — @see references

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • maven.aliyun.com
    • Triggering command: /usr/bin/wget wget --quiet REDACTED -O /tmp/tmp.1sLwdyIrq6/apache-maven-3.9.9-bin.zip g/microsphere-spring-web/src ===&#34; &amp;&amp; ls -la /home/REDACTED/work/microsphere-spring/microsphere-sprbash (dns block)
    • Triggering command: /usr/bin/wget wget --quiet REDACTED -O /tmp/tmp.m4sLdZE3xE/apache-maven-3.9.9-bin.zip (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Copilot AI and others added 2 commits March 21, 2026 13:22
…enerator

Implements a JavaParser-based documentation generator that:
- Scans all project modules for Java source files
- Extracts component details (description, code examples, @SInCE, @author, @see)
- Generates Markdown wiki pages (one per component)
- Creates Home.md index and _Sidebar.md navigation
- Includes version compatibility and Spring profiles information
- Adds GitHub Actions workflow for automated wiki publishing

Co-authored-by: mercyblitz <533114+mercyblitz@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsphere-projects/microsphere-spring/sessions/cf4566dc-192c-41bf-8954-314811735c58
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
6 Security Hotspots

See analysis details on SonarQube Cloud

Copilot AI changed the title [WIP] Add documentation generation for Java components Add wiki documentation generator for Java components Mar 21, 2026
Copilot AI requested a review from mercyblitz March 21, 2026 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants