First of all, now you can convert a collection manually exported from Postman UI. Until this commit, any collection json had to be inside of root 'collection' object. Postman API returns collections in a such way and that was my case. So any collection exported using UI was mistakenly not detected as correct one. The second thing that it is now possible to convert collections from v2.1 to v2.0 using --v2.0 flag. Even if they are exported via Postman API, of course. Also some important refactorings are here.
22 lines
388 B
PHP
22 lines
388 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace PmConverter;
|
|
|
|
enum HttpVersion: string
|
|
{
|
|
case Version10 = '1.0';
|
|
case Version11 = '1.1';
|
|
case Version2 = '2';
|
|
case Version3 = '3';
|
|
|
|
public static function values(): array
|
|
{
|
|
return array_combine(
|
|
array_column(self::cases(), 'name'),
|
|
array_column(self::cases(), 'value'),
|
|
);
|
|
}
|
|
}
|