0.0.9 • Published 3 years ago

postman-to-swagger v0.0.9

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

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

0.0.9

3 years ago

0.0.3

3 years ago

0.0.8

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

1.0.2

4 years ago

1.0.0

5 years ago