refactor: migrate banners/:id endpoint to new OpenAPI pattern with AJV validation#39353
refactor: migrate banners/:id endpoint to new OpenAPI pattern with AJV validation#39353amitb0ra wants to merge 3 commits intoRocketChat:developfrom
banners/:id endpoint to new OpenAPI pattern with AJV validation#39353Conversation
… typed schemas and validation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
🦋 Changeset detectedLatest commit: 2620156 The changes in this PR will be included in the next version bump. This PR includes changesets to release 41 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx,js}📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
Files:
🧠 Learnings (8)📓 Common learnings📚 Learning: 2026-01-17T01:51:47.764ZApplied to files:
📚 Learning: 2026-02-25T20:10:16.987ZApplied to files:
📚 Learning: 2026-03-10T08:13:44.506ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-02-24T19:09:01.522ZApplied to files:
📚 Learning: 2026-02-23T17:53:06.802ZApplied to files:
🔇 Additional comments (1)
WalkthroughMigrates the banners/:id REST endpoint from the legacy addRoute pattern to the new chained .get() API pattern with explicit route descriptors, AJV-validated query schema (platform), typed responses, test expectation updates, and removal of the old type definition in rest-typings. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Suggested labels
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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. Comment |
|
closing as handled in #39265 |
Proposed changes
Migrate
banners/:idendpoint to the new OpenAPI-compatible chained route definition syntax with AJV query and response validation.Changes
apps/meteor/app/api/server/v1/banners.tsbanners/:idfromaddRoute()toAPI.v1.get()withasync function action()handlerplatformasenum: ['web', 'mobile']200,400,401)type: 'object'forIBanner[]items (IBanner is not registered in typia due toz.custom<UiKit.BannerView>dependency)ExtractRoutesFromAPIanddeclare moduleaugmentation for automatic type extractionpackages/rest-typings/src/v1/banners.tsBannersIdtype, schema, and/v1/banners/:idendpoint entry fromBannersEndpointsBanners,BannersDismiss, and their validators (still used by non-migrated endpoints)apps/meteor/tests/end-to-end/api/banners.ts'invalid-params'to'error-invalid-params'to match new typed route validation behavior.changeset/migrate-banners-id-openapi.md@rocket.chat/meteorand@rocket.chat/rest-typingsIssue(s)
Tracking: #150
Test results
Summary by CodeRabbit
Refactor
Chores
Tests