knuckleswtf / scribe

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

How can I access the docs in production #694

Closed joshajiniran closed 1 year ago

joshajiniran commented 1 year ago

Scribe version

4.22.0

Your question

I have deployed my Laravel API on fly.io and I can't figure out how to access the docs with https://fly-app.fly.dev/docs for example.

I have used the type => static at first and it was a 404.

also used type => laravel and tried setting up a Route in web.php to view('scribe.index'), but got a 500, upon looking at the logs, here was the cause, since there isn't a scribe.postman and scribe.openapi view.

<ul class="toc-footer" id="toc-footer">
                    <li style="padding-bottom: 5px;"><a href="{{ route("scribe.postman") }}">View Postman collection</a></li>
                            <li style="padding-bottom: 5px;"><a href="{{ route("scribe.openapi") }}">View OpenAPI spec</a></li>
                <li><a href="http://github.com/knuckleswtf/scribe">Documentation powered by Scribe ✍</a></li>
</ul>

Any help would be appreciated

Docs

a4anthony commented 1 year ago

@joshajiniran For a quick fix, I moved "knuckleswtf/scribe": "^4.19" from "require-dev" to "require" then run composer update and then deploy again.

joshajiniran commented 1 year ago

@a4anthony

I really appreciate it 🙏

Works.