smart-doc 是一款同时支持 JAVA REST API 和 Apache Dubbo RPC 接口文档生成的工具,smart-doc 利用接口泛型和 javadoc 注释自动分析生成 api 接口文档,不采用任何注解侵入到业务代码中。只需要在项目中引入 smart-doc 提供的 maven 或者是 gradle 插件,然后按照规范写好 javadoc 注释即可生成 api 文档。同时 smart-doc 也支持生成 openapi 和 postman 这些规范的文档,生成后可以直接导入相关工具做测试。

目前在国内已被小米、科大讯飞、同程旅行、快手、马蜂窝、顺丰等知名公司所使用。

仓库地址

https://github.com/TongchengOpenSource/smart-doc

重要更新内容

  • 更新 SolonRequestMappingHandler.java。由 @aqnghu 在 https://github.com/TongchengOpenSource/smart-doc/pull/849 提交
  • 功能:添加 Grpc 支持。由 @linwumingshi 在 https://github.com/TongchengOpenSource/smart-doc/pull/851 提交
  • 功能:添加 WebSocket 的 HTML 和 ASCII 文档支持。由 @linwumingshi 在 https://github.com/TongchengOpenSource/smart-doc/pull/855 提交
  • 修复:解决使用 Dubbo RPC或 @javadoc标签覆盖父类或接口但没有 Javadoc 注释时生成的接口文档缺乏描述信息的问题。由 @linwumingshi 在 https://github.com/TongchengOpenSource/smart-doc/pull/866 提交
  • 功能:添加对带有枚举类型键的 Map 的支持。由 @linwumingshi 在 https://github.com/TongchengOpenSource/smart-doc/pull/870 提交
  • 功能:添加对 @JsonView的支持。由 @linwumingshi 在 https://github.com/TongchengOpenSource/smart-doc/pull/875 提交
  • 依赖项更新:将 org.eclipse.jgit:org.eclipse.jgit 从 5.13.2.202306221912-r 升级到 5.13.3.202401111512-r。由 @dependabot 在 https://github.com/TongchengOpenSource/smart-doc/pull/782 提交
  •  依赖项更新:将 org.slf4j:slf4j-api 从 2.0.13 升级到 2.0.16。由 @dependabot 在 https://github.com/TongchengOpenSource/smart-doc/pull/885 提
  • 依赖项更新:将 com.ibeetl:beetl 从 3.16.2.RELEASE 升级到 3.17.0.RELEASE。由 @dependabot 在 https://github.com/TongchengOpenSource/smart-doc/pull/886 提交
  •  依赖项更新:将 org.apache.maven.plugins:maven-gpg-plugin 从 3.2.4 升级到 3.2.5。由 @dependabot 在 https://github.com/TongchengOpenSource/smart-doc/pull/887 提交
  • 依赖项更新:将 org.junit.jupiter:junit-jupiter 从 5.10.2 升级到 5.11.0。由 @dependabot 在 https://github.com/TongchengOpenSource/smart-doc/pull/888 提交
  • 功能:添加对WebSocket消息和响应参数的支持。由 @linwumingshi 在 https://github.com/TongchengOpenSource/smart-doc/pull/882 提交
  • 修复(RPC):修复构造 RPC 时发生的 ClassCastException 错误。由 @xiangganLuo 在 https://github.com/TongchengOpenSource/smart-doc/pull/890 提交
  • 增强: 增强 IJavadocDocTemplate,为方法文档添加泛型支持。由 @linwumingshi 在 https://github.com/TongchengOpenSource/smart-doc/pull/891 提交

本次主要新增了gRPC协议接口文档的支持,对于在Java项目中实现的gRPC可以轻松生成接口文档,优化和完善了WebSocket文档,支持在文档中展示WebSocket的Message参数和相应参数。

当然无论是gRPC还是WebSocket都都属于近期版本才做的支持, 对它们的标准化支持社区也是在摸着石头过河,我们也需要用户不断的反馈和迭代完善,因此欢迎社区用户多给我们提优化意见和测试用例。

新增贡献者

非常感谢上面的贡献者积极的参与社区贡献。

致谢

感谢 @linwumingshi 同学在本次的版本迭代种提供了对gRPC协议的支持

免责声明:本文系转载,版权归原作者所有;旨在传递信息,不代表一休教程网的观点和立场。