[Open Source] A non-intrusive API documentation generator that generates documentation entirely from comments.
![[Open Source] A non-intrusive API documentation generator that generates documentation entirely from comments.](https://yy123.ink/api/img/1782607111079-au141j.jpg)
1. Project Overview
smart-docA tool that supports generating API documentation for both Java REST APIs and Apache Dubbo RPC interfaces. smart-doc was the first in the industry to introduce the concept of inferring API definitions based on Java generics. It analyzes and generates API documentation entirely from interface source code without introducing any annotations into business code. You only need to write comments following the JavaDoc standard, and smart-doc can generate clear and concise documentation in Markdown, HTML5, Postman Collection 2.0+, and OpenAPI 3.0+ formats.
Whether you are an experienced developer or a newcomer just starting out, we recommend carefully reading the wiki documentation on the official smart-doc Gitee repository whenever you have questions. We have organized every configuration option for smart-doc and its plugins, along with potential issues you may encounter in daily use, into the documentation. Reading the documentation carefully is the greatest support you can give to an open-source project.
2. Open Source License
Licensed under Apache-2.0
3. Screenshots

4. Feature Overview
Features
- Zero annotations, zero learning costs. Just write standard Java comments.
- Automatically infers API definitions based on source code, with powerful return structure inference.
- Supports Spring MVC, Spring Boot, Spring Boot Web Flux (controller-style declarations), Feign, and JAX-RS.
- Supports inference of asynchronous interface return types such as Callable, Future, and CompletableFuture.
- Supports the JSR303 parameter validation specification on JavaBeans, including group validation.
- Automatically generates mock JSON parameters for interfaces that accept JSON request parameters.
- Generates valid mock values for commonly used field definitions.
- Supports generating JSON response examples.
- Supports loading source code from outside the project to generate field comments (including JAR packages released under standard specifications).
- Supports generating documentation in multiple formats: Markdown, HTML5, Asciidoctor, Postman Collection, and OpenAPI 3.0. Open API data allows flexible integration with documentation management systems.
- Supports exporting error codes and various dictionary codes defined in the source code to API documentation.
- Supports easy plugin-based integration with Maven and Gradle.
- Supports generating Apache Dubbo RPC API documentation.
- The HTML5 debug interface fully supports file upload and download testing (using the @download tag to mark download methods).
5. Tech Stack
Best Practices
smart-doc + Torna provides an industry-leading API documentation generation and management solution. smart-doc analyzes Java source code and extracts comments without modifying the source code to generate API documentation, then automatically pushes the documentation to the Torna enterprise-level API documentation management platform.

Automated Documentation with smart-doc + Torna
Torna is an enterprise-level documentation management system jointly developed and exclusively promoted by the official smart-doc team. Therefore, the smart-doc team will not integrate with any other external documentation management systems. For integrations with systems such as ShowDoc and YApi, please handle them internally. Please also stop submitting PRs requesting integration with other documentation systems. Our core focus is to deliver a polished smart-doc + Torna solution.
Building
If you need to build smart-doc yourself, you can use the following command. The build requires Java 1.8.
mvn clean install -Dmaven.test.skip=true
TODO
- GRPC
- SOCKET
- WORD