mugennsou / postman2doc

Convert postman collection.json to markdown/html/docx.
MIT License
31 stars 8 forks source link

Failed conversion: Uncaught TypeError: null #3

Open andersonmadeira opened 5 years ago

andersonmadeira commented 5 years ago

Hello,

After trying to convert a v1.1 collection json file

postman2doc convert:docx API.my_collection.json

I receive the following error:

PHP Fatal error:  Uncaught TypeError: Argument 1 passed to App\Postman\Request::setBody() must be of the type array, null given, called in /home/user/.config/composer/vendor/mugen/postman2doc/app/Postman/Request.php on line 58 and defined in /home/user/.config/composer/vendor/mugen/postman2doc/app/Postman/Request.php:92
Stack trace:
#0 /home/user/.config/composer/vendor/mugen/postman2doc/app/Postman/Request.php(58): App\Postman\Request->setBody(NULL)
#1 /home/user/.config/composer/vendor/mugen/postman2doc/app/Postman/Request.php(42): App\Postman\Request->parseRequest(Array)
#2 /home/user/.config/composer/vendor/mugen/postman2doc/app/Postman/Item.php(70): App\Postman\Request->__construct(Array)
#3 /home/user/.config/composer/vendor/mugen/postman2doc/app/Postman/Item.php(50): App\Postman\Item->setRequest(Array)
#4 /home/user/.config/composer/vendor/mugen/postman2doc/app/Postman/Item.php(32): App\Postman\Item->parseItem(Array)
#5 /home/user/.config/composer/vendor/mugen/postman2doc/app/Postman/Item in /home/user/.config/composer/vendor/mugen/postman2doc/app/Postman/Request.php on line 92
mugennsou commented 5 years ago

Got it, I will fix it recently. Also welcome a PR.