Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel swagger api-docs json file not found

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.

like image 253
Ambulance lada Avatar asked Dec 24 '22 04:12

Ambulance lada


1 Answers

You should run the command

php artisan l5-swagger:generate

after adding the annotations

like image 85
SHENE Avatar answered Dec 31 '22 09:12

SHENE