diff --git a/main.go b/main.go index 6a529b0..b86fd41 100644 --- a/main.go +++ b/main.go @@ -1,3 +1,17 @@ +// Package classification Janex API Documentation. +// +// Schemes: https +// Host: janex +// BasePath: /v1 +// Version: 0.0.1 +// +// Consumes: +// - application/json +// +// Produces: +// - application/json +// +// swagger:meta package main import ( diff --git a/public/swagger b/public/swagger new file mode 160000 index 0000000..afb9610 --- /dev/null +++ b/public/swagger @@ -0,0 +1 @@ +Subproject commit afb9610f411d273474c018bca60725cf6afa6472 diff --git a/routers/router/api/v1/grouptask/grouptask.go b/routers/router/api/v1/grouptask/grouptask.go index be70a9c..17b0184 100644 --- a/routers/router/api/v1/grouptask/grouptask.go +++ b/routers/router/api/v1/grouptask/grouptask.go @@ -13,6 +13,30 @@ import ( ) func StartGroupTask(c *fiber.Ctx) error { + // swagger:operation POST /grouptasks/start grouptasks grouptasksStart + // --- + // summary: Start a new group task + // consumes: + // - application/json + // produces: + // - application/json + // parameters: + // - name: X-Api-Key + // in: header + // description: You can create a new api key in your user profile + // - name: body + // in: body + // description: JSON -> Category str, GroupId str, Description str, GlobalInputs [{key, value}, {...}] + // responses: + // '200': + // description: New group task created successfully + // '400': + // description: Invalid request body + // '401': + // description: No permissions + // '422': + // description: No group tasks in this category or provided global inputs incomplete + var body structs.ApiGroupTaskRequest if err := c.BodyParser(&body); err != nil {