From bf4c339a13d39766af9c9be11a1a42a9090e5af6 Mon Sep 17 00:00:00 2001 From: I Putu Mahendra Juniartha Date: Sat, 5 Dec 2020 16:29:52 +0700 Subject: [PATCH] [#1] Update kios documentation based on review --- doc/kios.md | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/doc/kios.md b/doc/kios.md index 9058bb3..e59f57a 100644 --- a/doc/kios.md +++ b/doc/kios.md @@ -21,7 +21,7 @@ Key | Value --- | --- Content-Type | application/json Accept | application/json -Email | application/json +Email | myemail@gmail.com ### Request Payloads Name | Type | Example Value @@ -48,8 +48,7 @@ HTTP Code | Status | Description 400 | Bad Request | bad request payload 404 | Not Found | branch not found in database 403 | Forbidden | branch_code is not owned by user login -500 | Internal Server Error | some un-handle error in server -200 | OK | OK +500 | Internal Server Error | some un-handle error in server 201 | Created | add data kios ``` { @@ -61,8 +60,8 @@ HTTP Code | Status | Description ``` { - "status_code": "CDC-200", - "status_message": "OK", + "status_code": "CDC-201", + "status_message": "Created", "data": { "id": 1, "kios_name": "mandala", @@ -308,7 +307,7 @@ Key | Value --- | --- Content-Type | application/json Accept | application/json -Email | application/json +Email | myemail@gmail.com ### Request Payloads Name | Type | Example Value @@ -599,7 +598,7 @@ Key | Value --- | --- Content-Type | application/json Accept | application/json -Email | application/json +Email | myemail@gmail.com ### Response Payloads HTTP Code | Status | Description @@ -686,28 +685,20 @@ Key | Value --- | --- Content-Type | * Accept | application/json -Email | application/json +Email | myemail@gmail.com ### Response Payloads HTTP Code | Status | Description --- | --- | --- -400 | Bad Request | Bad request payload 404 | Not Found | Kios not found in database 403 | Forbidden | id not owned by user login -500 | Internal Server Error | some un-handle error in server -200 | OK | OK +500 | Internal Server Error | some un-handle error in server 204 | No Content | Delete data kios -``` -{ - "status_code": "CDC-400", - "status_message": "Bad Request", -} -``` ``` { - "status_code": "CDC-200", - "status_message": "OK", + "status_code": "CDC-204", + "status_message": "No Content", } ``` @@ -732,10 +723,4 @@ Response Payload : #### Case : Positive Case -``` -{ - "id": 1 -} -``` - response HTTP Status Code : 204 \ No newline at end of file