Laravel swagger api-docs json file not found

Viewed 10013

Hello i am trying to add swagger into my laravel project.

installed

composer require "darkaonline/l5-swagger:5.6.*"

so when i do

http://127.0.0.1:8000/api/documentation

got info

Fetch error Not Found http://127.0.0.1:8000/docs/api-docs.json

already created docs folder with that json file.

Should i adjust route or change swagger base URL somewhere, not sure whats the problem. Tnx for your help.

4 Answers

You should run the command

php artisan l5-swagger:generate

after adding the annotations

And if you are still getting the Not Found http://your-host/docs/api-docs.json error.

Run chown www-data storage -R

if you still get "Not Found" error after running the

command : php artisan l5-swagger:generate

run

php artisan route:cache , worked for me

open in incognito in chrome or as a private tab in firefox

this problem for your internet explorer, chrome, FireFox

Related