diff --git a/ScrumTaskboard/Controllers/CategoriesController.cs b/ScrumTaskboard/Controllers/CategoriesController.cs index 0790e30..eef87be 100644 --- a/ScrumTaskboard/Controllers/CategoriesController.cs +++ b/ScrumTaskboard/Controllers/CategoriesController.cs @@ -26,7 +26,15 @@ namespace ScrumTaskboard.Controllers } // GET: api/category - #nullable enable + /// + /// Retrieve all Categories in DB. + /// Result can be filtered using the Params. + /// + /// string value + /// ID of created Project + /// string value + /// JSON list of all matching Categories +#nullable enable [HttpGet] public async Task>> GetCategory([FromQuery]string? title, [FromQuery]int? projectid, [FromQuery] string? color) { @@ -48,9 +56,14 @@ namespace ScrumTaskboard.Controllers return await filtered.ToListAsync(); } - #nullable disable +#nullable disable // GET: api/category/1 + /// + /// Retrieve the Category by it's ID. + /// + /// ID of searched Category + /// JSON object [HttpGet("{id}")] public async Task> GetCategory(int id) { @@ -65,6 +78,12 @@ namespace ScrumTaskboard.Controllers } // PUT: api/category/1 + /// + /// Update the Category identified by it's ID. + /// + /// to edit Category's ID + /// modified Category + /// the proper status code [HttpPut("{id}")] public async Task PutCategory(int id, ScrumCategory category) { @@ -99,6 +118,11 @@ namespace ScrumTaskboard.Controllers } // POST: api/category + /// + /// Create a new Category. + /// + /// new Category + /// the proper status code [HttpPost] public async Task> PostCategory(ScrumCategory category) { @@ -110,6 +134,11 @@ namespace ScrumTaskboard.Controllers } // DELETE: api/category/1 + /// + /// Delete a Category identified by it's ID. + /// + /// to delete Category's ID + /// the proper status code [HttpDelete("{id}")] public async Task> DeleteCategory(int id) { diff --git a/ScrumTaskboard/Controllers/ProjectsController.cs b/ScrumTaskboard/Controllers/ProjectsController.cs index 5c488f4..d57f637 100644 --- a/ScrumTaskboard/Controllers/ProjectsController.cs +++ b/ScrumTaskboard/Controllers/ProjectsController.cs @@ -26,7 +26,14 @@ namespace ScrumTaskboard.Controllers } // GET: api/projects - #nullable enable + /// + /// Retrieve all Projects in DB. + /// Result can be filtered using the Params. + /// + /// string value + /// boolean value + /// JSON list of all matching Projects +#nullable enable [HttpGet] public async Task>> GetProject([FromQuery]string? title, [FromQuery]bool? isprivate) { @@ -43,9 +50,14 @@ namespace ScrumTaskboard.Controllers return await filtered.ToListAsync(); } - #nullable disable +#nullable disable // GET: api/projects/5 + /// + /// Retrieve the Project by it's ID. + /// + /// ID of searched Project + /// JSON object [HttpGet("{id}")] public async Task> GetProjects(int id) { @@ -60,6 +72,12 @@ namespace ScrumTaskboard.Controllers } // PUT: api/Project/5 + /// + /// Update the Project identified by it's ID. + /// + /// to edit Project's ID + /// modified Project + /// the proper status code [HttpPut("{id}")] public async Task PutProject(int id, ScrumProject projects) { @@ -94,6 +112,11 @@ namespace ScrumTaskboard.Controllers } // POST: api/Project + /// + /// Create a new Project. + /// + /// new Project + /// the proper status code [HttpPost] public async Task> PostProject(ScrumProject projects) { @@ -105,6 +128,11 @@ namespace ScrumTaskboard.Controllers } // DELETE: api/Project/5 + /// + /// Delete a Project identified by it's ID. + /// + /// to delete Project's ID + /// the proper status code [HttpDelete("{id}")] public async Task> DeleteProject(int id) { diff --git a/ScrumTaskboard/Controllers/SprintsController.cs b/ScrumTaskboard/Controllers/SprintsController.cs index 919633f..26eaba8 100644 --- a/ScrumTaskboard/Controllers/SprintsController.cs +++ b/ScrumTaskboard/Controllers/SprintsController.cs @@ -26,7 +26,16 @@ namespace ScrumTaskboard.Controllers } // GET: api/sprint - #nullable enable + /// + /// Retrieve all Sprints in DB. + /// Result can be filtered using the Params. + /// + /// string value + /// ID of created Project + /// DateTime value + /// DateTime value + /// JSON list of all matching Sprints +#nullable enable [HttpGet] public async Task>> GetSprint([FromQuery]string? title, [FromQuery]int? projectid, [FromQuery]DateTime? startDate, [FromQuery]DateTime? endDate) { @@ -51,9 +60,14 @@ namespace ScrumTaskboard.Controllers return await filtered.ToListAsync(); } - #nullable disable +#nullable disable // GET: api/sprint/5 + /// + /// Retrieve the Sprint by it's ID. + /// + /// ID of searched Sprint + /// JSON object [HttpGet("{id}")] public async Task> GetSprint(int id) { @@ -68,6 +82,12 @@ namespace ScrumTaskboard.Controllers } // PUT: api/sprint/5 + /// + /// Update the Sprint identified by it's ID. + /// + /// to edit Sprint's ID + /// modified Sprint + /// the proper status code [HttpPut("{id}")] public async Task PutSprint(int id, ScrumSprint sprint) { @@ -102,6 +122,11 @@ namespace ScrumTaskboard.Controllers } // POST: api/Sprint + /// + /// Create a new Sprint. + /// + /// new Sprint + /// the proper status code [HttpPost] public async Task> PostSprint(ScrumSprint sprint) { @@ -113,6 +138,11 @@ namespace ScrumTaskboard.Controllers } // DELETE: api/Sprint/5 + /// + /// Delete a Sprint identified by it's ID. + /// + /// to delete Sprint's ID + /// the proper status code [HttpDelete("{id}")] public async Task> DeleteSprint(int id) { diff --git a/ScrumTaskboard/Controllers/StatusController.cs b/ScrumTaskboard/Controllers/StatusController.cs index 08830ac..926347b 100644 --- a/ScrumTaskboard/Controllers/StatusController.cs +++ b/ScrumTaskboard/Controllers/StatusController.cs @@ -25,7 +25,13 @@ namespace ScrumTaskboard.Controllers } // GET: api/status - #nullable enable + /// + /// Retrieve all Status in DB. + /// Result can be filtered using the Params. + /// + /// string value + /// JSON list of all matching status +#nullable enable [HttpGet] public async Task>> GetStatus([FromQuery]string? title) { @@ -38,9 +44,14 @@ namespace ScrumTaskboard.Controllers return await filtered.ToListAsync(); } - #nullable enable +#nullable enable // GET: api/status/1 + /// + /// Retrieve the Status by it's ID. + /// + /// ID of searched Status + /// JSON object [HttpGet("{id}")] public async Task> GetStatus(int id) { @@ -55,6 +66,12 @@ namespace ScrumTaskboard.Controllers } // PUT: api/status/1 + /// + /// Update the Status identified by it's ID. + /// + /// to edit Status' ID + /// modified Userstory + /// the proper status code [HttpPut("{id}")] public async Task PutStatus(int id, ScrumStatus userstory) { @@ -89,6 +106,11 @@ namespace ScrumTaskboard.Controllers } // POST: api/status + /// + /// Create a new Status. + /// + /// new Userstory + /// the proper status code [HttpPost] public async Task> PostTask(ScrumStatus userstory) { @@ -100,6 +122,11 @@ namespace ScrumTaskboard.Controllers } // DELETE: api/status/1 + /// + /// Create a new Status. + /// + /// to delete Status' ID + /// the proper status code [HttpDelete("{id}")] public async Task> DeleteStatus(int id) { diff --git a/ScrumTaskboard/Controllers/TasksController.cs b/ScrumTaskboard/Controllers/TasksController.cs index 91e9794..392c680 100644 --- a/ScrumTaskboard/Controllers/TasksController.cs +++ b/ScrumTaskboard/Controllers/TasksController.cs @@ -26,7 +26,18 @@ namespace ScrumTaskboard.Controllers } // GET: api/tasks - #nullable enable + /// + /// Retrieve all Tasks in DB. + /// Result can be filtered using the Params. + /// + /// string value + /// ID of created Userstory + /// ID of created Status + /// ID of the Assignedto + /// ID of created Project + /// enum value + /// JSON list of all matching Tasks +#nullable enable [HttpGet] public async Task>> GetTasks([FromQuery]string? title, [FromQuery]int? userstoryid, [FromQuery]int? statusid, [FromQuery]int? assignedtoid, [FromQuery]int? projectid, [FromQuery]ScrumPrio? priority) { @@ -60,9 +71,14 @@ namespace ScrumTaskboard.Controllers return await filtered.ToListAsync(); } - #nullable disable +#nullable disable // GET: api/tasks/5 + /// + /// Retrieve the Task by it's ID. + /// + /// ID of searched Task + /// JSON object [HttpGet("{id}")] public async Task> GetTask(int id) { @@ -77,6 +93,12 @@ namespace ScrumTaskboard.Controllers } // PUT: api/tasks/5 + /// + /// Update the Task identified by it's ID. + /// + /// to edit Task's ID + /// modified Task + /// the proper status code [HttpPut("{id}")] public async Task PutTask(int id, ScrumTask task) { @@ -111,6 +133,11 @@ namespace ScrumTaskboard.Controllers } // POST: api/tasks + /// + /// Create a new Task. + /// + /// new Task + /// the proper status code [HttpPost] public async Task> PostTask(ScrumTask task) { @@ -122,6 +149,11 @@ namespace ScrumTaskboard.Controllers } // DELETE: api/tasks/5 + /// + /// Delete a Task identified by it's ID. + /// + /// to delete Task's ID + /// the proper status code [HttpDelete("{id}")] public async Task> DeleteTask(int id) { diff --git a/ScrumTaskboard/Controllers/UsersController.cs b/ScrumTaskboard/Controllers/UsersController.cs index 014ddfb..284c7c2 100644 --- a/ScrumTaskboard/Controllers/UsersController.cs +++ b/ScrumTaskboard/Controllers/UsersController.cs @@ -25,7 +25,13 @@ namespace ScrumTaskboard.Controllers } // GET: api/sprint - #nullable enable + /// + /// Retrieve all Users in DB. + /// Result can be filtered using the Params. + /// + /// string value + /// JSON list of all matching Users +#nullable enable [HttpGet] public async Task>> GetUser([FromQuery]string? name) { @@ -37,9 +43,14 @@ namespace ScrumTaskboard.Controllers return await filtered.ToListAsync(); } - #nullable disable +#nullable disable // GET: api/sprint/5 + /// + /// Retrieve the User by it's ID. + /// + /// ID of searched User + /// JSON object [HttpGet("{id}")] public async Task> GetUser(int id) { @@ -54,6 +65,12 @@ namespace ScrumTaskboard.Controllers } // PUT: api/sprint/5 + /// + /// Update the User identified by it's ID. + /// + /// to edit User's ID + /// modified Sprint + /// the proper status code [HttpPut("{id}")] public async Task PutUser(int id, ScrumUser sprint) { @@ -88,6 +105,11 @@ namespace ScrumTaskboard.Controllers } // POST: api/User + /// + /// Create a new User. + /// + /// new Sprint + /// the proper status code [HttpPost] public async Task> PostUser(ScrumUser sprint) { @@ -99,6 +121,11 @@ namespace ScrumTaskboard.Controllers } // DELETE: api/User/5 + /// + /// Delete a User identified by it's ID. + /// + /// to delete User's ID + /// the proper status code [HttpDelete("{id}")] public async Task> DeleteUser(int id) { diff --git a/ScrumTaskboard/Controllers/UserstoriesController.cs b/ScrumTaskboard/Controllers/UserstoriesController.cs index 898216e..65aff6b 100644 --- a/ScrumTaskboard/Controllers/UserstoriesController.cs +++ b/ScrumTaskboard/Controllers/UserstoriesController.cs @@ -26,7 +26,19 @@ namespace ScrumTaskboard.Controllers } // GET: api/userstories - #nullable enable + /// + /// Retrieve all Userstories in DB. + /// Result can be filtered using the Params. + /// + /// string value + /// ID of created Status + /// ID of created Category + /// ID of the Author + /// ID of created Project + /// ID of created Project + /// enum value + /// JSON list of all matching Userstories +#nullable enable [HttpGet] public async Task>> GetUserstory([FromQuery]string? title, [FromQuery]int? statusid, [FromQuery]int? categoryid, [FromQuery]int? createdbyid, [FromQuery]int? projectid, [FromQuery]int? sprintid, [FromQuery]ScrumPrio? priority) { @@ -64,9 +76,14 @@ namespace ScrumTaskboard.Controllers return await filtered.ToListAsync(); } - #nullable disable +#nullable disable // GET: api/userstories/1 + /// + /// Retrieve the Userstory by it's ID. + /// + /// ID of searched Userstory + /// JSON object [HttpGet("{id}")] public async Task> GetUserstory(int id) { @@ -81,6 +98,12 @@ namespace ScrumTaskboard.Controllers } // PUT: api/userstories/1 + /// + /// Update the Userstory identified by it's ID. + /// + /// to edit Userstory's ID + /// modified Userstory + /// the proper status code [HttpPut("{id}")] public async Task PutUserstory(int id, ScrumUserstory userstory) { @@ -115,6 +138,11 @@ namespace ScrumTaskboard.Controllers } // POST: api/userstories + /// + /// Create a new Userstory. + /// + /// new Userstory + /// the proper status code [HttpPost] public async Task> PostTask(ScrumUserstory userstory) { @@ -126,6 +154,11 @@ namespace ScrumTaskboard.Controllers } // DELETE: api/userstories/1 + /// + /// Delete a Userstory identified by it's ID. + /// + /// to delete Userstory's ID + /// the proper status code [HttpDelete("{id}")] public async Task> DeleteUserstory(int id) {