mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
API: Update swagger annotations #2132
This commit is contained in:
@@ -41,10 +41,7 @@ func SaveAlbumYaml(album entity.Album) {
|
||||
// @Tags Albums
|
||||
// @Produce json
|
||||
// @Success 200 {object} entity.Album
|
||||
// @Failure 404 {object} i18n.Response
|
||||
// @Failure 401 {object} i18n.Response
|
||||
// @Failure 403 {object} i18n.Response
|
||||
// @Failure 429 {object} i18n.Response
|
||||
// @Failure 401,403,404,429 {object} i18n.Response
|
||||
// @Param uid path string true "Album UID"
|
||||
// @Router /api/v1/albums/{uid} [get]
|
||||
func GetAlbum(router *gin.RouterGroup) {
|
||||
@@ -83,11 +80,7 @@ func GetAlbum(router *gin.RouterGroup) {
|
||||
// @Tags Albums
|
||||
// @Produce json
|
||||
// @Success 200 {object} entity.Album
|
||||
// @Failure 401 {object} i18n.Response
|
||||
// @Failure 403 {object} i18n.Response
|
||||
// @Failure 429 {object} i18n.Response
|
||||
// @Failure 400 {object} i18n.Response
|
||||
// @Failure 500 {object} i18n.Response
|
||||
// @Failure 400,401,403,429,500 {object} i18n.Response
|
||||
// @Param album body form.Album true "properties of the album to be created (currently supports Title and Favorite)"
|
||||
// @Router /api/v1/albums [post]
|
||||
func CreateAlbum(router *gin.RouterGroup) {
|
||||
@@ -152,12 +145,7 @@ func CreateAlbum(router *gin.RouterGroup) {
|
||||
// @Tags Albums
|
||||
// @Produce json
|
||||
// @Success 200 {object} entity.Album
|
||||
// @Failure 401 {object} i18n.Response
|
||||
// @Failure 403 {object} i18n.Response
|
||||
// @Failure 429 {object} i18n.Response
|
||||
// @Failure 400 {object} i18n.Response
|
||||
// @Failure 404 {object} i18n.Response
|
||||
// @Failure 500 {object} i18n.Response
|
||||
// @Failure 400,401,403,404,429,500 {object} i18n.Response
|
||||
// @Param uid path string true "Album UID"
|
||||
// @Param album body form.Album true "properties to be updated"
|
||||
// @Router /api/v1/albums/{uid} [put]
|
||||
@@ -229,12 +217,7 @@ func UpdateAlbum(router *gin.RouterGroup) {
|
||||
// @Id Delete Album
|
||||
// @Tags Albums
|
||||
// @Produce json
|
||||
// @Success 200 {object} entity.Album
|
||||
// @Failure 401 {object} i18n.Response
|
||||
// @Failure 403 {object} i18n.Response
|
||||
// @Failure 429 {object} i18n.Response
|
||||
// @Failure 404 {object} i18n.Response
|
||||
// @Failure 500 {object} i18n.Response
|
||||
// @Failure 401,403,404,429,500 {object} i18n.Response
|
||||
// @Param uid path string true "Album UID"
|
||||
// @Router /api/v1/albums/{uid} [delete]
|
||||
func DeleteAlbum(router *gin.RouterGroup) {
|
||||
@@ -308,11 +291,7 @@ func DeleteAlbum(router *gin.RouterGroup) {
|
||||
// @Id LikeAlbum
|
||||
// @Tags Albums
|
||||
// @Produce json
|
||||
// @Failure 401 {object} i18n.Response
|
||||
// @Failure 403 {object} i18n.Response
|
||||
// @Failure 429 {object} i18n.Response
|
||||
// @Failure 404 {object} i18n.Response
|
||||
// @Failure 500 {object} i18n.Response
|
||||
// @Failure 401,403,404,429,500 {object} i18n.Response
|
||||
// @Param uid path string true "Album UID"
|
||||
// @Router /api/v1/albums/{uid}/like [post]
|
||||
func LikeAlbum(router *gin.RouterGroup) {
|
||||
@@ -362,11 +341,7 @@ func LikeAlbum(router *gin.RouterGroup) {
|
||||
// @Id DislikeAlbum
|
||||
// @Tags Albums
|
||||
// @Produce json
|
||||
// @Failure 401 {object} i18n.Response
|
||||
// @Failure 403 {object} i18n.Response
|
||||
// @Failure 429 {object} i18n.Response
|
||||
// @Failure 404 {object} i18n.Response
|
||||
// @Failure 500 {object} i18n.Response
|
||||
// @Failure 401,403,404,429,500 {object} i18n.Response
|
||||
// @Param uid path string true "Album UID"
|
||||
// @Router /api/v1/albums/{uid}/like [delete]
|
||||
func DislikeAlbum(router *gin.RouterGroup) {
|
||||
@@ -417,11 +392,7 @@ func DislikeAlbum(router *gin.RouterGroup) {
|
||||
// @Tags Albums
|
||||
// @Produce json
|
||||
// @Success 200 {object} gin.H
|
||||
// @Failure 401 {object} i18n.Response
|
||||
// @Failure 403 {object} i18n.Response
|
||||
// @Failure 429 {object} i18n.Response
|
||||
// @Failure 404 {object} i18n.Response
|
||||
// @Failure 400 {object} i18n.Response
|
||||
// @Failure 400,401,403,404,429 {object} i18n.Response
|
||||
// @Param albums body form.Selection true "Album Selection"
|
||||
// @Param uid path string true "UID of the album to which the pictures are to be added"
|
||||
// @Router /api/v1/albums/{uid}/clone [post]
|
||||
@@ -498,11 +469,7 @@ func CloneAlbums(router *gin.RouterGroup) {
|
||||
// @Tags Albums
|
||||
// @Produce json
|
||||
// @Success 200 {object} gin.H
|
||||
// @Failure 401 {object} i18n.Response
|
||||
// @Failure 403 {object} i18n.Response
|
||||
// @Failure 429 {object} i18n.Response
|
||||
// @Failure 404 {object} i18n.Response
|
||||
// @Failure 400 {object} i18n.Response
|
||||
// @Failure 400,401,403,404,429 {object} i18n.Response
|
||||
// @Param photos body form.Selection true "Photo Selection"
|
||||
// @Param uid path string true "Album UID"
|
||||
// @Router /api/v1/albums/{uid}/photos [post]
|
||||
@@ -611,14 +578,10 @@ func AddPhotosToAlbum(router *gin.RouterGroup) {
|
||||
// @Id RemovePhotosFromAlbum
|
||||
// @Tags Albums
|
||||
// @Produce json
|
||||
// @Success 200 {object} gin.H
|
||||
// @Failure 401 {object} i18n.Response
|
||||
// @Failure 403 {object} i18n.Response
|
||||
// @Failure 429 {object} i18n.Response
|
||||
// @Failure 404 {object} i18n.Response
|
||||
// @Failure 400 {object} i18n.Response
|
||||
// @Param photos body form.Selection true "Photo Selection"
|
||||
// @Param uid path string true "Album UID"
|
||||
// @Success 200 {object} gin.H
|
||||
// @Failure 400,401,403,404,429 {object} i18n.Response
|
||||
// @Param photos body form.Selection true "Photo Selection"
|
||||
// @Param uid path string true "Album UID"
|
||||
// @Router /api/v1/albums/{uid}/photos [delete]
|
||||
func RemovePhotosFromAlbum(router *gin.RouterGroup) {
|
||||
router.DELETE("/albums/:uid/photos", func(c *gin.Context) {
|
||||
|
||||
@@ -28,12 +28,7 @@ import (
|
||||
// @Tags Photos
|
||||
// @Produce json
|
||||
// @Success 200 {object} i18n.Response
|
||||
// @Failure 401 {object} i18n.Response
|
||||
// @Failure 403 {object} i18n.Response
|
||||
// @Failure 429 {object} i18n.Response
|
||||
// @Failure 400 {object} i18n.Response
|
||||
// @Failure 404 {object} i18n.Response
|
||||
// @Failure 500 {object} i18n.Response
|
||||
// @Failure 400,401,403,404,429,500 {object} i18n.Response
|
||||
// @Param photos body form.Selection true "Photo Selection"
|
||||
// @Router /api/v1/batch/photos/archive [post]
|
||||
func BatchPhotosArchive(router *gin.RouterGroup) {
|
||||
@@ -104,12 +99,7 @@ func BatchPhotosArchive(router *gin.RouterGroup) {
|
||||
// @Tags Photos
|
||||
// @Produce json
|
||||
// @Success 200 {object} i18n.Response
|
||||
// @Failure 401 {object} i18n.Response
|
||||
// @Failure 403 {object} i18n.Response
|
||||
// @Failure 429 {object} i18n.Response
|
||||
// @Failure 400 {object} i18n.Response
|
||||
// @Failure 404 {object} i18n.Response
|
||||
// @Failure 500 {object} i18n.Response
|
||||
// @Failure 400,401,403,404,429,500 {object} i18n.Response
|
||||
// @Param photos body form.Selection true "Photo Selection"
|
||||
// @Router /api/v1/batch/photos/restore [post]
|
||||
func BatchPhotosRestore(router *gin.RouterGroup) {
|
||||
@@ -178,11 +168,7 @@ func BatchPhotosRestore(router *gin.RouterGroup) {
|
||||
// @Tags Photos
|
||||
// @Produce json
|
||||
// @Success 200 {object} i18n.Response
|
||||
// @Failure 401 {object} i18n.Response
|
||||
// @Failure 403 {object} i18n.Response
|
||||
// @Failure 429 {object} i18n.Response
|
||||
// @Failure 400 {object} i18n.Response
|
||||
// @Failure 404 {object} i18n.Response
|
||||
// @Failure 400,401,403,404,429 {object} i18n.Response
|
||||
// @Param photos body form.Selection true "Photo Selection"
|
||||
// @Router /api/v1/batch/photos/approve [post]
|
||||
func BatchPhotosApprove(router *gin.RouterGroup) {
|
||||
@@ -241,11 +227,7 @@ func BatchPhotosApprove(router *gin.RouterGroup) {
|
||||
// @Tags Albums
|
||||
// @Produce json
|
||||
// @Success 200 {object} i18n.Response
|
||||
// @Failure 401 {object} i18n.Response
|
||||
// @Failure 403 {object} i18n.Response
|
||||
// @Failure 429 {object} i18n.Response
|
||||
// @Failure 400 {object} i18n.Response
|
||||
// @Failure 404 {object} i18n.Response
|
||||
// @Failure 400,401,403,404,429 {object} i18n.Response
|
||||
// @Param albums body form.Selection true "Album Selection"
|
||||
// @Router /api/v1/batch/albums/delete [post]
|
||||
func BatchAlbumsDelete(router *gin.RouterGroup) {
|
||||
@@ -318,12 +300,7 @@ func BatchAlbumsDelete(router *gin.RouterGroup) {
|
||||
// @Tags Photos
|
||||
// @Produce json
|
||||
// @Success 200 {object} i18n.Response
|
||||
// @Failure 401 {object} i18n.Response
|
||||
// @Failure 403 {object} i18n.Response
|
||||
// @Failure 429 {object} i18n.Response
|
||||
// @Failure 400 {object} i18n.Response
|
||||
// @Failure 404 {object} i18n.Response
|
||||
// @Failure 500 {object} i18n.Response
|
||||
// @Failure 400,401,403,404,429,500 {object} i18n.Response
|
||||
// @Param photos body form.Selection true "Photo Selection"
|
||||
// @Router /api/v1/batch/photos/private [post]
|
||||
func BatchPhotosPrivate(router *gin.RouterGroup) {
|
||||
@@ -382,11 +359,7 @@ func BatchPhotosPrivate(router *gin.RouterGroup) {
|
||||
// @Tags Labels
|
||||
// @Produce json
|
||||
// @Success 200 {object} i18n.Response
|
||||
// @Failure 401 {object} i18n.Response
|
||||
// @Failure 403 {object} i18n.Response
|
||||
// @Failure 429 {object} i18n.Response
|
||||
// @Failure 400 {object} i18n.Response
|
||||
// @Failure 500 {object} i18n.Response
|
||||
// @Failure 400,401,403,429,500 {object} i18n.Response
|
||||
// @Param labels body form.Selection true "Label Selection"
|
||||
// @Router /api/v1/batch/labels/delete [post]
|
||||
func BatchLabelsDelete(router *gin.RouterGroup) {
|
||||
@@ -438,11 +411,7 @@ func BatchLabelsDelete(router *gin.RouterGroup) {
|
||||
// @Tags Photos
|
||||
// @Produce json
|
||||
// @Success 200 {object} i18n.Response
|
||||
// @Failure 401 {object} i18n.Response
|
||||
// @Failure 403 {object} i18n.Response
|
||||
// @Failure 429 {object} i18n.Response
|
||||
// @Failure 400 {object} i18n.Response
|
||||
// @Failure 403 {object} i18n.Response
|
||||
// @Failure 400,401,403,429 {object} i18n.Response
|
||||
// @Param photos body form.Selection true "All or Photo Selection"
|
||||
// @Router /api/v1/batch/photos/delete [post]
|
||||
func BatchPhotosDelete(router *gin.RouterGroup) {
|
||||
|
||||
@@ -24,10 +24,7 @@ import (
|
||||
// @Tags Labels
|
||||
// @Produce json
|
||||
// @Success 200 {object} entity.Label
|
||||
// @Failure 404 {object} i18n.Response
|
||||
// @Failure 401 {object} i18n.Response
|
||||
// @Failure 403 {object} i18n.Response
|
||||
// @Failure 429 {object} i18n.Response
|
||||
// @Failure 401,403,404,429 {object} i18n.Response
|
||||
// @Param uid path string true "Label UID"
|
||||
// @Param label body form.Label true "Label Name"
|
||||
// @Router /api/v1/labels/{uid} [put]
|
||||
@@ -72,10 +69,7 @@ func UpdateLabel(router *gin.RouterGroup) {
|
||||
// @Id LikeLabel
|
||||
// @Tags Labels
|
||||
// @Produce json
|
||||
// @Failure 404 {object} i18n.Response
|
||||
// @Failure 401 {object} i18n.Response
|
||||
// @Failure 403 {object} i18n.Response
|
||||
// @Failure 429 {object} i18n.Response
|
||||
// @Failure 401,403,404,429 {object} i18n.Response
|
||||
// @Param uid path string true "Label UID"
|
||||
// @Router /api/v1/labels/{uid}/like [post]
|
||||
func LikeLabel(router *gin.RouterGroup) {
|
||||
@@ -117,10 +111,7 @@ func LikeLabel(router *gin.RouterGroup) {
|
||||
// @Id DislikeLabel
|
||||
// @Tags Labels
|
||||
// @Produce json
|
||||
// @Failure 404 {object} i18n.Response
|
||||
// @Failure 401 {object} i18n.Response
|
||||
// @Failure 403 {object} i18n.Response
|
||||
// @Failure 429 {object} i18n.Response
|
||||
// @Failure 401,403,404,429 {object} i18n.Response
|
||||
// @Param uid path string true "Label UID"
|
||||
// @Router /api/v1/labels/{uid}/like [delete]
|
||||
func DislikeLabel(router *gin.RouterGroup) {
|
||||
|
||||
@@ -578,7 +578,7 @@
|
||||
"Albums"
|
||||
],
|
||||
"summary": "removes photos from an album",
|
||||
"operationId": "RemovePhotosToAlbum",
|
||||
"operationId": "RemovePhotosFromAlbum",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Photo Selection",
|
||||
@@ -2761,24 +2761,11 @@
|
||||
1000000000,
|
||||
60000000000,
|
||||
3600000000000,
|
||||
-9223372036854775808,
|
||||
9223372036854775807,
|
||||
1,
|
||||
1000,
|
||||
1000000,
|
||||
1000000000,
|
||||
60000000000,
|
||||
3600000000000,
|
||||
-9223372036854775808,
|
||||
9223372036854775807,
|
||||
1,
|
||||
1000,
|
||||
1000000,
|
||||
1000000000,
|
||||
60000000000,
|
||||
3600000000000,
|
||||
-9223372036854775808,
|
||||
9223372036854775807,
|
||||
1,
|
||||
1000,
|
||||
1000000,
|
||||
@@ -2795,24 +2782,11 @@
|
||||
"Second",
|
||||
"Minute",
|
||||
"Hour",
|
||||
"minDuration",
|
||||
"maxDuration",
|
||||
"Nanosecond",
|
||||
"Microsecond",
|
||||
"Millisecond",
|
||||
"Second",
|
||||
"Minute",
|
||||
"Hour",
|
||||
"minDuration",
|
||||
"maxDuration",
|
||||
"Nanosecond",
|
||||
"Microsecond",
|
||||
"Millisecond",
|
||||
"Second",
|
||||
"Minute",
|
||||
"Hour",
|
||||
"minDuration",
|
||||
"maxDuration",
|
||||
"Nanosecond",
|
||||
"Microsecond",
|
||||
"Millisecond",
|
||||
|
||||
Reference in New Issue
Block a user