Laravel-apidoc-generator: Generated docs missing styles

Created on 23 Jan 2017  路  14Comments  路  Source: mpociot/laravel-apidoc-generator

Outof box this is how it looks like for laravel 5.3:
http://i.imgur.com/EgPohXf.png
Styles missing.

I have executed following commands:
1) php artisan api:generate --routePrefix="api/v1/*" to generate docs
2) php artisan serve to serve content

bug

Most helpful comment

you can go to {your url}/docs/ , if you go to {your url}/docs without the / then the problem appear again

All 14 comments

I have the same problem

How did you run the html file? In my opinion the html file tried to load the css files but the path did not match.

I had the same issue. In my case, the issue seems to triggered because of remaining annotations from an old package in my controllers which were not valid.

Do you still have this issue? Can you tell me the path where the css points to?

I have the same issue, paths as seen in this image:
screen shot 2017-03-14 at 09 45 11

I fixed the problem as follows: php artisan vendor:publish.
Documentation will be available on localhost/docs/

I have the same problem. Is there any way to tell the generator to generate:

<link rel="stylesheet" href="docs/css/style.css" />

instead of

<link rel="stylesheet" href="css/style.css" />

Thanks

Please anyone solve this issue yet????

+1

Missing --output="public/docs" ?
Missing (.htaccess) trailing slash?

These were my solutions.

you can go to {your url}/docs/ , if you go to {your url}/docs without the / then the problem appear again

Try rm -rf {path}/docs
then run php artisan api:generate --routePrefix="api/v1/*" again.

In my case, this issue happened because when i run the api:generate, it will excecuted this code:

...
if (! is_dir($outputPath)) {
    $documentarian->create($outputPath);
}
...

So when the docs folder still there, it will not regenerate/recreate the assets

Do you still have this issue?

The paths are defined inthe Documentarian package (https://github.com/mpociot/documentarian/), so I'll close this here.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Herchelle picture Herchelle  路  8Comments

Jaspur picture Jaspur  路  8Comments

shalvah picture shalvah  路  5Comments

Humni picture Humni  路  6Comments

nikosv picture nikosv  路  3Comments