Laravel-apidoc-generator: php artisan api:generate ignores the updated blade files in resources/views/vendor/apidoc

Created on 9 Mar 2018  路  4Comments  路  Source: mpociot/laravel-apidoc-generator

I have a hard time updating the info.blade.php file. It ignores the updated blade files in resources/views/vendor/apidoc completely

How to reproduce the problem:

  1. Edit the files in resources/views/vendor/apidoc/partials/info.blade.php, add some texts
  2. Clear the cache
php artisan cache:clear 
  1. Clear the compiled blade views
php artisan view:clear
  1. Regenerate the api documentation
php artisan api:generate --routePrefix="api/v1/*" --force

The changes in the info.blade.php will not reflect on http://localhost/docs/

bug help wanted

Most helpful comment

Workaround:

I created a shell script to tackle the problem

#!/bin/bash
THEPATH="resources/views/vendor/apidoc"
mv ${THEPATH}/documentarian.blade.php ${THEPATH}/documentarian.blade.php.bak

echo "" >> ${THEPATH}/documentarian.blade.php

php artisan view:clear --quiet
php artisan api:generate --routePrefix="api/v1/*" --force --quiet

mv ${THEPATH}/documentarian.blade.php.bak ${THEPATH}/documentarian.blade.php

php artisan view:clear
php artisan api:generate --routePrefix="api/v1/*" --actAsUserId=4 --noResponseCalls

All 4 comments

Workaround:

I created a shell script to tackle the problem

#!/bin/bash
THEPATH="resources/views/vendor/apidoc"
mv ${THEPATH}/documentarian.blade.php ${THEPATH}/documentarian.blade.php.bak

echo "" >> ${THEPATH}/documentarian.blade.php

php artisan view:clear --quiet
php artisan api:generate --routePrefix="api/v1/*" --force --quiet

mv ${THEPATH}/documentarian.blade.php.bak ${THEPATH}/documentarian.blade.php

php artisan view:clear
php artisan api:generate --routePrefix="api/v1/*" --actAsUserId=4 --noResponseCalls

PRs to fix this are welcome!

I think the api:update command introduced to fix this (see https://github.com/mpociot/laravel-apidoc-generator#modify-the-generated-documentation)

This doesn't seem to fix the problem unfortunately. Still not updating it with the recent blade files.

Was this page helpful?
0 / 5 - 0 ratings