Apiary: Export API as JSON, to generate client code

拜拜、爱过 提交于 2020-01-03 09:12:22

问题


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)

This should help: http://ttezel.github.io/blog/2013/02/23/stop-writing-rest-api-clients/


回答1:


There are two directions you can explore:

  • you can use Alpaca to generate client SDKs. Alpaca accepts API Blueprint as one of it's input formats

  • for more flexibility, you can use Snowcrash to parse API Blueprint into JSON - and roll your own code generator.

There are more tools around API Blueprint available at http://apiblueprint.org/



来源:https://stackoverflow.com/questions/22946662/apiary-export-api-as-json-to-generate-client-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!