knuckleswtf / knuckleswtf/scribe
Use route prefix in baseUrl
- Dominant language
- PHP
- Stars
- 2.3k
- Forks
- 357
- PR merge metrics
- No merged PRs in 30d
Description
### Scribe version
4.39.0
### Your question
If all the api route has `api` prefix, how can I set it in baseUrl?
For now when I set it in config `'base_url' => config('app.url').'/api',` the url generated will be `http://domain/api/api/login`
I'm using the openapi-ts tool for requests, and I don't want to fill in the same prefix every time
### Docs
- [x] I've checked [the docs](https://scribe.knuckles.wtf/laravel), the [troubleshooting guide](https://scribe.knuckles.wtf/laravel/troubleshooting), and [existing issues](https://github.com/knuckleswtf/scribe/issues?q=is%3Aissue+), but I didn't find a solution
Contributor guide
Research direction
Start with the Laravel documentation and the `base_url` configuration described in the issue, then inspect how Scribe builds URLs for the generated OpenAPI output used by openapi-ts. Done means configuring an API route prefix produces `http://domain/api/login`, without duplicating `/api` in the generated URL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- laravel, php
- Domain
- api, documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100