kielabokkie / blueman

Convert a generated API Blueprint JSON file into a Postman collection
MIT License
149 stars 19 forks source link

PHP Notice: Undefined variable: convertedUri in ConvertCommand.php:172 #4

Open razvanphp opened 10 years ago

razvanphp commented 10 years ago

Hello,

For some of our endpoints we get those errors:

PHP Notice:  Undefined variable: convertedUri in phar:///usr/local/bin/blueman/vendor/pixelfusion/blueman/src/Blueman/Console/Command/ConvertCommand.php on line 172
PHP Warning:  Invalid argument supplied for foreach() in phar:///usr/local/bin/blueman/vendor/pixelfusion/blueman/src/Blueman/Console/Command/ConvertCommand.php on line 161

Do you have any clue why? In any case, your code should initialize the variable so the notice is avoided.

kielabokkie commented 10 years ago

Can you give me an example markdown of one of the endpoints that gives you these notices and warnings?

kielabokkie commented 9 years ago

Hi @razvanphp, can you update (e.g. blueman self-update) to the latest version (v1.1.3) and check if this problem is solved for you?

razvanphp commented 9 years ago

Hey @kielabokkie, now some of the errors are gone, but we still get this one:

PHP Notice: Trying to get property of non-object in phar:///usr/local/bin/blueman/vendor/pixelfusion/blueman/src/Blueman/Console/Command/ConvertCommand.php on line 198

Thanks for the support!

kielabokkie commented 9 years ago

Hi @razvanphp, if you can give me an example markdown file with the endpoint that fails then that would be great so I can test it.

razvanphp commented 9 years ago

Hey @kielabokkie, here it is, sorry for the delay.

http://pastebin.com/Lccky11Y

kielabokkie commented 9 years ago

Thanks @razvanphp, I see what the issue is now. This error occurs when your endpoint has query parameters but you haven't described those under the parameters part of your API blueprint.

I think I will make it so it shows a nice warning telling you what parameters haven't been described for which endpoint so you can update your documentation (as it is important to document those too ;)).