What's New
Features
- OpenAPI Documentation Page: Added a new
/api-docsroute in the frontend that displays interactive API documentation using SwaggerUI React - Navigation Link: Added "API Docs" link with book icon in the navigation menu
- Correct Backend URL: SwaggerUI now correctly calls the backend API instead of the frontend origin
Technical Details
- Fetches OpenAPI spec from backend
/api/v1/openapi.json - Updates server URL in the spec to point to the correct backend endpoint
- Includes loading spinner and error state handling
- Added 4 unit tests for the API docs component
- Updated to version 1.2.1
Bug Fixes
- Fixed pnpm-lock.yaml: Updated lockfile to include swagger-ui-react dependency, fixing Docker build failures in CI
Files Changed
frontend/src/routes/api-docs.tsx- New API docs page componentfrontend/src/routes/api-docs.test.tsx- Unit testsfrontend/src/routes/__root.tsx- Navigation linkfrontend/package.json- Added swagger-ui-react dependencypnpm-lock.yaml- Updated with swagger-ui-react dependencies