You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Key Changes:
Security Implementation: Added BearerAuth to components/securitySchemes to support JWT-protected routes.
New Endpoints Documented:
POST /api/login: User authentication and JWT generation.
POST /api/signup: New user registration.
GET /api/auth/profile: Authenticated user profile retrieval.
Schema Updates: Added LoginRequest, SignupRequest, and UserProfileResponse components.
Cleanup: Identified and prepared for the removal of "ghost" routes that exist in documentation but not in the routes/ directory.
Hi, Vichea
Thank you for doing it. Here are a few areas that still need adjustment before this branch can be considered complete:
GET /appointments is still active but not documented.
The backend currently exposes both GET /appointments and GET /appointments/v2, so documenting only the V2 endpoint is not enough. If the legacy endpoint is still part of the live API surface, it should either be documented or removed from the backend to avoid ambiguity.
POST /login documentation does not fully match actual backend behavior.
The current spec documents standard success and error responses, but the controller can also return additional cases such as:
202 Accepted when MFA is enabled and a token is sent
404 Not Found when the account does not exist
429 Too Many Requests when failed login attempts exceed the allowed threshold
These responses should be added so frontend and mobile clients can handle the authentication flow correctly.
The notification routes are not fully aligned with the documented path parameters.
The backend uses /:id for update and delete operations, while the spec documents /notifications/{simple_id}. Even if both refer to the same underlying value, the naming should be made consistent between routes, validators, controllers, and OpenAPI docs.
Some request and response schemas are too generic compared to the real controller output.
A number of endpoints still use minimal schema definitions or high-level descriptions instead of matching the actual JSON response shape. This makes the spec less reliable for consumers who want to generate clients or trust the docs without reading controller code.
Authentication requirements need one more consistency pass.
Several protected endpoints are correctly marked with bearer authentication, but the documentation should be rechecked route-by-route to ensure every protected endpoint is explicitly marked and every public endpoint is left unprotected intentionally.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Key Changes:
Security Implementation: Added BearerAuth to components/securitySchemes to support JWT-protected routes.
New Endpoints Documented:
POST /api/login: User authentication and JWT generation.
POST /api/signup: New user registration.
GET /api/auth/profile: Authenticated user profile retrieval.
Schema Updates: Added LoginRequest, SignupRequest, and UserProfileResponse components.
Cleanup: Identified and prepared for the removal of "ghost" routes that exist in documentation but not in the routes/ directory.