Name
Last commit
Last update
assets init demo
demo update
.editorconfig 新增批量
README.md update upms

logo

API Blueprint

方便设计API的文档规范

slack

在进行微服务开发的过程中,为了保证最终开发的系统跟最初的设计保持一致,约定RESTful接口之间的调用方法,我们需要将API设计文档化,因此我们引入了API Blueprint

API Blueprint 是什么

API Blueprint 用来编写API文档的一种标记语言,类似于Markdown,因为是纯文本的,所以方便共享编辑,具体的语法规则可以在 API Blueprint documentation 查看,配合一些开源的工具可以把接口文档渲染成 html 再搭配一个静态服务器,方便于分享。

另外,配合一些工具,可以直接生成一个 mock data 数据,这样只要和后端的同学约定好接口格式,那么前端再开发的时候可以使用 mock data 数据来做测试,等到后端写好接口之后再做联调就可以了。

设计

https://apiblueprint.org/documentation/

安装

$ npm install -g aglio

生成

$ aglio -i demo/index.apib -o demo/index.html