33

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.

1

4 Answers 4

40

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.

5
  • 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, 2016 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. May 17, 2017 at 8:36
  • 2
    @DavideVernizzi it seems that the app is not supporting recent Postman format v2 and v2.1... Jun 1, 2018 at 8:26
  • none of above works currently with lates version v2 or v3
    – Vladd
    Jun 4, 2019 at 12:23
  • 1
    Yet another possibility: github.com/thedevsaddam/docgen
    – W1M0R
    Nov 18, 2020 at 8: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.

3
  • Only problem i have postmanerator ignoring request body completely :/
    – Sojtin
    Sep 18, 2019 at 20:49
  • 1
    I am not able to find binary for mac os Jan 2, 2020 at 12:06
  • 1
    This inspired me to create my own version of a document generator. For anyone else still looking for tool - github.com/karthiks3000/postman-doc-gen May 8, 2020 at 16:08
-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/

2
  • Perhaps this worked at one time for Postman 1.0, but it doesn't appear to work for Postman 2.0. Sep 12, 2019 at 23:13
  • This one supports multiple envs and multiple collections on Postman v2.1 github.com/azvyae/dokunext Jul 12 at 16:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.