Having used and written a number of API documentation tools over the years, I’ve found that which API documentation tools work best is always a topic of interest. Today I sorted out the 7 API documentation tools I have used, each with a detailed tutorial, there must be one you like!

SpringBoot e-commerce project mall (50K + STAR) address: github.com/macrozheng/…

Swagger

Swagger is a popular API documentation tool that helps you simplify and improve your API documentation. It was used in the Mall project.

We typically use Swagger in conjunction with SpringBoot, using tools provided to us by Springfox. You can use this tool to automatically generate API documentation from annotations, and you can debug interfaces on the generated documentation.

Since the API documentation is updated with the start of the project, the real-time quality of the API documentation is guaranteed! Springfox also provides us with Starter, which is very easy to integrate. If you are still integrating Swagger manually in SpringBoot, check out Swagger Starter. .

Project address: github.com/springfox/s…

Knife4j

Although Swagger is very useful, it has some disadvantages such as an unattractive interface and weak API debugging function, such as unverified request parameters and failure to fold when returning a bunch of JSON data. Then there are the enhancement tools on top of Swagger.

Knife4j is an enhanced UI implementation of Springfox-Swagger that provides Java developers with a concise, powerful interface documentation experience when using Swagger. Knife4j follows exactly the way springfox-Swagger is used, with enhancements, so if you’ve used Swagger, you can seamlessly switch to Knife4j.

Knife4j is like putting a new skin on Your Swagger and making it look better in no time. For more on Knife4j, see Swagger getting a new skin and Making it Look better in No time! .

Knife4j can aggregate all service documents if your project is a microservice project, see Swagger Document for microservice Aggregation, This wave is Really good! .

Project address: github.com/xiaoymin/sw…

Postman

Since Swagger’s interface debugging ability is weak, using Postman to debug is also a good solution.

Postman is an API debugging tool. You can easily test interfaces and export the debugging results for the front-end engineers. For details, see Postman: API Debugging Tool.

Of course, it is possible to view API documents in Postman, but the function is a little weak, so there is a popular combination of Swagger+Postman, specific can refer to “Swagger interface ugly, weak function how to break? Postman enhanced under the force!” .

Official website: www.postman.com/

YApi

In addition to Knife4j tools to enhance Swagger, there is also a class of tools with API document management functions, which can be deployed independently and can connect to Swagger, which is more powerful, also called API document management platform.

YApi is an efficient, easy-to-use, powerful API management platform designed to provide more elegant interface management services for developers, products and testers. YApi has accumulated 18K+Star on Github and has excellent interactive experience. YApi not only provides common interface management functions, but also provides permissions management, Mock data, Swagger data import and other functions. In short, it is very powerful!

The specific use of YApi can refer to “When Swagger meets YApi, instantly tall up!” .

Project address: github.com/YMFE/yapi

smart-doc

Swagger needs to generate API documentation with its own annotations. The code is a bit invasive, so if you want to be invasive-free, try smart-doc.

Smart-doc is an API documentation tool that generates API documentation without having to do any extra work, as long as you write code comments properly. At the same time can directly generate Postman debugging files, one key import Postman debugging, very easy to use!

Smart-doc has the same weak interface debugging capability as Swagger, so it should be used with Postman. For details, see “Still using Swagger? .

Project address: gitee.com/smart-doc-t…

Torna

Another API document management tool can be independently deployed, can build API document management platform. Not only Swagger import, but also support Postman and OpenApi imports.

Torna is a set of enterprise-class interface document solution, can be used with Swagger, refer to “When Swagger meets Torna, instantly tall!” . It has the following functions:

  • Document management: support interface document adding, deleting, modifying and searching, interface debugging, dictionary management and import and export functions;
  • Permission management: Supports the permission management of interface documents, including visitors, developers, and administrators.
  • Dual mode: the original dual mode, management mode can be used to edit the document content, browse mode is pure review of the document, the interface without other elements interference.

Project address: gitee.com/durcframewo…

Apifox

An online API document management tool, can be used with Swagger, powerful, cool interface!

Apifox is positioned as Postman + Swagger + Mock + JMeter, with API document management, API debugging, API Mock, API automated testing and other functions. You can use one tool to solve data synchronization problems that have previously been used with multiple tools. Efficient, timely and accurate!

How to use it: Replace Postman + Swagger! .

Official website: www.apifox.cn/

conclusion

If you’re just starting out with the API documentation tool, you’re sure to use Swagger. If you’re using Swagger and want a better API documentation tool, consider using Swagger with Knife4j, YApi, or Torna. If you don’t mind using API document management tools online, you can use Apifox, which is even more powerful.

In this paper, making github.com/macrozheng/… Already included, welcome everyone Star!