-
Notifications
You must be signed in to change notification settings - Fork 13.5k
refactor: Migrate users.register endpoint to OpenAPI with AJV validation #39676
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?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| "@rocket.chat/meteor": minor | ||
| "@rocket.chat/rest-typings": minor | ||
amitb0ra marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "@rocket.chat/web-ui-registration": minor | ||
| --- | ||
|
|
||
| Add OpenAPI support for the `users.register` API endpoint by migrating to chained route definition with AJV body and response validation. | ||
This file was deleted.
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe you should have left /v1/users.register in rest-typings if it creates issues with the web-ui packages. You could add a comment explaining why
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. okay. same with users.create also right? but due to this, tests are failing. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import type { IUser } from '@rocket.chat/core-typings'; | ||
|
|
||
| declare module '@rocket.chat/rest-typings' { | ||
| interface Endpoints { | ||
| '/v1/users.register': { | ||
| POST: (params: { | ||
| username: string; | ||
| name?: string; | ||
| email: string; | ||
| pass: string; | ||
| secret?: string; | ||
| reason?: string; | ||
| customFields?: object; | ||
| }) => { | ||
| user: IUser; | ||
| }; | ||
| }; | ||
| } | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.