API: Add and update Swagger annotations #2132

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2024-07-16 12:35:27 +02:00
parent 6e2ed5d1e7
commit 7d10a488d9
7 changed files with 25 additions and 25 deletions

View File

@@ -18,13 +18,14 @@ import (
// GetThumb returns a thumbnail image matching the file hash, crop area, and type.
//
// @Summary "returns a thumbnail image matching the file hash, crop area, and type"
// @Produce "image/jpeg"
// @Tags Thumbnails
// @Param thumb path string true "SHA1 file hash plus optional crop area"
// @Param token path string true "user-specific security token provided with session"
// @Param size path string true "thumbnail size"
// @Route /api/v1/t/{thumb}/{token}/{size} [get]
// @Summary returns a thumbnail image with the requested size
// @Id GetThumb
// @Produce image/jpeg
// @Tags Images, Files
// @Param thumb path string true "SHA1 file hash, optionally with a crop area suffixed, e.g. '-016014058037'"
// @Param token path string true "user-specific security token provided with session"
// @Param size path string true "thumbnail size"
// @Router /api/v1/t/{hash}/{token}/{size} [get]
func GetThumb(router *gin.RouterGroup) {
router.GET("/t/:thumb/:token/:size", func(c *gin.Context) {
if InvalidPreviewToken(c) {