-
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.
[#8] update user documentation on edit
- Loading branch information
Showing
1 changed file
with
83 additions
and
27 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 |
---|---|---|
|
@@ -1029,7 +1029,8 @@ Response Payload | |
Request Payload | ||
``` | ||
{ | ||
"type_akses": 1 | ||
"type_akses": 1, | ||
"company_id": "" | ||
} | ||
``` | ||
|
||
|
@@ -1039,7 +1040,7 @@ Response Payload | |
``` | ||
{ | ||
"status_code": "cdc-400", | ||
"status_message": "company_id is required", | ||
"status_message": "company_id is empty", | ||
"data": null | ||
} | ||
``` | ||
|
@@ -1050,17 +1051,17 @@ Request Payload | |
``` | ||
{ | ||
"type_akses": 1, | ||
"company_id": "" | ||
"company_id": "test" | ||
} | ||
``` | ||
|
||
Response HTTP Status Code : 400 | ||
Response HTTP Status Code : 404 | ||
|
||
Response Payload | ||
``` | ||
{ | ||
"status_code": "cdc-400", | ||
"status_message": "company_id is empty", | ||
"status_code": "cdc-404", | ||
"status_message": "company_id not found in companies", | ||
"data": null | ||
} | ||
``` | ||
|
@@ -1070,18 +1071,18 @@ Response Payload | |
Request Payload | ||
``` | ||
{ | ||
"type_akses": 1, | ||
"company_id": "test" | ||
"type_akses": 2, | ||
"company_id": "5fb5df66-5f80-416d-a055-401bcf944ef7" | ||
} | ||
``` | ||
|
||
Response HTTP Status Code : 404 | ||
Response HTTP Status Code : 400 | ||
|
||
Response Payload | ||
``` | ||
{ | ||
"status_code": "cdc-404", | ||
"status_message": "company_id not found in companies", | ||
"status_code": "cdc-400", | ||
"status_message": "region_id is required because type_akses edited from 1", | ||
"data": null | ||
} | ||
``` | ||
|
@@ -1092,7 +1093,8 @@ Request Payload | |
``` | ||
{ | ||
"type_akses": 2, | ||
"company_id": "5fb5df66-5f80-416d-a055-401bcf944ef7" | ||
"company_id": "5fb5df66-5f80-416d-a055-401bcf944ef7", | ||
"region_id": "" | ||
} | ||
``` | ||
|
||
|
@@ -1102,7 +1104,7 @@ Response Payload | |
``` | ||
{ | ||
"status_code": "cdc-400", | ||
"status_message": "region_id is required", | ||
"status_message": "region_id is empty", | ||
"data": null | ||
} | ||
``` | ||
|
@@ -1114,17 +1116,17 @@ Request Payload | |
{ | ||
"type_akses": 2, | ||
"company_id": "5fb5df66-5f80-416d-a055-401bcf944ef7", | ||
"region_id": "" | ||
"region_id": "test" | ||
} | ||
``` | ||
|
||
Response HTTP Status Code : 400 | ||
Response HTTP Status Code : 404 | ||
|
||
Response Payload | ||
``` | ||
{ | ||
"status_code": "cdc-400", | ||
"status_message": "region_id is empty", | ||
"status_code": "cdc-404", | ||
"status_message": "region_id not found in regions", | ||
"data": null | ||
} | ||
``` | ||
|
@@ -1136,7 +1138,7 @@ Request Payload | |
{ | ||
"type_akses": 2, | ||
"company_id": "5fb5df66-5f80-416d-a055-401bcf944ef7", | ||
"region_id": "test" | ||
"region_id": "5fb5df66-5f80-416d-a055-401bcf944ef7" | ||
} | ||
``` | ||
|
||
|
@@ -1146,7 +1148,7 @@ Response Payload | |
``` | ||
{ | ||
"status_code": "cdc-404", | ||
"status_message": "region_id not found in regions", | ||
"status_message": "region_id doesnt belong to company_id", | ||
"data": null | ||
} | ||
``` | ||
|
@@ -1167,7 +1169,7 @@ Response Payload | |
``` | ||
{ | ||
"status_code": "cdc-400", | ||
"status_message": "branch_id is required", | ||
"status_message": "branch_id is required because type_akses edited from 1 or 2", | ||
"data": null | ||
} | ||
``` | ||
|
@@ -1218,12 +1220,34 @@ Response Payload | |
|
||
#### Case : Negative Case 14 | ||
|
||
Request Payload | ||
``` | ||
{ | ||
"type_akses": 3, | ||
"company_id": "5fb5df66-5f80-416d-a055-401bcf944ef7", | ||
"branch_id" : "5fb5df66-5f80-416d-a055-401bcf944ef7" | ||
} | ||
``` | ||
|
||
Response HTTP Status Code : 404 | ||
|
||
Response Payload | ||
``` | ||
{ | ||
"status_code": "cdc-404", | ||
"status_message": "branch_id doesnt belong to company_id", | ||
"data": null | ||
} | ||
``` | ||
|
||
#### Case : Negative Case 15 | ||
|
||
Request Payload | ||
``` | ||
{ | ||
"type_akses": 4, | ||
"company_id": "5fb5df66-5f80-416d-a055-401bcf944ef7", | ||
"branch_id" : "test" | ||
"branch_id" : "5fb5e437-69dc-4eb6-8f8c-4022cf944ef7" | ||
} | ||
``` | ||
|
||
|
@@ -1233,19 +1257,19 @@ Response Payload | |
``` | ||
{ | ||
"status_code": "cdc-400", | ||
"status_message": "kios_id is required", | ||
"status_message": "kios_id is required because type_akses edited from 1 or 2 or 3", | ||
"data": null | ||
} | ||
``` | ||
|
||
#### Case : Negative Case 15 | ||
#### Case : Negative Case 16 | ||
|
||
Request Payload | ||
``` | ||
{ | ||
"type_akses": 4, | ||
"company_id": "5fb5df66-5f80-416d-a055-401bcf944ef7", | ||
"branch_id" : "test", | ||
"branch_id" : "5fb5e437-69dc-4eb6-8f8c-4022cf944ef7", | ||
"kios_id" : "" | ||
} | ||
``` | ||
|
@@ -1261,14 +1285,14 @@ Response Payload | |
} | ||
``` | ||
|
||
#### Case : Negative Case 16 | ||
#### Case : Negative Case 17 | ||
|
||
Request Payload | ||
``` | ||
{ | ||
"type_akses": 4, | ||
"company_id": "5fb5df66-5f80-416d-a055-401bcf944ef7", | ||
"branch_id" : "test", | ||
"branch_id" : "5fb5e437-69dc-4eb6-8f8c-4022cf944ef7", | ||
"kios_id" : "test" | ||
} | ||
``` | ||
|
@@ -1284,6 +1308,29 @@ Response Payload | |
} | ||
``` | ||
|
||
#### Case : Negative Case 18 | ||
|
||
Request Payload | ||
``` | ||
{ | ||
"type_akses": 4, | ||
"company_id": "5fb5df66-5f80-416d-a055-401bcf944ef7", | ||
"branch_id" : "5fb5e437-69dc-4eb6-8f8c-4022cf944ef7", | ||
"kios_id" : "5fb5df66-5f80-416d-a055-401bcf944ef7" | ||
} | ||
``` | ||
|
||
Response HTTP Status Code : 404 | ||
|
||
Response Payload | ||
``` | ||
{ | ||
"status_code": "cdc-404", | ||
"status_message": "kios_id doesnt belong to branch_id", | ||
"data": null | ||
} | ||
``` | ||
|
||
#### Case : Positive Case 1 | ||
|
||
Request Payload : | ||
|
@@ -1459,6 +1506,7 @@ HTTP Code | Status | Description | |
--- | --- | --- | ||
404 | Not Found | user not found in database | ||
500 | Internal Server Error | some un-handle error in server | ||
403 | Forbidden | user not owned by user login | ||
200 | OK | OK | ||
|
||
``` | ||
|
@@ -1508,6 +1556,14 @@ Response Payload : | |
} | ||
``` | ||
|
||
``` | ||
{ | ||
"status_code": "cdc-403", | ||
"status_message": "user not owned by user login", | ||
"data": null | ||
} | ||
``` | ||
|
||
#### Case : Positive Case | ||
|
||
Response HTTP Status Code : 200 | ||
|
@@ -1546,7 +1602,7 @@ Content-Type | application/json | |
Accept | application/json | ||
Email | [email protected] | ||
|
||
### Request Param | ||
### Param Query | ||
GET /users?keyword=dennis&page=1&limit=20&order=users.id&sort=desc&type_akses=4&company_id=5fb5df66-5f80-416d-a055-401bcf944ef7®ion_id=5fb5e66d-e47c-47fd-b4bf-4064cf944ef7&branch_id=5fb5e437-69dc-4eb6-8f8c-4022cf944ef7&kios_id=5fb5e626-65ac-473d-af2c-3ff2cf944ef7 | ||
|
||
Name | Example Value | Description | ||
|