Swagger document optimization knife4j enhancement Swagger

swagger saves programmers the time to write interface documents in the development process. It is an indispensable tool for team development. The native swagger interface has fewer functions and does not support document export. There are also many plug-ins optimized for swagger document interface in the industry. , Good and bad, choose one with more powerful function to recommend: knife4j
official website address: https://doc.xiaominfo.com/knife4j/documentation/

Add maven reference to the project

  <dependency>
            <groupId>com.github.xiaoymin</groupId>
            <artifactId>knife4j-spring-boot-starter</artifactId>
            <version>3.0.2</version>
        </dependency>

View after startup

Insert picture description here

Swagger provides a relatively poor interface experience. There are two commonly used solutions to enhance Swagger:

YApi: YApi is a visualized interface management platform that can be deployed locally, open up front and back ends, and QA. It can help us make the swagger page experience more friendly. At present, many large companies are using this open source tool. Project address: https://github.com/YMFE/yapi. How to use it: When Swagger meets YApi, it instantly becomes taller!

Knife4j: An enhanced solution for Swagger to generate Api documents, formerly swagger-bootstrap-ui. Official documentation: https://xiaoym.gitee.io/knife4j/documentation/.

According to the official website, knife4j is an enhanced solution to generate Api documents for the Java MVC framework integrated with Swagger.

Project address: https://gitee.com/xiaoym/knife4j.

Guess you like

Origin blog.csdn.net/keep_learn/article/details/111313399