Skip to content

niveussolutions/Swagger-tool

Repository files navigation

Getting Started

This Node.js tool generates Swagger documentation from a Postman collection.

Prerequisites

Make sure you have Node.js and NPM installed. If not, you can follow these installation guides:

Installation

Follow these steps to install the tool on your local system:

  1. Clone the repository:

    git clone https://github.com/niveussolutions/Swagger-tool.git
  2. Change to the cloned repo directory:

    cd Swagger-tool
  3. Install all dependencies:

    npm install

To run using User Interface

  1. Run the following command:

    npm run swagger-ui
    • Upload your Postman collection:

      Upload Postman Collection

    • Copy your Swagger output:

      Copy Swagger Output

To run using CLI

  1. Specify the location of your Postman collection, the destination path, and the name of your Swagger document. Run the project with:

    npm run swagger-converter "your_postman_collection_path" "your_output_file_path"

    Example:

    npm run swagger-converter "/home/niveus/Downloads/example.postman_collection.json" "/home/niveus/Downloads/example_output.yaml"

    Run CLI

NOTE:

  1. Ensure that your requests are beautified (you can use the beautify option in Postman), and all Postman requests should be in a single folder, not grouped within the main folder.

  2. Before using the tool, update it once by running the following command within the Swagger-tool directory:

    npm run updateTool

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published