Leave a Comment
postman生成文档
方案一:使用postman自带的文档

直接右键就可以找到
方案二:导出json文件,通过其他方式生成
1.导出接口json文件


这里选择v2.1版本 。
2.下载docgen Releases · thedevsaddam/docgen (github.com)
将下载的docgen 保存为docgen.exe , 和导出的postman.json文件放在同一文件夹下。然后执行命令 , 这里我选择生成markdown
-- 生成markdown
./docgen build -i .\postman.json -o ./index.md -m
-- 生成html
./docgen build -i .\postman.json -o ./index.html
如果只需要markdown 或者 html 可以到此结束了 。 我需要对markdown文件改一改然后再生成word, 所以有了一下步骤 。
3.下载pandoc https://github.com/jgm/pandoc/releases/tag/2.11.0.2
执行命令:
./pandoc index.md -o test.docx