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
Chore: API v2 poc #26484
base: develop
Are you sure you want to change the base?
Chore: API v2 poc #26484
Conversation
This pull request introduces 1 alert when merging f3c5e04 into f45b956 - view on LGTM.com new alerts:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #26484 +/- ##
===========================================
- Coverage 38.05% 38.04% -0.01%
===========================================
Files 745 745
Lines 18625 18625
Branches 1412 1412
===========================================
- Hits 7087 7086 -1
+ Misses 11318 11317 -1
- Partials 220 222 +2
Flags with carried forward coverage won't be shown. Click here to find out more. |
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 |
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 |
Proposed changes (including videos or screenshots)
This is the POC for API v2 using tsoa.
You can see the routes on the
packages/rest-api/src/v2/usersController.ts
file.To get started, you do the usual to run the project, just checkout the git branch and then:
You can then try the new API:
Or you can import the OpenAPI file into your preferred tool. The spec file is at
packages/rest-api/public/swagger.json
Issue(s)
Steps to test or reproduce
Further comments
Pending items for this PoC:
POST
request (probably for sending a message)How
tsoa
works in a nutshellDuring build time, it will look for controller files on
v2/
folder and will generate asrc/routes.ts
file. TypeScript will then exportsrc/routes.ts
file that will be imported on Rocket.Chat, used then to register the routes on anexpress
router hooked intoWebApp.connectHandlers
.