Using docGen on Windows to Generate Postman API Documentation

Recently, I was building a Node API and was using Postman to help me get my routes and documentation etched out. As I neared the end of the project I knew I wanted to use docGen to generate a index.html for my API. But I couldn’t quite get docGen to work like how I saw others using it. I found out it is a tad different on a Windows machine.

Here was my fool proof solution….

Postman is a popular API client that makes it easy for developers to create, share, test and document APIs. This is done by allowing users to create and save simple and complex HTTP/s requests, as well as read their responses. The result — more efficient and less tedious work.

docGen transforms your postman collection to HTML/Markdown documentation.

  1. Make sure you export your Postman documentation to your local machine. There are many good tutorial for this located on the web.
  2. You have to download the Windows binary for docGen.

4. Make sure the docGen binary and the Postman documentation export are located in the same folder.

5. cd into that folder

The problem I had was the terminal command I saw everyone else use which was….

docgen build -i input-postman-collection.json -o ~/Downloads/index.html

This didn’t work on my windows machine. Instead of docgen build I had to use the name of the binary I had previously downloaded. As such….

windows_amd64 build -i API.postman_collection.json -o index.html

The result….A beautifully formatted index.html



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store