Giter Club home page Giter Club logo

postman-doc-gen's Introduction

postman-doc-gen

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.

Usage

  • 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 Screenshot

  • To generate documentation using a postman collection, use the following command -

    ./postman_doc_gen [path/to/collection] -o [path/to/output/folder] 
    

    Screenshot

  • 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]
    

    Screenshot

  • 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
    

    Screenshot

  • The output folder should now show the following -

    1. index.html - this is the html documentation generated from the collection
    2. css - this is the css folder consisting of the necessary css files
    3. js - this is the javascript folder consisting of the required js files
    4. collection json - if the download option was enabled, the collection json is also copied
    5. environment json - if the download option was enabled and an env file provided, the env json is also copied

To build locally

  • Clone the repository
  • Download Python 3.7
  • Create a virtual env (recommended but optional)
    python -m venv venv
    source ./venv/bin/activate
    
  • pip install the dependencies from the requirements file
    pip install -r requirements.txt
    
  • run the code
    python postman_doc_gen.py [path/to/collection] -o [path/to/output/folder] 
    
  • to create a new executable
    pyinstaller -F postman_doc_gen.spec postman_doc_gen.py
    

Sample HTML Documentation

A video of the sample html document generated using the collection and environment json files present in the example folder

Sample HTML

Shout outs

The following tools/repos have been instrumental in building this tool

postman-doc-gen's People

Contributors

karthiks3000 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.