feat: add internal api docs to /docs/api with auth

This commit is contained in:
Andras Bacsai
2024-11-12 13:49:37 +01:00
parent 408ba9cc7a
commit 7253041e15
7 changed files with 8061 additions and 13 deletions

View File

@@ -4,6 +4,7 @@ use App\Http\Controllers\Controller;
use App\Http\Controllers\MagicController;
use App\Http\Controllers\OauthController;
use App\Http\Controllers\UploadController;
use App\Http\Middleware\ApiAllowed;
use App\Livewire\Admin\Index as AdminIndex;
use App\Livewire\Boarding\Index as BoardingIndex;
use App\Livewire\Dashboard;
@@ -72,13 +73,18 @@ use App\Livewire\Team\Member\Index as TeamMemberIndex;
use App\Livewire\Terminal\Index as TerminalIndex;
use App\Models\GitlabApp;
use App\Models\ScheduledDatabaseBackupExecution;
use App\Models\Server;
use App\Providers\RouteServiceProvider;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Storage;
use Symfony\Component\HttpFoundation\StreamedResponse;
use ThreeSidedCube\LaravelRedoc\Http\Controllers\DefinitionController;
use ThreeSidedCube\LaravelRedoc\Http\Controllers\DocumentationController;
Route::group(['middleware' => ['auth:sanctum', ApiAllowed::class]], function () {
Route::get('/docs/api', DocumentationController::class)->name('redoc.documentation');
Route::get('/docs/api/definition', DefinitionController::class)->name('redoc.definition');
});
if (isDev()) {
Route::get('/dev/compose', Compose::class)->name('dev.compose');
}