Generate HTML API documentation from a postman collection. You can use this tool to auto-generate the documentation and host it alongside your API's as detailed here.
Download the latest release of the executable from here.
Open a new terminal and call the executable with the parameter -h to see the help info
To generate documentation using a postman collection, use the following command -
./postman_doc_gen [path/to/collection] -o [path/to/output/folder]
To apply environment values to the examples, use the following command -
./postman_doc_gen [path/to/collection] -o [path/to/output/folder] -e [path/to/environment/json]
To enable download links to the collection and environment files, use the following command -
./postman_doc_gen [path/to/collection] -o [path/to/output/folder] -e [path/to/environment/json] -d true
The output folder should now show the following -
python -m venv venv
source ./venv/bin/activate
pip install -r requirements.txt
python postman_doc_gen.py [path/to/collection] -o [path/to/output/folder]
pyinstaller postman_doc_gen.spec postman_doc_gen.py
Note: If you get the following error when running the pyinstaller command
OSError: Python library not found: libpython3.7.dylib, .Python, libpython3.7m.dylib, Python, Python3
then you need to re-install python on your machine with enable-shard & recreate the virtual environment
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.7.14
A video of the sample html document generated using the collection and environment json files present in the example folder
The following tools/repos have been instrumental in building this tool