Implement task API with input validation; implement error handling; refactoring
This commit is contained in:
parent
19d264a03b
commit
50aff05614
24 changed files with 612 additions and 131 deletions
28
api_tests/tasks.http
Normal file
28
api_tests/tasks.http
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
### Fetch all tasks
|
||||
GET {{api_host}}/api/tasks
|
||||
|
||||
|
||||
### Fetch one task
|
||||
GET {{api_host}}/api/tasks/1
|
||||
|
||||
|
||||
### Create new task
|
||||
POST {{api_host}}/api/tasks
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"title": "Some test task"
|
||||
}
|
||||
|
||||
|
||||
### Update task
|
||||
PATCH {{api_host}}/api/tasks/1
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"description": "Update!"
|
||||
}
|
||||
|
||||
|
||||
### Delete task
|
||||
DELETE {{api_host}}/api/tasks/10
|
||||
Loading…
Add table
Add a link
Reference in a new issue