Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subdomain API routes are not documented properly #72

Closed
CreepPork opened this issue Nov 14, 2022 · 0 comments · Fixed by #76
Closed

Subdomain API routes are not documented properly #72

CreepPork opened this issue Nov 14, 2022 · 0 comments · Fixed by #76
Labels
bug Something isn't working

Comments

@CreepPork
Copy link

Hello!

I have a tenant-aware application that has subdomains for each team. There are API routes that are for central (without subdomain) and there are API routes that have a subdomain to them.

I use this code in the route service provider:

Route::prefix('api/v1')
            ->middleware('api:team')
            ->domain('{subdomain}.' . config('app.domain'))
            ->group(base_path('routes/team/api.php'));

The problem is that in the documentation it does not add that {subdomain} parameter to the URL but as a request parameter. This is then not a proper route and a 404 error occurs.

The documentation request, response:
Screenshot_20221114_154644

The displayed URL:
Screenshot_20221114_154801

But it should be:

https://{subdomain}.carbon.test/api/v1/starcrest/user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants