Added docs via swagger
This commit is contained in:
@ -1,13 +1,38 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"github.com/labstack/echo"
|
||||
"strconv"
|
||||
"net/http"
|
||||
"git.kolaente.de/konrad/list/models"
|
||||
"github.com/labstack/echo"
|
||||
"net/http"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func DeleteListByID(c echo.Context) error {
|
||||
// swagger:operation DELETE /lists/{listID} lists deleteList
|
||||
// ---
|
||||
// summary: Deletes a list with all items on it
|
||||
// consumes:
|
||||
// - application/json
|
||||
// produces:
|
||||
// - application/json
|
||||
// parameters:
|
||||
// - name: listID
|
||||
// in: path
|
||||
// description: ID of the list to delete
|
||||
// type: string
|
||||
// required: true
|
||||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/Message"
|
||||
// "400":
|
||||
// "$ref": "#/responses/Message"
|
||||
// "403":
|
||||
// "$ref": "#/responses/Message"
|
||||
// "404":
|
||||
// "$ref": "#/responses/Message"
|
||||
// "500":
|
||||
// "$ref": "#/responses/Message"
|
||||
|
||||
// Check if we have our ID
|
||||
id := c.Param("id")
|
||||
// Make int
|
||||
@ -36,4 +61,4 @@ func DeleteListByID(c echo.Context) error {
|
||||
}
|
||||
|
||||
return c.JSON(http.StatusOK, models.Message{"The list was deleted with success."})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user