Laravel-apidoc-generator: Error when upgrading from 2.1.5 to 2.1.6

Created on 8 Oct 2018  路  8Comments  路  Source: mpociot/laravel-apidoc-generator

Error when I upgrade from 2.1.5 to 2.1.6.
Installed library at v2.1.5 and it worked when i run this command: php artisan api:generate --routePrefix="v1" --router="Dingo"

There was an issue with the append/prepend file implementation and after going through the issues in this repo i decided to upgrade to v2.1.6 and apon doing so, encountered an error:

laravel doc 2 1 6

I then attempted to revert my changes from 2.1.6 to 2.1.5 and got the following error
2 1 5

Could you please provide me with assistance.

Thanks in advance.

All 8 comments

After downgrade you need to remove {!! $prependMd !!} and {!! $appendMd !!} from resources/views/vendor/apidoc/documentarian.blade.php to make it working again on 2.1.5

Hi, what version of Dingo are you using?

Hi @Herchelle, your issues should be fixed now (2.1.8)

Hi @pashamesh the documentarian.blade.php file doesn't exist in my project.

After upgrading to 2.1.8 and downgrade to 2.1.5 the documentation is being generated but my routes are not being processed at all.

@shalvah upgraded back to v2.1.8 from v2.1.5(because downgrading didn't work) and the fix hasn't changed. the routes don't process any longer(i only use dingo routes), none of my code has changed, all iv done is upgrade the package and now it refuses to generate.

Im currently using:
-"dingo/api": "2.0.0-alpha2",

  • "laravel/framework": "5.6.*",

Thank you for your feedback and speedy response.

Hey @Herchelle, what happens now? Does it throw an error or simply not generate? Can you double check the command you're running? Did you pass the proper route prefix?

Hey @shalvah it generate the documentation but my routes are not being processed.

The command I'm running: php artisan api:generate --routePrefix="v1" --router="Dingo"

Yes I'm passing it the correct route prefix since the command used to work before I've upgraded to 2.1.6.

Thank you for your feedback.

Oops...I think we mistakenly released a breaking change. @Herchelle I'm guessing your API version when using Dingo is v1?
Previously, the routePrefix parameter was considered to be the API version for Dingo. I changed that to be the actual URL prefix, so that behaviour is consistent for both routers. So you should replace the --routePrefix=v1 with --routePrefix=* (or something else, like v1/* if your routes are actually prefixed by "v1").

Hey @shalvah I changed my --routePrefix from --routePrefix=* and replace it with --routePrefix=*, and this fixed my issue.

The documentation is being generated and my routes are being processed.

Thank you for your feedback and speedy response.

Was this page helpful?
0 / 5 - 0 ratings