-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add HTTP request files for Todo items and lists operations
- Loading branch information
Showing
5 changed files
with
82 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
@host = https://localhost:7098 | ||
@listId = 1 | ||
|
||
### Create Todo Item 1 | ||
POST {{host}}/api/todo-items | ||
Content-Type: application/json | ||
|
||
{ | ||
"listId": {{listId}}, | ||
"title": "Todo Item 1" | ||
} | ||
|
||
### Create Todo Item 2 | ||
POST {{host}}/api/todo-items | ||
Content-Type: application/json | ||
|
||
{ | ||
"listId": {{listId}}, | ||
"title": "Todo Item 2" | ||
} | ||
|
||
### Create Todo Item 3 | ||
POST {{host}}/api/todo-items | ||
Content-Type: application/json | ||
|
||
{ | ||
"listId": {{listId}}, | ||
"title": "Todo Item 3" | ||
} | ||
|
||
### Create Todo item with empty title. Check for 400 Bad Request | ||
POST {{host}}/api/todo-items | ||
Content-Type: application/json | ||
|
||
{ | ||
"listId": {{listId}}, | ||
"title": "" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@host = https://localhost:7098 | ||
@listId = 1 | ||
|
||
### Get Todo items with default pagination | ||
GET {{host}}/api/todo-items?ListId={{listId}} | ||
Content-Type: application/json | ||
|
||
### Get Todo items with pagination, pageSize = 1, pageNumber = 2 | ||
GET {{host}}/api/todo-items?ListId={{listId}}&pageSize=1&pageNumber=2 |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
@host = https://localhost:7098 | ||
@itemId = 1 | ||
|
||
### Update Todo itemId = 1 with title = "Updated Todo Item 1" and done = true | ||
PUT {{host}}/api/todo-items/{{itemId}} | ||
Content-Type: application/json | ||
|
||
{ | ||
"id": {{itemId}}, | ||
"title": "Updated Todo Item 1", | ||
"done": true | ||
} | ||
|
||
### Update Todo itemId = 1 with wrong itemId. Check for 400 Bad Request | ||
PUT {{host}}/api/todo-items/0 | ||
Content-Type: application/json | ||
|
||
{ | ||
"id": {{itemId}}, | ||
"title": "Updated Todo Item 1", | ||
"done": true | ||
} |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@host = https://localhost:7098 | ||
|
||
### Create Todo List item | ||
POST {{host}}/api/todo-lists | ||
Content-Type: application/json | ||
|
||
{ | ||
"title": "List 2" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@host = https://localhost:7098 | ||
|
||
### Get Todo lists | ||
GET {{host}}/api/todo-lists |