Java API Documentation Generator
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md to install @user_6d48611e/java-api-doc-generator.
About this skill
Problem
In a Java Spring Boot codebase, endpoint definitions are scattered across multiple @RestController / @Controller classes. Frontend integration and test regression often require repeatedly confirming the HTTP method, path prefix, query parameters, request body fields, and response shape. Hand-maintained docs can miss parameters, stale examples, or interface changes.
How It Works
The skill first locates src/main/java or a user-specified controller package, then recursively scans .java files and selects controller classes. It extracts class-level @RequestMapping and method-level @GetMapping / @PostMapping / @PutMapping / @DeleteMapping / @PatchMapping, as well as @PathVariable, @RequestParam, @RequestBody, JavaDoc comments, and Swagger annotation descriptions or examples. A Python script then generates API_DOCUMENTATION.md, organized by controller, with endpoint summaries, parameter tables, request examples, response examples, and deprecation markers.
Boundaries
Parsing relies on regular expressions, so it covers common Spring Boot patterns but may be imprecise for complex generics, inherited interfaces, or dynamic routes. The generated docs do not include authentication details, and response examples are often placeholders. Add @ApiOperation, @ApiParam, and @ApiResponse in code, then manually verify real examples.
Use Cases
- Create Markdown endpoint docs for frontend and QA before Spring Boot integration.
- Inspect controller query params, request bodies, and response examples during code review.
- Consolidate scattered Java backend endpoints into one handover document.
- Rescan updated APIs, mark deprecated endpoints, and list missing descriptions.
Best For
- Backend engineers maintaining Spring Boot services who need endpoint docs for frontend.
- QA engineers who need to verify paths, params, and response examples before integration.
- Engineers taking over Java services who need to map scattered controllers quickly.
- Backend leads who need to review endpoint descriptions and deprecation markers.
Related Skills
A one-shot coding agent built on Claude Code CLI that runs non-interactively, supports a specified workdir, and can be monitored in the foreground or background.
Preview and confirm file sorting by extension, with recursive cleanup, ignore rules, and transactional rollback.
An engineering assistant for static HTML/CSS/JS pages, design-token extraction, IE8-compatible review, and structured delivery.
An engineering workflow for requirement analysis, scenario modeling, risk planning, quality gates, testing, and knowledge capture, with lightweight, standard, and full modes.