Repository navigation
Comprehensive audit and synchronization of the Rythmify OpenAPI - #191
Merged
Merged
Conversation
implemented the POST /auth/check-email endpoint in the OpenAPI specification. This endpoint allows the frontend to check if an email address is already registered before proceeding with registration. Included the request schema for the email field and the response schema for the exists boolean.
This commit aligns the `openapi.yaml` specification with the actual implementation in the Node.js backend based on a comprehensive source-code audit.
**Key Changes:**
- **Path Corrections**: Fixed discrepancies where spec paths did not match route mounts:
- `/feed/discover` → `/feed/discovery`
- `/search/suggestions` → `/suggestions`
- **Missing Endpoints**: Documented endpoints that were implemented in the backend but missing from the spec:
- **GitHub OAuth**: Added `/auth/oauth/github` and its callback.
- **Account Deletion**: Added `DELETE /auth/me` with password confirmation.
- **User Lookup**: Added `/users/by-id/{user_id}` alias path.
- **Authentication & Pagination Sync**:
- Updated `/feed` and `/feed/discovery` to reflect mandatory authentication (previously marked as optional/public).
- Switched feed endpoints from `offset` to `cursor`-based pagination to match controller logic.
- Added `CursorFeedResponse` schema to align with the actual response shape: `{ data, hasMore, nextCursor, message }`.
- **Audit Housekeeping**:
- Cataloged and marked legacy or spec-only routes (e.g., SoundCloud OAuth, `/notifications/read-all`) as `#
Ahmedattay
approved these changes
May 2, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PR Overview
This PR performs a comprehensive audit and synchronization of the Rythmify OpenAPI 3.0.3 specification (
openapi.yaml) against the actual backend implementation. The goal was to establish the source code as the single source of truth and eliminate discrepancies that cause frontend integration issues.Key Changes
🛠 Path & Route Fixes
/feed/discoverto/feed/discovery: Aligned with the actual route defined infeed.routes.js./search/suggestionsto/suggestions: Corrected the path to match its mount point at the API root (/api/v1/suggestions).DELETE /auth/me(requires password confirmation)./users/by-id/{user_id}alias used for public profile fetching.🔐 Security & Logic Alignment
offset-based pagination withcursor-based pagination for both feed endpoints to match the controller and service layer logic.CursorFeedResponseschema to accurately describe the response envelope:{ data, hasMore, nextCursor, message }.Verification Results
src/routes/directory was manually cross-referenced with the YAML file.api-response.jsutility and controller outputs./api/v1/authvs root mounts) were validated viaapp.js.