Refactor tests, documentation, and component code for consistent formatting and improved readability

- Reformatted test files (`RegistrationActivityChart.test.tsx`, `DemoCredentialsModal.test.tsx`) for indentation consistency.
- Reduced inline style verbosity across components and docs (`DemoModeBanner`, `CodeBlock`, `MarkdownContent`).
- Enhanced Markdown documentation (`sync-msw-with-openapi.md`, `MSW_AUTO_GENERATION.md`) with spacing updates for improved clarity.
- Updated MSW configuration to simplify locale route handling in `browser.ts`.
This commit is contained in:
Felipe Cardoso
2025-11-24 20:25:40 +01:00
parent 3bf28aa121
commit e79215b4de
8 changed files with 103 additions and 91 deletions

View File

@@ -1,6 +1,7 @@
# Keeping MSW Handlers Synced with OpenAPI Spec
## Problem
MSW handlers can drift out of sync with the backend API as it evolves.
## Solution Options
@@ -60,6 +61,7 @@ Add to `package.json`:
Our MSW handlers currently cover:
**Auth Endpoints:**
- POST `/api/v1/auth/register`
- POST `/api/v1/auth/login`
- POST `/api/v1/auth/refresh`
@@ -70,6 +72,7 @@ Our MSW handlers currently cover:
- POST `/api/v1/auth/change-password`
**User Endpoints:**
- GET `/api/v1/users/me`
- PATCH `/api/v1/users/me`
- DELETE `/api/v1/users/me`
@@ -80,6 +83,7 @@ Our MSW handlers currently cover:
- DELETE `/api/v1/sessions/:id`
**Admin Endpoints:**
- GET `/api/v1/admin/stats`
- GET `/api/v1/admin/users`
- GET `/api/v1/admin/users/:id`