文章目录
- 必备知识
- 选型方案 1:SpringFox
- 选型方案 2:springdoc-openapi
- 选型方案 3:Knife4j
- 方案对比
- 相关博文
😂 背景
- 老项目是 SpringMVC 框架,使用的是 SpringFox 2.8.0 实现的 API 文档。
- 新项目是 SpringBoot 3.x 框架,发现 SpringFox 已经停更了,故有了此次 API 文档的技术选型工作。
😎 本节目标:调研 API 文档实现框架,并对其进行技术选型,找到合适的 API 文档框架。
必备知识
**1、 常说的 Swagger2 是啥?**即 Swagger RESTful API Document Specification,也就是下面的 OAS 2.0 版本(2014-09-08 发布)。
**2、OAS 是什么?**即 Open Api Specification,即 RESTful API 的世界标准。
**3、OpenAPI 规范有哪些版本?**具体修订历史如下:
Version | Date | Notes |
---|---|---|
3.1.0 | 2021-02-15 | Release of the OpenAPI Specification 3.1.0 |
3.1.0-rc1 | 2020-10-08 | rc1 of the 3.1 specification |
3.1.0-rc0 | 2020-06-18 | rc0 of the 3.1 specification |
3.0.3 | 2020-02-20 | Patch release of the OpenAPI Specification 3.0.3 |
3.0.2 | 2018-10-08 | Patch release of the OpenAPI Specification 3.0.2 |
3.0.1 | 2017-12-06 | Patch |