Download the PHP package axenov/pm-convert without Composer

On this page you can find all versions of the php package axenov/pm-convert. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pm-convert

Postman collection converter

Convert your Postman collections into different formats.

Very fast.
Offline.
Without 3rd-party dependencies.

These formats are supported for now: http, curl, wget.

This project has been started and quickly written in my spare time to solve one exact problem in one NDA-project, so it may contain stupid errors and (for sure) doesn't cover all possible cases according to collection schema. Feel free to propose your improvements.

Versions older than the latest are not supported, only current one is. If you found an error in old version please ensure if an error you found has been fixed in latest version. So please always use the latest version of pm-convert.

Supported features

Planned features

Install and upgrade

Make sure your ~/.config/composer/vendor/bin is in $PATH env:

Usage

Notices

  1. Result of pm-convert execution is bunch of generated files. Most likely they will contain errors such as not interpolated {{variables}} values (due to missed ones in collection), wrong command format or GETs with bodies. You must review any generated file before using.
  2. Make sure every (I mean every) collection (not collection file), its folders and/or requests has unique names. If not, you can rename them in Postman or convert collections with similar names into different directories. Otherwise any generated file may be accidently overwritten by another one.

Notes about variable interpolation

  1. You can use -e to tell where to find variables to replace in requests.
  2. You can use one or several --var to replace specific env variables to your own value.
  3. Correct syntax is --var "NAME=VALUE". NAME may be in curly braces like {{NAME}}.
  4. Since -e is optional, a bunch of --var will emulate an environment. Also it does not matter if there is --var in environment file you provided or not.
  5. Even if you (not) provided -e and/or --var, any of variable may still be overridden from collection (if any), so last ones has top priority.

Notes about conversion between Postman Schemas

You can use --v2.1 to convert v2.1 into v2.1 (and this is not a typo). Same applies to --v2.0.

There is a case when a collection has been exported via Postman API. In such case collection itself places in single root object called collection like this:

So, pm-convert will just raise actual data up on top level and write into disk.

Settings file

You may want to specify parameters once and just use them everytime without explicit defining arguments to pm-convert.

This might be done in several ways.

  1. Save this file as pm-convert-settings.json in your project directory:

    Fill it with values you need.

  2. Add --dump at the end of your command and all arguments you provided will be converted and saved as pm-convert-settings.json in your curent working directory. For example in --help file will contain this:

    If settings file already exists then you will be asked what to do: overwrite it, back it up or exit.

Once settings file saved in current you can just run pm-convert. Settings will be applied like if you pass them explicitly via arguments.

How to implement a new format

  1. Create new namespace in ./src/Converters and name it according to format of your choice.
  2. Create two classes for converter and request object which extends Converters\Abstract\Abstract{Converter, Request} respectively.
  3. Change constants values in your new request class according to format you want to implement.
  4. Add your converter class name in Converters\ConvertFormat.
  5. Write your own logic in converter, write new methods and override abstract ones.

License

You can use, share and develop this project according to MIT License.

Postman is protected legal trademark of Postman, Inc.


Disclaimer

I'm not affiliated with Postman, Inc. in any way.

I'm just a backend developer who is forced to use this javascripted gigachad-shitmonster.

So the goal of this project is to:


All versions of pm-convert with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-json Version *
ext-mbstring Version *
ext-readline Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package axenov/pm-convert contains the following files

Loading the files please wait ....