Postman文档导出


生成markdoown

推荐一个postman导出markdown的方法:
(1.)打开postman,点击导出

(2.)选择conllection2 ,或者2.1

(3.) 安装pip for python2.7

sudo apt update
sudo apt install python-pip
pip --version

pip install postdown

(4.) 转换json到markdown

postdown xxx.json xxx.md

(5.)将md部署到mindoc上
mindoc安装
mindoc安装

docgen使用

(1.)下载源代码

go get -u github.com/thedevsaddam/docgen  //依赖于go环境

(2.)进入docgen目录

./build.sh  //编译代码

(3.)生成二进制文件

linux_amd64  //linux
window_amd64.exe  //windows

(4.)全局使用,将二进制文件,拷贝到path中

cp ./linux_amd4 /usr/local/bin/docgen

(5.)执行如下命令

// postman导出的json 到页面展示
docgen server -f xxx.postman_collection.json -p 8000

// postman导出的json到markdown展示
docgen server -f input-postman-collection.json -p 8000 -m

// postman导出的josn 转为为html文件
docgen build -i input-postman-collection.json -o ~/Downloads/index.html

//postman导出的json文件 转化为markdown文件
docgen build -i input-postman-collection.json -o ~/Downloads/index.md -m

相关链接

https://github.com/TitorX/Postdown
https://github.com/thedevsaddam/docgen


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM