Socket
Socket
Sign inDemoInstall

postman-to-swagger

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postman-to-swagger

CLI tool to convert Postman collection to swagger (OpenAPI) by providing Postman API key, collection Id and output swagger into file or std-out. Wrapping [`postman-to-openapi`](https://github.com/joolfe/postman-to-openapi) package to make it easier to be


Version published
Maintainers
1
Created
Source

postman-to-swagger

CLI tool to convert Postman collection to swagger (OpenAPI) by providing Postman API key, collection Id and output swagger into file or std-out.
Wrapping postman-to-openapi package to make it easier to be used with Postman collections.

Features:

  1. ⭐️ Handles fetching of remote (cloud stored) Postman collection, format correction and conversion to Swagger file
  2. Supports specifying local file or skipping download (reusing downloaded collection)
  3. Wraps postman-to-openapi to simplify conversion process and cleanup collection json to avoid redundant errors

Use:

Run without installing:

$ npx postman-to-swagger --postmanApiKey="<key>" --collectionId="<colId>" --output="./output.yml" -q

Install globally:

$ npm install -g postman-to-swagger
$ postman-to-swagger --postmanApiKey="<key>" --collectionId="<colId>" --output="./output.yml" -q

Options:

Usage:
    $ postman-to-swagger <input>

    Options:
    -h                  Display help
    -q                  Quite mode, outputs only swagger result
    --postmanApiKey     Postman API key to retrieve the collection
    --collectionId      Postman collection ID
    --input             Specify path to local Postman collection json, will skip downloading via API
    --output            Specify path for the output swagger yaml
    --skipDL            Skip downloading, will reuse locally cached collection

    Example:
    $ postman-to-swagger --postmanApiKey="<key>" --collectionId="<colId>" --output="./output.yml" -q

Develop:

Build:

$ yarn build

Watch & Build:

$ yarn watch

Run tests:

$ yarn test

Debug:

Select 'typescript' debug configuration, open file in vscode (to run it specifically) and run debugger

or:

Select 'Node Attach' debug configuration, run specific file in debug mode (you can pass also args):

$ node --inspect build/Main.js


Scaffolded with 🏗 TS-scaffold

FAQs

Package last updated on 25 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc