feat: add OpenAPI support for task creation

This commit is contained in:
duorameng
2026-06-01 17:18:38 +08:00
parent f954b3946a
commit 1863ed58cf
3 changed files with 64 additions and 47 deletions
+1
View File
@@ -29,6 +29,7 @@ func initOpenAPIV1Routes(root *gin.RouterGroup, c *Controllers) {
func registerOpenAPITaskRoutes(g *gin.RouterGroup, c *Controllers) {
tasks := g.Group("/tasks")
{
tasks.POST("", c.Task.CreateTask)
tasks.GET("", c.Task.GetTasks)
tasks.GET("/:id", c.Task.GetTask)
tasks.PUT("/:id", c.Task.UpdateTask)