Search code examples
phplaravelswagger

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?


Solution

  • You should run the command

    php artisan l5-swagger:generate
    

    after adding the annotations