-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#9] revise add documentation forgot password
- Loading branch information
Showing
1 changed file
with
11 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -230,7 +230,7 @@ Response Payload : | |
### Endpoint | ||
POST /forgot-password | ||
|
||
For recycle your password, you need to input your username and email for sending an password recovery to your email. | ||
For recycle your password, you need to input your email for sending password recovery to your email. | ||
|
||
### Headers | ||
Key | Value | ||
|
@@ -241,11 +241,9 @@ Accept | application/json | |
### Request Payloads | ||
Name | Type | Example Value | ||
--- | --- | --- | ||
username | string | jacky | ||
email | string | [email protected] | ||
``` | ||
{ | ||
"username": "jacky", | ||
"email": "[email protected]" | ||
} | ||
``` | ||
|
@@ -275,8 +273,7 @@ HTTP Code | Status | Description | |
### Logic | ||
*if any special logic, please write down the logic here. thanks* | ||
#### Validation | ||
- username : required and not empty | ||
- email: required and not empty | ||
- email: required, using email pattern, and not empty | ||
|
||
|
||
|
||
|
@@ -292,7 +289,7 @@ Response Payload : | |
``` | ||
{ | ||
"status_code": "cdc-400", | ||
"status_message": "username is required", | ||
"status_message": "email is required", | ||
"data": null | ||
} | ||
``` | ||
|
@@ -310,7 +307,7 @@ Response Payload : | |
``` | ||
{ | ||
"status_code": "cdc-400", | ||
"status_message": "username is required", | ||
"status_message": "email is required", | ||
"data": null | ||
} | ||
``` | ||
|
@@ -320,7 +317,7 @@ Response Payload : | |
Request payload : | ||
``` | ||
{ | ||
"username": "" | ||
"email": "" | ||
} | ||
``` | ||
|
||
|
@@ -330,7 +327,7 @@ Response Payload : | |
``` | ||
{ | ||
"status_code": "cdc-400", | ||
"status_message": "username is empty", | ||
"status_message": "email is empty", | ||
"data": null | ||
} | ||
``` | ||
|
@@ -340,7 +337,7 @@ Response Payload : | |
Request Payload : | ||
``` | ||
{ | ||
"username": "asal" | ||
"email": "asal" | ||
} | ||
``` | ||
|
||
|
@@ -350,39 +347,18 @@ Response Payload : | |
``` | ||
{ | ||
"status_code": "cdc-400", | ||
"status_message": "email is required", | ||
"status_message": "email format is invalid", | ||
"data": null | ||
} | ||
``` | ||
|
||
#### Case : Negative Case 5 | ||
|
||
Request Payload : | ||
``` | ||
{ | ||
"username": "asal", | ||
"email": "" | ||
} | ||
``` | ||
|
||
Response HTTP Status Code : 400 | ||
|
||
Response Payload: | ||
``` | ||
{ | ||
"status_code": "cdc-400", | ||
"status_message": "email is empty", | ||
"data": null | ||
} | ||
``` | ||
|
||
#### Case : Negative Case 6 | ||
#### Case : Negative Case 5 | ||
|
||
Request Payload | ||
``` | ||
{ | ||
"username": "asal", | ||
"email": "asal" | ||
"email": "[email protected]" | ||
} | ||
``` | ||
|
||
|
@@ -392,7 +368,7 @@ Response Payload | |
``` | ||
{ | ||
"status_code": "cdc-404", | ||
"status_message": "Invalid username/email", | ||
"status_message": "email not found", | ||
"data": null | ||
} | ||
``` | ||
|
@@ -402,7 +378,6 @@ Response Payload | |
Request Payload : | ||
``` | ||
{ | ||
"username": "jacky", | ||
"email": "[email protected]" | ||
} | ||
``` | ||
|