-
Notifications
You must be signed in to change notification settings - Fork 13k
feat: Add OpenAPI Support to e2e.fetchMyKeys API #36779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
feat: Add OpenAPI Support to e2e.fetchMyKeys API #36779
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is as unknown as needed when it wasn't before? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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! 🚀