post2swag

0.0.2 • Public • Published

post2swag

CLI tool to convert Postman collection to swagger (OpenAPI) by providing Postman API key, collection Id and output swagger into file or std-out.

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:

$ post2swag --postmanApiKey="<key>" --collectionId="<colId>" --output="./output.yml" -q

Options:

Usage:
    $ post2swag <input>

    Options:
    -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

    Example:
    $ post2swag --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

Readme

Keywords

none

Package Sidebar

Install

npm i post2swag

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

33.8 kB

Total Files

25

Last publish

Collaborators

  • livshitz