问题
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