养蜂场:将API导出为JSON,以生成客户端代码 [英] Apiary: Export API as JSON, to generate client code
问题描述
我们都知道蜂房的岩石(或者不是.我想是的),我想知道进一步采取措施允许用户导出API的JSON描述会采取什么措施? (以便开发人员可以编写客户端代码生成脚本)
We all know that apiary rocks (or not.. I think it does), and I was wondering what would it take to take it a step further allow users to export a JSON description of the API? (So developers can script client code generation)
这应该有助于: http://ttezel.github.io/blog/2013/02/23/stop-writing-rest-api-clients/
推荐答案
您可以探索两个方向:
-
您可以使用 Alpaca 生成客户端SDK.羊驼毛接受API蓝图作为输入格式之一
you can use Alpaca to generate client SDKs. Alpaca accepts API Blueprint as one of it's input formats
为获得更大的灵活性,您可以使用 Snowcrash 将API蓝图解析为JSON-然后滚动您自己的代码生成器.
for more flexibility, you can use Snowcrash to parse API Blueprint into JSON - and roll your own code generator.
这篇关于养蜂场:将API导出为JSON,以生成客户端代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!