diff --git a/CleanArchitecture.sln b/CleanArchitecture.sln index dbc65d09d..00afa1572 100644 --- a/CleanArchitecture.sln +++ b/CleanArchitecture.sln @@ -28,13 +28,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution global.json = global.json EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "playground", "playground", "{23C6AA70-9BAB-4963-973D-44D3274F34D8}" - ProjectSection(SolutionItems) = preProject - playground\TodoItems.http = playground\TodoItems.http - playground\TodoLists.http = playground\TodoLists.http - playground\WeatherForecast.http = playground\WeatherForecast.http - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/playground/TodoItems.http b/playground/TodoItems.http deleted file mode 100644 index 0480dd231..000000000 --- a/playground/TodoItems.http +++ /dev/null @@ -1,57 +0,0 @@ -@AuthToken = eyJhbGciOiJSUzI1NiIsImtpZCI6IkRldmVsb3BtZW50IiwidHlwIjoiYXQrand0In0.eyJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo0NDQ0NyIsIm5iZiI6MTY3NzkyNTI0NywiaWF0IjoxNjc3OTI1MjQ3LCJleHAiOjE2Nzc5Mjg4NDcsImF1ZCI6IldlYlVJQVBJIiwic2NvcGUiOlsiV2ViVUlBUEkiLCJvcGVuaWQiLCJwcm9maWxlIl0sImFtciI6WyJwd2QiXSwiY2xpZW50X2lkIjoiQ2xlYW5BcmNoaXRlY3R1cmUuV2ViVUkiLCJzdWIiOiI3M2YzY2RiMC02YjRkLTRlZGEtOGYzMy03ZjFjODYyMzRiMTUiLCJhdXRoX3RpbWUiOjE2Nzc5MjUyNDQsImlkcCI6ImxvY2FsIiwic2lkIjoiOTM5REY4NzM0MzczN0E4OEQwQTREOEE2MTI0RjRDMTEiLCJqdGkiOiI0Nzg0QzFFMDNGQzlDMTFGRDkwMjEyRTMwMTVBRUQ4NSJ9.wSzL7_5cUNSCocZei-_iBulEh9PpoSsFrdeOymB7zIJ1B1sXXNS0hMMlWEJryNhcJ5wocJitUs35cYnZCDAv5ufUssztSttIG6GDAVxBbJsKVQsELPdC-FzjZx5fOCd9VXGkkykl2lcJtCQpuOuEFKR_eo6koqX4iI_kK33r10a3tCUjsZfVz3-wbLoK7imDcISNbGZosTMEZfw-BTvBIKoAn5DndgWWs0xp9LIphP2a-mczd7PKDiUriRyT1TMn_CGsyd1MUb9mvD0aV2jiPc5qRm5Rf4KKQTWKSkKv_ToTRSCWSvwV7HLOwOcY0dn4mYaNHHbc7wUDIkozHGkATA -@listId = 1 -@id = 8 - -# GET TodoItems -@pageNumber = 1 -@pageSize = 10 -GET https://localhost:44447/api/TodoItems?ListId={{listId}}&PageNumber={{pageNumber}}&PageSize={{pageSize}} -Authorization: Bearer {{AuthToken}} - -### - -# POST TodoItems -POST https://localhost:44447/api/TodoItems -Authorization: Bearer {{AuthToken}} -Content-Type: application/json - -{ - "listId": {{listId}}, - "title": "My todo item" -} - - -### - -#POST TodoItems - -PUT https://localhost:44447/api/TodoItems/{{id}} -Authorization: Bearer {{AuthToken}} -Content-Type: application/json - -{ - "id": {{id}}, - "title": "My edited todo item", - "done": true -} - -### - -#DELETE TodoItems -DELETE https://localhost:44447/api/TodoItems/{{id}} -Authorization: Bearer {{AuthToken}} - - -### - -#PUT TodoItems UpdateItemDetails -PUT https://localhost:44447/api/TodoItems/UpdateItemDetails?id={{id}} -Authorization: Bearer {{AuthToken}} -Content-Type: application/json - -{ - "id": {{id}}, - "listId": {{listId}}, - "priority": 0, - "note": "My note" -} diff --git a/playground/TodoLists.http b/playground/TodoLists.http deleted file mode 100644 index d9ee583a4..000000000 --- a/playground/TodoLists.http +++ /dev/null @@ -1,41 +0,0 @@ -@AuthToken = eyJhbGciOiJSUzI1NiIsImtpZCI6IkRldmVsb3BtZW50IiwidHlwIjoiYXQrand0In0.eyJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo0NDQ0NyIsIm5iZiI6MTY3NzkyNTI0NywiaWF0IjoxNjc3OTI1MjQ3LCJleHAiOjE2Nzc5Mjg4NDcsImF1ZCI6IldlYlVJQVBJIiwic2NvcGUiOlsiV2ViVUlBUEkiLCJvcGVuaWQiLCJwcm9maWxlIl0sImFtciI6WyJwd2QiXSwiY2xpZW50X2lkIjoiQ2xlYW5BcmNoaXRlY3R1cmUuV2ViVUkiLCJzdWIiOiI3M2YzY2RiMC02YjRkLTRlZGEtOGYzMy03ZjFjODYyMzRiMTUiLCJhdXRoX3RpbWUiOjE2Nzc5MjUyNDQsImlkcCI6ImxvY2FsIiwic2lkIjoiOTM5REY4NzM0MzczN0E4OEQwQTREOEE2MTI0RjRDMTEiLCJqdGkiOiI0Nzg0QzFFMDNGQzlDMTFGRDkwMjEyRTMwMTVBRUQ4NSJ9.wSzL7_5cUNSCocZei-_iBulEh9PpoSsFrdeOymB7zIJ1B1sXXNS0hMMlWEJryNhcJ5wocJitUs35cYnZCDAv5ufUssztSttIG6GDAVxBbJsKVQsELPdC-FzjZx5fOCd9VXGkkykl2lcJtCQpuOuEFKR_eo6koqX4iI_kK33r10a3tCUjsZfVz3-wbLoK7imDcISNbGZosTMEZfw-BTvBIKoAn5DndgWWs0xp9LIphP2a-mczd7PKDiUriRyT1TMn_CGsyd1MUb9mvD0aV2jiPc5qRm5Rf4KKQTWKSkKv_ToTRSCWSvwV7HLOwOcY0dn4mYaNHHbc7wUDIkozHGkATA -@id = 1 - -# GET TodoLists -GET https://localhost:44447/api/TodoLists -Authorization: Bearer {{AuthToken}} - -### - -#GET TodoList -GET https://localhost:44447/api/TodoLists/{{id}} -Authorization: Bearer {{AuthToken}} - -### - -#POST TodoList -POST https://localhost:44447/api/TodoLists -Authorization: Bearer {{AuthToken}} -Content-Type: application/json - -{ - "Title": "My Todo List" -} - -### - -#PUT TodoList -PUT https://localhost:44447/api/TodoLists/{{id}} -Authorization: Bearer {{AuthToken}} -Content-Type: application/json - -{ - "Id": {{id}}, - "Title": "My Todo List edited" -} - -### - -#DELETE TodoList -DELETE https://localhost:44447/api/TodoLists/{{id}} -Authorization: Bearer {{AuthToken}} \ No newline at end of file diff --git a/playground/WeatherForecast.http b/playground/WeatherForecast.http deleted file mode 100644 index d5ba8d7c3..000000000 --- a/playground/WeatherForecast.http +++ /dev/null @@ -1,2 +0,0 @@ -#GET WeatherForecast -GET https://localhost:44447/api/WeatherForecast \ No newline at end of file diff --git a/src/WebUI/WebUI.http b/src/WebUI/WebUI.http new file mode 100644 index 000000000..0c0fff700 --- /dev/null +++ b/src/WebUI/WebUI.http @@ -0,0 +1,109 @@ +# For more info on HTTP files go to https://aka.ms/vs/httpfile +@WebUI_HostAddress = https://localhost:5001 +@AuthCookieName = .AspNetCore.Identity.Application +@AuthCookieValue = + +# GET WeatherForecast +GET {{WebUI_HostAddress}}/api/weatherforecast +Cookie: {{AuthCookieName}}={{AuthCookieValue}} + +### + +# GET TodoLists +GET {{WebUI_HostAddress}}/api/TodoLists +Cookie: {{AuthCookieName}}={{AuthCookieValue}} + +### + +#GET TodoList +GET {{WebUI_HostAddress}}/api/TodoLists/1 +Cookie: {{AuthCookieName}}={{AuthCookieValue}} + +### + +# POST TodoLists +POST {{WebUI_HostAddress}}/api/TodoLists +Cookie: {{AuthCookieName}}={{AuthCookieValue}} +Content-Type: application/json + +// CreateTodoListCommand +{ + "Title": "Backlog" +} + +### + +# PUT TodoLists +PUT {{WebUI_HostAddress}}/api/TodoLists/1 +Cookie: {{AuthCookieName}}={{AuthCookieValue}} +Content-Type: application/json + +// UpdateTodoListCommand +{ + "Id": 1, + "Title": "Product Backlog" +} + +### + +# DELETE TodoLists +DELETE {{WebUI_HostAddress}}/api/TodoLists/1 +Cookie: {{AuthCookieName}}={{AuthCookieValue}} + +### + +# GET TodoItems +@PageNumber = 1 +@PageSize = 10 +GET {{WebUI_HostAddress}}/api/TodoItems?ListId=1&PageNumber={{PageNumber}}&PageSize={{PageSize}} +Cookie: {{AuthCookieName}}={{AuthCookieValue}} + +### + +# POST TodoItems +POST {{WebUI_HostAddress}}/api/TodoItems +Cookie: {{AuthCookieName}}={{AuthCookieValue}} +Content-Type: application/json + +// CreateTodoItemCommand +{ + "ListId": 1, + "Title": "Eat a burrito 🌯" +} + +### + +#PUT TodoItems UpdateItemDetails +PUT {{WebUI_HostAddress}}/api/TodoItems/UpdateItemDetails?Id=1 +Cookie: {{AuthCookieName}}={{AuthCookieValue}} +Content-Type: application/json + +// UpdateTodoItemDetailCommand +{ + "Id": 1, + "ListId": 1, + "Priority": 3, + "Note": "This is a good idea!" +} + +### + +# PUT TodoItems +PUT {{WebUI_HostAddress}}/api/TodoItems/1 +Cookie: {{AuthCookieName}}={{AuthCookieValue}} +Content-Type: application/json + +// UpdateTodoItemCommand +{ + "Id": 1, + "Title": "Eat a yummy burrito 🌯", + "Done": true +} + +### + +# DELETE TodoItem +DELETE {{WebUI_HostAddress}}/api/TodoItems/1 +Cookie: {{AuthCookieName}}={{AuthCookieValue}} + +### \ No newline at end of file