-
-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add a @registration-userschema endpoint
- Loading branch information
Showing
8 changed files
with
190 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Add a @registration-userschema endpoint to get the fields for the registration form | ||
[erral] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,5 @@ | |
name="@userschema" | ||
/> | ||
|
||
|
||
</configure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
src/plone/restapi/tests/http-examples/registration_userschema.req
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
GET /plone/@userschema/registration HTTP/1.1 | ||
Accept: application/json | ||
Authorization: Basic YWRtaW46c2VjcmV0 |
69 changes: 69 additions & 0 deletions
69
src/plone/restapi/tests/http-examples/registration_userschema.resp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
HTTP/1.1 200 OK | ||
Content-Type: application/json | ||
|
||
{ | ||
"fieldsets": [ | ||
{ | ||
"behavior": "plone", | ||
"fields": [ | ||
"fullname", | ||
"email", | ||
"username", | ||
"password", | ||
"password_ctl", | ||
"mail_me" | ||
], | ||
"id": "default", | ||
"title": "Default" | ||
} | ||
], | ||
"properties": { | ||
"email": { | ||
"description": "We will use this address if you need to recover your password", | ||
"factory": "Email", | ||
"title": "Email", | ||
"type": "string", | ||
"widget": "email" | ||
}, | ||
"fullname": { | ||
"description": "Enter full name, e.g. John Smith.", | ||
"factory": "Text line (String)", | ||
"title": "Full Name", | ||
"type": "string" | ||
}, | ||
"mail_me": { | ||
"default": false, | ||
"description": "", | ||
"factory": "Yes/No", | ||
"title": "Send a confirmation mail with a link to set the password", | ||
"type": "boolean" | ||
}, | ||
"password": { | ||
"description": "Enter your new password.", | ||
"factory": "Password", | ||
"title": "Password", | ||
"type": "string", | ||
"widget": "password" | ||
}, | ||
"password_ctl": { | ||
"description": "Re-enter the password. Make sure the passwords are identical.", | ||
"factory": "Password", | ||
"title": "Confirm password", | ||
"type": "string", | ||
"widget": "password" | ||
}, | ||
"username": { | ||
"description": "Enter a user name, usually something like 'jsmith'. No spaces or special characters. Usernames and passwords are case sensitive, make sure the caps lock key is not enabled. This is the name used to log in.", | ||
"factory": "Text line (String)", | ||
"title": "User Name", | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"email", | ||
"username", | ||
"password", | ||
"password_ctl" | ||
], | ||
"type": "object" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters