生成 REST API 文档的最佳方法是什么? [英] What's the best way to generate a REST API's documentation?

查看:33
本文介绍了生成 REST API 文档的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种为 REST API 生成文档的好方法.它不需要实际连接代码或任何东西,但是能够将文档编写为文本文件,将工具指向它并从中生成一些文档,这真是太棒了.

I'm looking for a nice way to generate documentation for a REST API. It doesn't need to actually connect with the code or anything, but it'd be awesome to be able to write the documentation as text files, point the tool at it, and generate some docs from it.

有人有什么想法吗?我知道我有点含糊,但老实说,我不太确定我在这里寻找什么——主要是一种管理文档的简单方法.

Anyone out there have any ideas? I know I'm being a bit vague, but, to be honest, I'm not quite sure what I'm looking for here--mainly an easy way to manage documentation.

推荐答案

据罗伊说:

"A REST API should spend almost all of its descriptive
 effort in defining the media type(s) used for representing
 resources and driving application state, or in defining
 extended relation names and/or hypertext-enabled mark-up
 for existing standard media types."

自我描述性是 REST 的优势之一.

Self-descriptiveness is one of the benefits of REST.

这篇关于生成 REST API 文档的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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