Ambulance lada
Ambulance lada

Reputation: 331

Laravel swagger api-docs json file not found

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?

Upvotes: 4

Views: 17587

Answers (3)

Gladwell Ndlovu
Gladwell Ndlovu

Reputation: 239

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

chown www-data storage -R

Upvotes: 3

Aaqib Javed
Aaqib Javed

Reputation: 64

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

php artisan l5-swagger:generate

run

php artisan route:cache 

worked for me

Upvotes: 1

Lara
Lara

Reputation: 216

You should run the command

php artisan l5-swagger:generate

after adding the annotations

Upvotes: 9

Related Questions