feat: Add OpenAPI Support to e2e.fetchMyKeys API#36779
feat: Add OpenAPI Support to e2e.fetchMyKeys API#36779ahmed-n-abdeltwab wants to merge 6 commits intoRocketChat:developfrom
Conversation
🦋 Changeset detectedLatest commit: 78253aa The changes in this PR will be included in the next version bump. This PR includes changesets to release 39 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 |
|
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #36779 +/- ##
===========================================
- Coverage 66.13% 65.05% -1.08%
===========================================
Files 3301 3262 -39
Lines 110939 110019 -920
Branches 21041 20813 -228
===========================================
- Hits 73364 71578 -1786
- Misses 34900 35916 +1016
+ Partials 2675 2525 -150
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Hey @cardoso, feel free to review whenever you have time |
|
👍 @cardoso |
| async get() { | ||
| const result = await Users.fetchKeysByUserId(this.userId); | ||
| async function action() { | ||
| const result = (await Users.fetchKeysByUserId(this.userId)) as unknown as { public_key: string; private_key: string }; |
There was a problem hiding this comment.
Why is as unknown as needed when it wasn't before? 🤔
There was a problem hiding this comment.
The fetchKeysByUserId function was returning { public_key: string; private_key: string } | object from the database, but in both the backend and frontend it was expected to return only { public_key: string; private_key: string }. I updated it to keep the return type consistent with the backend and frontend
Description:
This PR integrates OpenAPI support into the
Rocket.Chat API, migrate ofRocket.Chat APIendpoints to the new OpenAPI pattern. The update includes improved API documentation, enhanced type safety, and response validation using AJV.Key Changes:
Issue Reference:
Relates to #34983, part of the ongoing OpenAPI integration effort.
Testing:
$Endpoints:
Looking forward to your feedback! 🚀