如何将apiDoc转换为邮差收集?

问题描述:

我有一个nodejs项目,实现了许多请求并由apiDoc完善记录,我想从它创建一个Postman集合!如何将apiDoc转换为邮差收集?

> example: 

/** 
    * @api {GET} config/updates Updates - Get the latest event updates 
    * @apiGroup Config service 
    * @apiDescription This api endpoint provides the latest updates that need to be fetched by the client. It provides 
     * an array of events, based on either the latestupdate (timestamp) param, or a configured interval (currently default to 1 minute. 
... 
.. 
    */ 

可以从apiDoc创建一个邮差集合吗?

您可以将您的apiDoc导出到Swagger,然后将其导入到邮差。

1.Export到扬鞭

  • 安装此npm-package

  • NPM安装apidoc-招摇-g

  • apidoc-招摇-i示例/ -o DOC /(例如是输入并且doc是输出)

2.导入Postman

邮差支持swagger文件,所以你可以导入它没有问题,你可以阅读有关它here阅读'导入招摇'部分。

npm包可能无法正常工作,因为它似乎已过时。

+0

谢谢:D! 我检查了这个npm模块,发现代码有一些错误,但是最终我修复了它们,结果(* .json)很好。 –

+0

@KrauszLórántSzilveszter尼斯,非常欢迎和感谢:D请分享您的编辑? –

+0

https://github.com/fsbahman/apidoc-swagger/issues/34 –