diff --git a/pkg/models/tasks.go b/pkg/models/tasks.go index 128d6696d..ab1445c9e 100644 --- a/pkg/models/tasks.go +++ b/pkg/models/tasks.go @@ -1692,12 +1692,12 @@ func (t *Task) Delete(s *xorm.Session, a web.Auth) (err error) { // @tags task // @Accept json // @Produce json -// @Param ID path int true "The task ID" +// @Param id path int true "The task ID" // @Security JWTKeyAuth // @Success 200 {object} models.Task "The task" // @Failure 404 {object} models.Message "Task not found" // @Failure 500 {object} models.Message "Internal error" -// @Router /tasks/{ID} [get] +// @Router /tasks/{id} [get] func (t *Task) ReadOne(s *xorm.Session, a web.Auth) (err error) { *t, err = GetTaskByIDSimple(s, t.ID) diff --git a/pkg/modules/background/handler/background.go b/pkg/modules/background/handler/background.go index 5e2a856fd..28b6b685c 100644 --- a/pkg/modules/background/handler/background.go +++ b/pkg/modules/background/handler/background.go @@ -267,7 +267,7 @@ func checkProjectBackgroundRights(s *xorm.Session, c echo.Context) (project *mod // @Produce octet-stream // @Param id path int true "Project ID" // @Security JWTKeyAuth -// @Success 200 {} string "The project background file." +// @Success 200 {file} blob "The project background file." // @Failure 403 {object} models.Message "No access to this project." // @Failure 404 {object} models.Message "The project does not exist." // @Failure 500 {object} models.Message "Internal error" diff --git a/pkg/modules/background/unsplash/proxy.go b/pkg/modules/background/unsplash/proxy.go index 0bbee208b..9c9c89879 100644 --- a/pkg/modules/background/unsplash/proxy.go +++ b/pkg/modules/background/unsplash/proxy.go @@ -49,7 +49,7 @@ func unsplashImage(url string, c echo.Context) error { // @Produce octet-stream // @Param image path int true "Unsplash Image ID" // @Security JWTKeyAuth -// @Success 200 {} string "The image" +// @Success 200 {file} blob "The image" // @Failure 404 {object} models.Message "The image does not exist." // @Failure 500 {object} models.Message "Internal error" // @Router /backgrounds/unsplash/image/{image} [get] @@ -69,7 +69,7 @@ func ProxyUnsplashImage(c echo.Context) error { // @Produce octet-stream // @Param image path int true "Unsplash Image ID" // @Security JWTKeyAuth -// @Success 200 {} string "The thumbnail" +// @Success 200 {file} blob "The thumbnail" // @Failure 404 {object} models.Message "The image does not exist." // @Failure 500 {object} models.Message "Internal error" // @Router /backgrounds/unsplash/image/{image}/thumb [get] diff --git a/pkg/routes/api/v1/avatar.go b/pkg/routes/api/v1/avatar.go index 8b2ab2e25..6bc85a871 100644 --- a/pkg/routes/api/v1/avatar.go +++ b/pkg/routes/api/v1/avatar.go @@ -51,7 +51,7 @@ import ( // @Produce octet-stream // @Param username path string true "The username of the user who's avatar you want to get" // @Param size query int false "The size of the avatar you want to get. If bigger than the max configured size this will be adjusted to the maximum size." -// @Success 200 {} blob "The avatar" +// @Success 200 {file} blob "The avatar" // @Failure 404 {object} models.Message "The user does not exist." // @Failure 500 {object} models.Message "Internal error" // @Router /{username}/avatar [get] diff --git a/pkg/routes/api/v1/task_attachment.go b/pkg/routes/api/v1/task_attachment.go index d74357b43..225cd5bb1 100644 --- a/pkg/routes/api/v1/task_attachment.go +++ b/pkg/routes/api/v1/task_attachment.go @@ -116,7 +116,7 @@ func UploadTaskAttachment(c echo.Context) error { // @Param id path int true "Task ID" // @Param attachmentID path int true "Attachment ID" // @Security JWTKeyAuth -// @Success 200 {} string "The attachment file." +// @Success 200 {file} blob "The attachment file." // @Failure 403 {object} models.Message "No access to this task." // @Failure 404 {object} models.Message "The task does not exist." // @Failure 500 {object} models.Message "Internal error" diff --git a/pkg/routes/api/v1/user_totp.go b/pkg/routes/api/v1/user_totp.go index 7a1e286ab..fefb829ad 100644 --- a/pkg/routes/api/v1/user_totp.go +++ b/pkg/routes/api/v1/user_totp.go @@ -181,7 +181,7 @@ func UserTOTPDisable(c echo.Context) error { // @Accept json // @Produce json // @Security JWTKeyAuth -// @Success 200 {} string "The qr code as jpeg image" +// @Success 200 {file} blob "The qr code as jpeg image" // @Failure 500 {object} models.Message "Internal server error." // @Router /user/settings/totp/qrcode [get] func UserTOTPQrCode(c echo.Context) error {