使用swagger或任何其他工具生成Rest API文档 [英] Generating Rest API documentation using swagger or any other tool

查看:198
本文介绍了使用swagger或任何其他工具生成Rest API文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种记录我的Rest API的方法。
我的服务器是Tomcat / Spring服务器,Rest API是使用Jenkins实现的。

I am looking for a way to document my Rest APIs. My server is a Tomcat/Spring server and the Rest APIs are implemented using Jenkins.

Swagger似乎是一个非常酷的解决方案,但我无法想象我如何使用它与我的代码。我正在寻找创造json swagger的最好方法 - ui可以阅读 - 我该怎么做?

Swagger seems to be a pretty cool solution but i can't figure out how i can use it with my code. I am looking for the best way to create the json swagger-ui can read - how i should do that?

另外,我很乐意检查任何其他好的解决方案用于在这样的环境中记录Rest API。

Also, i would be happy to check any other good solutions for documenting Rest APIs in such environment.

推荐答案

我没有试过招摇,但你可以试试发音。它可以生成JAX-RS端点的文档,作为javadoc阶段的一部分。 发表页面

I haven't tried swagger but you may try enunciate. It can generate documentation of JAX-RS endpoints as a part of javadoc phase. Some examples of generated documentation are available on enunciate page

更新

项目已移至 http://enunciate.webcohesion.com/ ,即将发布的2.0版将支持java 8。

Project has been moved to http://enunciate.webcohesion.com/, java 8 will be supported by upcoming version 2.0.

这篇关于使用swagger或任何其他工具生成Rest API文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆