Sign inSign up

philproctor/swagger2postman-cli

By philproctor

Updated almost 8 years ago

Generate postman collections from Swagger

Image
0

232

philproctor/swagger2postman-cli repository overview

swagger2postman-cli

A Docker based utility for converting swagger (OpenAPI v2) documents to postman collections

swagger2postman-cli: Tool for converting Swagger v2 (OpenAPI v2) documents to postman collections.
Intended to run with Docker!

Usage:
docker run --rm --user $UID:$UID -v $PWD:/opt philproctor/swagger2postman-cli <flags>

Flags:
      --file                      The input filename to use.
      --output                    The base output name to use for generated collections
      --env.<name>.<var>          Generate output for environment <name>. Ensure <var> is set to this value
      --header.<name>             Globally set this header to the value specified
      --basepath                  Set the variable name to use for basepath instead of using the definition
      --pretty                    Pretty-print the JSON output
      --prerequest.global         Global prerequest script to use in generated collection
      --apikey                    API Key to used for uploading collection to Postman servers. Requires --collection
      --collection                Collection ID to update. Requires --apikey

e.g.
docker run --rm --user $UID:$UID -v $PWD:/opt philproctor/swagger2postman-cli \
'--env.Dev Environment.host=localhost' --file=swagger.json '--header.Accept=application/json' \
'--header.Content-Type: application/json' --output=petstore

swagger2-postman-generator is used to generate the Postman environments.

swagger2postman2 is used to generate collections.

Tag summary

Content type

Image

Digest

Size

31.8 MB

Last updated

almost 8 years ago

docker pull philproctor/swagger2postman-cli