Add embedded Swagger UI page with auto-injected JWT auth
- New /swagger route with lazy-loaded SwaggerPage that initializes swagger-ui-dist and injects the session JWT via requestInterceptor - Move API link from primary nav to navRight utility area (pill style) - Code-split swagger chunk (~1.4 MB) so main bundle stays lean Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { createBrowserRouter, Navigate } from 'react-router';
|
||||
import { lazy, Suspense } from 'react';
|
||||
import { AppShell } from './components/layout/AppShell';
|
||||
import { ProtectedRoute } from './auth/ProtectedRoute';
|
||||
import { LoginPage } from './auth/LoginPage';
|
||||
@@ -8,6 +9,8 @@ import { OidcAdminPage } from './pages/admin/OidcAdminPage';
|
||||
import { RoutePage } from './pages/routes/RoutePage';
|
||||
import { ApplicationsPage } from './pages/apps/ApplicationsPage';
|
||||
|
||||
const SwaggerPage = lazy(() => import('./pages/swagger/SwaggerPage').then(m => ({ default: m.SwaggerPage })));
|
||||
|
||||
export const router = createBrowserRouter([
|
||||
{
|
||||
path: '/login',
|
||||
@@ -28,6 +31,7 @@ export const router = createBrowserRouter([
|
||||
{ path: 'apps', element: <ApplicationsPage /> },
|
||||
{ path: 'apps/:group/routes/:routeId', element: <RoutePage /> },
|
||||
{ path: 'admin/oidc', element: <OidcAdminPage /> },
|
||||
{ path: 'swagger', element: <Suspense fallback={null}><SwaggerPage /></Suspense> },
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user