added-routes-for-project-survey#338
Conversation
WalkthroughAdded new POST route mappings for project and survey deleteResource endpoints (with/without :id) and project programs/removeSolutions endpoints (with/without :id). Updated interface routing JSON to include these six routes pointing to respective services. Bumped elevate-survey package version from 1.0.16 to 1.0.17. No logic changes. Changes
Sequence Diagram(s)sequenceDiagram
participant C as Client
participant G as API Gateway
participant R as Interface Router
participant P as Project Service
participant S as Survey Service
C->>G: POST /project|/survey ...
G->>R: Route lookup
alt project admin/deleteResource or programs/removeSolutions
R->>P: Forward POST to project service
P-->>R: Response
else survey admin/deleteResource
R->>S: Forward POST to survey service
S-->>R: Response
end
R-->>G: Response
G-->>C: HTTP response
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (4)
elevate-survey/package.json (1)
3-3: Version bump looks good.1.0.17 aligns with exposing new routes in elevate-survey. Proceed to publish/tag as per release process.
elevate-project/package.json (1)
3-3: Version bump acknowledged.1.1.45 is appropriate with the added project routes. Ship with corresponding interface updates.
interface-routes/elevate-dev-routes.json (2)
12489-12517: Optional: add internal rate limiting for destructive admin routeIf your gateway policy requires internal rate limiting for admin operations, add rateLimit. Otherwise ignore.
"service": "project" + , + "rateLimit": { + "type": "internal" + }
12518-12545: Optional: add internal rate limiting for survey admin routeOnly if your policy requires it.
"service": "survey" + , + "rateLimit": { + "type": "internal" + }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
elevate-project/constants/routes.js(1 hunks)elevate-project/package.json(1 hunks)elevate-survey/constants/routes.js(1 hunks)elevate-survey/package.json(1 hunks)interface-routes/elevate-dev-routes.json(2 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: MallanagoudaB
PR: ELEVATE-Project/utils#329
File: interface-routes/elevate-dev-routes.json:0-0
Timestamp: 2025-08-05T09:46:57.365Z
Learning: In the ELEVATE project, "deletedResourceDetails" endpoints use POST method instead of GET, even though they appear to be read-only operations. This is by design based on project-specific requirements.
📚 Learning: 2025-08-05T09:46:50.071Z
Learnt from: MallanagoudaB
PR: ELEVATE-Project/utils#329
File: elevate-project/constants/routes.js:0-0
Timestamp: 2025-08-05T09:46:50.071Z
Learning: In the elevate-project/constants/routes.js file, the `orchestrated` property is not compulsory for all route configurations. Out of 293 total routes, 33 routes (about 11%) exist without this property, making it optional rather than required.
Applied to files:
elevate-survey/constants/routes.jselevate-project/constants/routes.js
📚 Learning: 2025-08-05T09:46:50.071Z
Learnt from: MallanagoudaB
PR: ELEVATE-Project/utils#329
File: elevate-project/constants/routes.js:0-0
Timestamp: 2025-08-05T09:46:50.071Z
Learning: In the elevate-project/constants/routes.js file, the `orchestrated` property is not compulsory for all route configurations. Many routes exist without this property, making it optional rather than required.
Applied to files:
elevate-survey/constants/routes.jselevate-project/constants/routes.js
📚 Learning: 2025-08-05T09:46:57.365Z
Learnt from: MallanagoudaB
PR: ELEVATE-Project/utils#329
File: interface-routes/elevate-dev-routes.json:0-0
Timestamp: 2025-08-05T09:46:57.365Z
Learning: In the ELEVATE project, "deletedResourceDetails" endpoints use POST method instead of GET, even though they appear to be read-only operations. This is by design based on project-specific requirements.
Applied to files:
elevate-survey/constants/routes.jsinterface-routes/elevate-dev-routes.jsonelevate-project/constants/routes.js
🔇 Additional comments (6)
elevate-survey/constants/routes.js (1)
2991-3011: Confirm interface mappings for survey deleteResource endpointsI wasn’t able to locate an
interface-routesdirectory in the repo root. Please verify that the new admin/survey/v1/admin/deleteResourceand/survey/v1/admin/deleteResource/:idroutes are exposed in your consumer-facing interface definitions (for example, underinterface-routes/elevate-survey-routes.jsonor similar), with:
- HTTP method set to POST
- Service mapped to elevate-survey-observation
elevate-project/constants/routes.js (1)
3151-3189: Routes for admin deleteResource and programs removeSolutions are correctly configured
- sourceRoute and targetRoute paths match and use POST, consistent with existing admin patterns
- inSequence: false aligns with neighboring routes
- service is correctly set to
"project"No further changes needed.
interface-routes/elevate-dev-routes.json (4)
12332-12338: Minor format tweak in /survey/health — OKNo functional impact; mapping remains correct to elevate-survey-observation.
12560-12573: Confirmed param variant registration
The"/project/v1/programs/removeSolutions/:id"route is already declared consistently in both the interface and service route registries:
- interface-routes/elevate-dev-routes.json:12561
- elevate-project/constants/routes.js:3181, 3185
Nothing else required—approving these changes.
12518-12545: Confirmed: DELETE‐like admin routes use POST by design
- Interface definition in
interface-routes/elevate-dev-routes.json(lines 12519 & 12533)- Matching constants in
elevate-survey/constants/routes.js(lines 2993–3007)POST for
/survey/v1/admin/deleteResourceis consistent with project conventions and mappings are correct.
12546-12559: Add project programs/removeSolutions — route definitions found, please verify backend implementationI’ve confirmed the new route is declared in the interface‐routes and client constants, but I haven’t been able to locate the actual service implementation. Please ensure the project service exposes a matching POST /project/v1/programs/removeSolutions endpoint.
Locations of the declarations:
- interface-routes/elevate-dev-routes.json (lines 12547, 12561)
- elevate-project/constants/routes.js (lines 3171, 3175, 3181, 3185)
…o ProjectSurveyRoutes
Summary by CodeRabbit