您如何记录 REST API? [英] How do you document a REST API?

查看:37
本文介绍了您如何记录 REST API?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您如何记录 REST API?不仅仅是关于资源是什么的文档,而是真正在请求中发送的数据是什么以及在响应中返回的数据是什么.知道某些东西期望发送 XML 并返回 XML 是不够的;或 JASN;管他呢.你如何记录请求中发送的数据和响应中发回的数据?

How do you document a REST API? Not just the documentation of what the resources are, but really what is the data that gets sent in the request and what the data is that gets sent back in the response. It is not useful enough to know that something expects XML to be sent and returns XML; or JASN; or whatever. How do you document the data that gets sent in the request and the data sent back in the response?

目前我能找到的最好的是 Enunciate 工具,您可以在其中记录 REST API 和数据元素.Enunciate 是用于此的正确类型的工具吗,我是否错过了提供此功能的任何其他工具,我应该查看一下?

Best I could find so far is the Enunciate tool where you can document your REST API and the data elements. Is Enunciate the right type of tool for this and am I missing out on any other tools that offer this that I should look at?

我的 REST API 的使用者可以是 Python、Java、.NET 等任何语言

Consumers of my REST API can be in any language python, Java, .NET, etc

推荐答案

我为我的项目决定的方法是 Enunciate.似乎是 REST API 文档的事实上的标准.

The approach that I've decided on for my project is Enunciate. Seems to be the de facto standard for REST API documentation.

这篇关于您如何记录 REST API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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