How smart-doc Generates Zero‑Annotation API Docs for Java REST and Dubbo
smart-doc is a Java tool that automatically creates clear Markdown, HTML5, and Postman Collection API documentation for both REST and Apache Dubbo RPC interfaces without requiring any annotations, leveraging only standard JavaDoc comments and source code analysis.
Introduce
smart-doc is a tool that simultaneously supports JAVA REST API and Apache Dubbo RPC interface documentation generation. It pioneered the concept of deriving documentation from Java generic definitions, analyzing only the interface source code without any intrusive annotations. By writing standard JavaDoc comments, smart-doc can produce concise Markdown, HTML5 documents, and even Postman Collections for API testing.
Features
Zero annotations, zero learning cost; just write standard Java comments.
Automatic inference from source code interface definitions, with powerful return structure deduction.
Supports Spring MVC, Spring Boot, Spring WebFlux (controller style), and Feign.
Handles asynchronous return types such as Callable, Future, and CompletableFuture.
Supports JSR‑303 validation on JavaBeans, including group validation.
Automatically generates mock JSON parameters for JSON request bodies.
Generates realistic mock values for common fields.
Supports generation of JSON response examples.
Can load external source code (including standard JARs) to generate field comments.
Outputs multiple document formats: Markdown, HTML5, Asciidoctor, Postman Collection, OpenAPI 3.0.
Provides an online view of static HTML5 API docs on Spring Boot services.
Document data is open for custom integration with documentation management systems.
Exports error codes and dictionary codes defined in code to the API docs.
Easy integration via Maven or Gradle plugins.
Supports Apache Dubbo RPC interface documentation generation.
Smart-doc generated documentation examples
Interface header example
Request parameter example
Response parameter example
HTML document example
Project address
Open‑source repository: https://gitee.com/smart-doc-team/smart-doc
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Programmer DD
A tinkering programmer and author of "Spring Cloud Microservices in Action"
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
