knuckleswtf / scribe

Generate API documentation for humans from your Laravel codebase.✍
https://scribe.knuckles.wtf/laravel/
MIT License
1.59k stars 280 forks source link

Docs not found after deploy of Laravel 10.X project with Vapor #719

Closed pierluiginovatag closed 10 months ago

pierluiginovatag commented 10 months ago

Scribe version

version 4.22.0

Your question

I generate the doc on my W11 pc, and locally the /docs directory works fine. Then I push to the git repo that is linked to a laravel/vapo project Accessing the aws server (generated by vapor) accessing the /docs directory result in a 404 not found Then i tried to generate locally the docs, running "php artisan scribe:generate" using vapor command console, but I get this error: Unable to delete file located at: /var/task/.scribe/endpoints/00.yaml.

Is there any way to have scribe docs in vapor/laravel env ?

Docs

shalvah commented 10 months ago

I haven't used Vapor, so my knowledge here is limited, but I think you'll need to configure your setup to serve static pages from your public/docs directory. Alternatively, I think you can change the type in your Scribe config to laravel. This will route the docs through your Laravel app, so you shouldn't need to configure any static file serving.