added swagger doc

main
alex 2023-07-05 01:06:36 +02:00
parent 525360229d
commit 95ef156125
3 changed files with 39 additions and 0 deletions

14
main.go
View File

@ -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 (

1
public/swagger Submodule

@ -0,0 +1 @@
Subproject commit afb9610f411d273474c018bca60725cf6afa6472

View File

@ -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 {