32

I've developed a pretty extense API, and I have it on Postman, which works pretty nice. Now I have to generate an html doc to keep it versioned inside /docs along with my sources.

Is there a tool or a way to achieve this? I really don't want to write all this documentation. Sharing the postman collection is not an option.

danielrvt
  • 10,177
  • 20
  • 80
  • 121
  • 1
    Here is mine, which generates `.md` files through python script https://github.com/Avinash-Raj/docs-from-POSTMAN – Avinash Raj May 06 '16 at 12:22

4 Answers4

39

I recently had the same problem and I did not find anything. So I created a simple tool to do it. It is a very basic javascript application written with react.js. At the moment it is very basic, but I'm working on it, so any feature request is welcome.

You can use it for free at: http://www.vernizzis.it/docman/

Plus you can get the code and modify it at: https://github.com/davidevernizzi/docman

Any comment is more than welcome.

UPDATE1: looking around I also found this project: https://github.com/JakeWorrell/docodile and this feature request: https://github.com/a85/POSTMan-Chrome-Extension/issues/204

UPDATE2: the feature request (see UPDATE1) has been closed and the possibility of creating documentation has been added to Postman cloud. Here is the feature request closing comment:

This is available as part of Postman Cloud: http://blog.getpostman.com/2015/12/10/introducing-postman-cloud/. Cloud hosts, updates and maintains documentation for everyone. I'd suggest http://docman.launchrock.com/ and https://github.com/JakeWorrell/docodile for generating one-time documentation from Collections.

Davide Vernizzi
  • 1,327
  • 17
  • 25
  • 8
    Looks like a great project. However its a bit ironic that a tool to generate documentation has no documentation on how to use it. When you say paste your postman collection what exactly do you mean? – Chakaitos Feb 16 '16 at 20:35
  • Postman collections can be exported as a JSON file, which you can obtain on Postman v4.10.7 through clicking the `...` button on your collection and then `Export`. The raw JSON content of this file can then be pasted onto @DavideVernizzi 's documentation generation tool. – Pierre Thalamy May 17 '17 at 08:36
  • 2
    @DavideVernizzi it seems that the app is not supporting recent Postman format v2 and v2.1... – loretoparisi Jun 01 '18 at 08:26
  • none of above works currently with lates version v2 or v3 – Vladd Jun 04 '19 at 12:23
  • 1
    Yet another possibility: https://github.com/thedevsaddam/docgen – W1M0R Nov 18 '20 at 08:31
24

I know this is an old question and you probably found a solution by now, but still you might be interested by Postmanerator: https://github.com/aubm/postmanerator

Basically, this is how you use it from the command line:

postmanerator -collection=/path/to/your/collection.js -output=/path/to/doc.html

To get it installed, download the latest Github release. You need to pick the appropriate binary depending on your system. Then place it somewhere in your PATH.

See the documentation in the README if you want additionnal information. From there you will find recommandations for taking full advandage of the tool, or change the look of your documentation by using custom themes.

The Github presentation also provides a reference to a generated example documentation.

You will also discover how you can take advantage of a CI platform like Travis, to automate the generation and the publication of your documentation with Postmanerator.

As this is an open source project I'm currently working on, feel free to submit issues on Github if you have any ideas that can make it better.

kendo5731
  • 243
  • 2
  • 5
-1

You can install Newman using command "npm install -g Newman" and then run the command "newman run CollectionName.json -e envVar.json" from the location where you have saved your collection, where CollectionName.json is your collection name and enVar.json is the set of environment variables. This will generate html report in the same folder. One prerequisite is to have node js installed.

-2

You can also try the free tool that I made. It provides the documentation in .txt but you can convert it to pdf using your browser.

https://postmandoc.herokuapp.com/