通过 gem 的 API 文档

发布于 2024-12-28 09:52:31 字数 1539 浏览 2 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

谜泪 2025-01-04 09:52:31

就 gems 而言, apipie-rails 很好。它本身不会自动检测更改,但它确实有一个简单的注释性语法。您可以根据测试自动生成文档,并且它为重复使用的参数组等内容提供了一些 DRY 帮助。

现在,我们来看看完全不同的东西...... apiary 为您提供了很多基于 Markdown 蓝图的好东西您的 API(维护在您的存储库的根目录中)。考虑到养蜂场然后提供文档、代码示例、社区评论,甚至如果您需要的话,还可以提供代理 API 服务器,维护蓝图并不是一个可怕的代价。

As far as gems are concerned, apipie-rails is nice. It won't automatically detect changes per se, but it does have a simple, annotative syntax. You can generate documentation automatically based on your tests, and it has provides some DRY help for things like param groups that are used repeatedly.

And now for something completely different... apiary gives you a lot of goodies based on a markdown blueprint of your API (maintained at the root of your repo). Maintaining the blueprint isn't a terrible price to pay considering apiary then provides documentation, code samples, community commenting, and even a proxy API server if you want.

栀子花开つ 2025-01-04 09:52:31

这是我所知道的最接近的东西,但它不是一个附加的 gem,而是一个用于构建 API 的工具,其中包含文档:

This is the closest thing I'm aware of, but it's less of an add-on gem and more of a tool for building your API with documentation baked in: https://github.com/mattetti/Weasel-Diesel

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文