1. Download the docgen plugin and rename it
Download address : https://github.com/thedevsaddam/docgen
After the download is complete, modify the name: docgen (D:\software\docgen path can be placed under the system environment variable path / it is also OK to leave it alone)
2. Execute to obtain the generated interface document
(Not added to the system environment variable) Execute cmd in the current directory and enter docgen
Generate Interface Documentation Instructions
-
To view live HTML documents from the postman collection, use... This will open the html version of the postman collection to the defined port
docgen server -f json文件地址 -p 8000
-
View live Markown docs from the postman collection using... this will open the markdown version of the postman collection to the defined port
docgen server -f json文件地址 -p 8000 -m
-
Generate HTML documents using
docgen build -i json文件地址 -o html文件地址和文件名
-
Generate Markdown documents using
docgen build -i input-postman-collection.json -o md格式文件地址和文件名 -m
Example:
docgen server -f C:\Users\admin\Desktop\api\api.json -p 8000
docgen server -f C:\Users\admin\Desktop\api\api.json -p 8000 -m
docgen build -i C:\Users\admin\Desktop\api\api.json -o C:\Users\admin\Desktop\api\api.html
docgen build -i C:\Users\admin\Desktop\api\api.json -o C:\Users\admin\Desktop\api\api.md -m