Skip to content

Commit f62060b

Browse files
committed
update readme
1 parent 1829579 commit f62060b

1 file changed

Lines changed: 14 additions & 10 deletions

File tree

README.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,16 @@ To inspect the database while the app is running, open the H2 console at `http:/
5252

5353
## Endpoints
5454

55-
| Method | Path | Description |
56-
|--------|--------------------------------|--------------------------|
57-
| POST | `/tasks` | Create a task |
58-
| GET | `/tasks` | Fetch all tasks |
59-
| GET | `/tasks/{id}` | Fetch a task by ID |
60-
| GET | `/tasks/search/{name}` | Fetch a task by name |
61-
| GET | `/tasks/search/status/{status}`| Fetch tasks by status |
62-
| PATCH | `/tasks/{id}/complete` | Mark a task as complete |
63-
| DELETE | `/tasks/{id}` | Soft delete a task |
64-
| PATCH | `/tasks/{id}` | Undo a delete |
55+
| Method | Path | Description | Status |
56+
|--------|--------------------------------|--------------------------|--------|
57+
| POST | `/tasks` | Create a task | 201 |
58+
| GET | `/tasks` | Fetch all tasks | 200 |
59+
| GET | `/tasks/{id}` | Fetch a task by ID | 200 |
60+
| GET | `/tasks/search/{name}` | Fetch a task by name | 200 |
61+
| GET | `/tasks/search/status/{status}`| Fetch tasks by status | 200 |
62+
| PATCH | `/tasks/{id}/complete` | Mark a task as complete | 200 |
63+
| DELETE | `/tasks/{id}` | Soft delete a task | 200 |
64+
| PATCH | `/tasks/{id}` | Undo a delete | 200 |
6565

6666
### Examples
6767

@@ -108,6 +108,7 @@ All errors return a consistent JSON response:
108108
| Scenario | Status |
109109
|---------------------------|--------|
110110
| Task not found | 404 |
111+
| Invalid request body | 400 |
111112
| Invalid status value | 400 |
112113
| Unexpected server error | 500 |
113114

@@ -127,6 +128,9 @@ src/
127128
│ ├── java/com/taskmanagerapi/
128129
│ │ ├── controller/
129130
│ │ │ └── TaskController.java
131+
│ │ ├── dto/
132+
│ │ │ ├── TaskRequest.java
133+
│ │ │ └── TaskResponse.java
130134
│ │ ├── exception/
131135
│ │ │ ├── GlobalExceptionHandler.java
132136
│ │ │ └── TaskNotFoundException.java

0 commit comments

Comments
 (0)