add swagger documentation

This commit is contained in:
André Roth
2024-09-30 21:31:12 +02:00
parent 1d1bd41bb8
commit fb538333fa
8 changed files with 169 additions and 15 deletions
+6 -1
View File
@@ -9,7 +9,12 @@ import (
"github.com/gin-gonic/gin"
)
// GET /tasks
// @Summary Get tasks
// @Description Get list of available tasks. Each task is returned as in “show” API.
// @Tags Tasks
// @Produce json
// @Success 200 {array} task.Task
// @Router /api/tasks [get]
func apiTasksList(c *gin.Context) {
list := context.TaskList()
c.JSON(200, list.GetTasks())