Skip to content

Commit 6f6c6e6

Browse files
Merge pull request #76 from AdaGold/ks_update_wave_docs_for_flask_changes
Update Wave docs to use `204 No Content` where appropriate
2 parents 4bc7b8d + 9ecc971 commit 6f6c6e6

File tree

3 files changed

+32
-32
lines changed

3 files changed

+32
-32
lines changed

ada-project-docs/wave_01.md

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -150,32 +150,19 @@ As a client, I want to be able to make a `PUT` request to `/tasks/1` when there
150150

151151
and get this response:
152152

153-
`200 OK`
153+
`204 No Content`
154154

155-
```json
156-
{
157-
"task": {
158-
"id": 1,
159-
"title": "Updated Task Title",
160-
"description": "Updated Test Description",
161-
"is_complete": false
162-
}
163-
}
164-
```
155+
The response should have a mimetype of "application/json" to keep our API response type consistent.
165156

166157
Note that the update endpoint does update the `completed_at` attribute. This will be updated with custom endpoints implemented in Wave 3.
167158

168159
#### Delete Task: Deleting a Task
169160

170161
As a client, I want to be able to make a `DELETE` request to `/tasks/1` when there is at least one saved task and get this response:
171162

172-
`200 OK`
163+
`204 No Content`
173164

174-
```json
175-
{
176-
"details": "Task 1 \"Go on my daily walk 🏞\" successfully deleted"
177-
}
178-
```
165+
The response should have a mimetype of "application/json" to keep our API response type consistent.
179166

180167
#### No Matching Task: Get, Update, and Delete
181168

ada-project-docs/wave_03.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ when I send a `PATCH` request to `/tasks/1/mark_complete`,
3434

3535
then the task is updated, so that its `completed_at` value is the current date, and I get this response:
3636

37+
`204 No Content`
38+
39+
The response should have a mimetype of "application/json" to keep our API response type consistent.
40+
41+
After I have made the `PATCH` request, I can submit a `GET` request to `/tasks/1`, which will return the response:
42+
3743
`200 OK`
3844

3945
```json
@@ -58,6 +64,12 @@ when I send a `PATCH` request to `/tasks/1/mark_incomplete`,
5864

5965
then the task is updated, so that its `completed_at` value is `null`/`None`, and I get this response:
6066

67+
`204 No Content`
68+
69+
The response should have a mimetype of "application/json" to keep our API response type consistent.
70+
71+
After I have made the `PATCH` request, I can submit a `GET` request to `/tasks/1`, which will return the response:
72+
6173
`200 OK`
6274

6375
```json
@@ -82,6 +94,12 @@ when I send a `PATCH` request to `/tasks/1/mark_complete`,
8294

8395
then I want this to behave exactly like `/tasks/1/mark_complete` for an incomplete task. The task is updated, so that its `completed_at` value is the current date, and I get this response:
8496

97+
`204 No Content`
98+
99+
The response should have a mimetype of "application/json" to keep our API response type consistent.
100+
101+
After I have made the `PATCH` request, I can submit a `GET` request to `/tasks/1`, which will return the response:
102+
85103
`200 OK`
86104

87105
```json
@@ -106,6 +124,12 @@ when I send a `PATCH` request to `/tasks/1/mark_incomplete`,
106124

107125
then I want this to behave exactly like `/tasks/1/mark_incomplete` for a complete task. Its `completed_at` value remains as `null`/`None`, and I get this response:
108126

127+
`204 No Content`
128+
129+
The response should have a mimetype of "application/json" to keep our API response type consistent.
130+
131+
After I have made the `PATCH` request, I can submit a `GET` request to `/tasks/1`, which will return the response:
132+
109133
`200 OK`
110134

111135
```json

ada-project-docs/wave_05.md

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -125,28 +125,17 @@ As a client, I want to be able to make a `PUT` request to `/goals/1` when there
125125

126126
and get this response:
127127

128-
`200 OK`
128+
`204 No Content`
129129

130-
```json
131-
{
132-
"goal": {
133-
"id": 1,
134-
"title": "Updated Goal Title"
135-
}
136-
}
137-
```
130+
The response should have a mimetype of "application/json" to keep our API response type consistent.
138131

139132
### Delete Goal: Deleting a Goal
140133

141134
As a client, I want to be able to make a `DELETE` request to `/goals/1` when there is at least one saved goal and get this response:
142135

143-
`200 OK`
136+
`204 No Content`
144137

145-
```json
146-
{
147-
"details": "Goal 1 \"Build a habit of going outside daily\" successfully deleted"
148-
}
149-
```
138+
The response should have a mimetype of "application/json" to keep our API response type consistent.
150139

151140
### No matching Goal: Get, Update, and Delete
152141

0 commit comments

Comments
 (0)