mirror of
https://github.com/photoprism/photoprism.git
synced 2025-09-26 21:01:58 +08:00
API: Update swagger annotations #2132
This commit is contained in:
@@ -23,7 +23,15 @@ import (
|
||||
|
||||
// BatchPhotosArchive moves multiple photos to the archive.
|
||||
//
|
||||
// @Summary moves multiple photos to the archive
|
||||
// @Id BatchPhotosArchive
|
||||
// @Tags Photos
|
||||
// @Produce json
|
||||
// @Success 200 {object} i18n.Response
|
||||
// @Failure 400 {object} i18n.Response
|
||||
// @Failure 404 {object} i18n.Response
|
||||
// @Failure 500 {object} i18n.Response
|
||||
// @Param photos body form.Selection true "Photo Selection"
|
||||
// @Router /api/v1/batch/photos/archive [post]
|
||||
func BatchPhotosArchive(router *gin.RouterGroup) {
|
||||
router.POST("/batch/photos/archive", func(c *gin.Context) {
|
||||
@@ -88,7 +96,15 @@ func BatchPhotosArchive(router *gin.RouterGroup) {
|
||||
|
||||
// BatchPhotosRestore restores multiple photos from the archive.
|
||||
//
|
||||
// @Summary restores multiple photos from the archive
|
||||
// @Id BatchPhotosRestore
|
||||
// @Tags Photos
|
||||
// @Produce json
|
||||
// @Success 200 {object} i18n.Response
|
||||
// @Failure 400 {object} i18n.Response
|
||||
// @Failure 404 {object} i18n.Response
|
||||
// @Failure 500 {object} i18n.Response
|
||||
// @Param photos body form.Selection true "Photo Selection"
|
||||
// @Router /api/v1/batch/photos/restore [post]
|
||||
func BatchPhotosRestore(router *gin.RouterGroup) {
|
||||
router.POST("/batch/photos/restore", func(c *gin.Context) {
|
||||
@@ -151,7 +167,14 @@ func BatchPhotosRestore(router *gin.RouterGroup) {
|
||||
|
||||
// BatchPhotosApprove approves multiple photos that are currently under review.
|
||||
//
|
||||
// @Summary approves multiple photos that are currently under review
|
||||
// @Id BatchPhotosApprove
|
||||
// @Tags Photos
|
||||
// @Produce json
|
||||
// @Success 200 {object} i18n.Response
|
||||
// @Failure 400 {object} i18n.Response
|
||||
// @Failure 404 {object} i18n.Response
|
||||
// @Param photos body form.Selection true "Photo Selection"
|
||||
// @Router /api/v1/batch/photos/approve [post]
|
||||
func BatchPhotosApprove(router *gin.RouterGroup) {
|
||||
router.POST("batch/photos/approve", func(c *gin.Context) {
|
||||
@@ -204,7 +227,14 @@ func BatchPhotosApprove(router *gin.RouterGroup) {
|
||||
|
||||
// BatchAlbumsDelete permanently removes multiple albums.
|
||||
//
|
||||
// @Summary permanently removes multiple albums
|
||||
// @Id BatchAlbumsDelete
|
||||
// @Tags Albums
|
||||
// @Produce json
|
||||
// @Success 200 {object} i18n.Response
|
||||
// @Failure 400 {object} i18n.Response
|
||||
// @Failure 404 {object} i18n.Response
|
||||
// @Param albums body form.Selection true "Album Selection"
|
||||
// @Router /api/v1/batch/albums/delete [post]
|
||||
func BatchAlbumsDelete(router *gin.RouterGroup) {
|
||||
router.POST("/batch/albums/delete", func(c *gin.Context) {
|
||||
@@ -269,9 +299,17 @@ func BatchAlbumsDelete(router *gin.RouterGroup) {
|
||||
})
|
||||
}
|
||||
|
||||
// BatchPhotosPrivate flags multiple photos as private.
|
||||
// BatchPhotosPrivate toggles private state of multiple photos.
|
||||
//
|
||||
// @Summary toggles private state of multiple photos
|
||||
// @Id BatchPhotosPrivate
|
||||
// @Tags Photos
|
||||
// @Produce json
|
||||
// @Success 200 {object} i18n.Response
|
||||
// @Failure 400 {object} i18n.Response
|
||||
// @Failure 404 {object} i18n.Response
|
||||
// @Failure 500 {object} i18n.Response
|
||||
// @Param photos body form.Selection true "Photo Selection"
|
||||
// @Router /api/v1/batch/photos/private [post]
|
||||
func BatchPhotosPrivate(router *gin.RouterGroup) {
|
||||
router.POST("/batch/photos/private", func(c *gin.Context) {
|
||||
@@ -330,6 +368,7 @@ func BatchPhotosPrivate(router *gin.RouterGroup) {
|
||||
// @Produce json
|
||||
// @Success 200 {object} i18n.Response
|
||||
// @Failure 400 {object} i18n.Response
|
||||
// @Failure 500 {object} i18n.Response
|
||||
// @Param labels body form.Selection true "Label Selection"
|
||||
// @Router /api/v1/batch/labels/delete [post]
|
||||
func BatchLabelsDelete(router *gin.RouterGroup) {
|
||||
@@ -379,7 +418,11 @@ func BatchLabelsDelete(router *gin.RouterGroup) {
|
||||
// @Summary permanently removes multiple or all photos from the archive
|
||||
// @Id BatchPhotosDelete
|
||||
// @Tags Photos
|
||||
//
|
||||
// @Produce json
|
||||
// @Success 200 {object} i18n.Response
|
||||
// @Failure 400 {object} i18n.Response
|
||||
// @Failure 403 {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) {
|
||||
router.POST("/batch/photos/delete", func(c *gin.Context) {
|
||||
|
@@ -175,10 +175,45 @@
|
||||
},
|
||||
"/api/v1/batch/albums/delete": {
|
||||
"post": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Albums"
|
||||
],
|
||||
"responses": {}
|
||||
"summary": "permanently removes multiple albums",
|
||||
"operationId": "BatchAlbumsDelete",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Album Selection",
|
||||
"name": "albums",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/form.Selection"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/i18n.Response"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/i18n.Response"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/i18n.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/batch/labels/delete": {
|
||||
@@ -214,50 +249,247 @@
|
||||
"schema": {
|
||||
"$ref": "#/definitions/i18n.Response"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/i18n.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/batch/photos/approve": {
|
||||
"post": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Photos"
|
||||
],
|
||||
"responses": {}
|
||||
"summary": "approves multiple photos that are currently under review",
|
||||
"operationId": "BatchPhotosApprove",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Photo Selection",
|
||||
"name": "photos",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/form.Selection"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/i18n.Response"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/i18n.Response"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/i18n.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/batch/photos/archive": {
|
||||
"post": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Photos"
|
||||
],
|
||||
"responses": {}
|
||||
"summary": "moves multiple photos to the archive",
|
||||
"operationId": "BatchPhotosArchive",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Photo Selection",
|
||||
"name": "photos",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/form.Selection"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/i18n.Response"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/i18n.Response"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/i18n.Response"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/i18n.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/batch/photos/delete": {
|
||||
"post": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Photos"
|
||||
],
|
||||
"summary": "permanently removes multiple or all photos from the archive",
|
||||
"operationId": "BatchPhotosDelete",
|
||||
"responses": {}
|
||||
"parameters": [
|
||||
{
|
||||
"description": "All or Photo Selection",
|
||||
"name": "photos",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/form.Selection"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/i18n.Response"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/i18n.Response"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/i18n.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/batch/photos/private": {
|
||||
"post": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Photos"
|
||||
],
|
||||
"responses": {}
|
||||
"summary": "toggles private state of multiple photos",
|
||||
"operationId": "BatchPhotosPrivate",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Photo Selection",
|
||||
"name": "photos",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/form.Selection"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/i18n.Response"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/i18n.Response"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/i18n.Response"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/i18n.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/batch/photos/restore": {
|
||||
"post": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Photos"
|
||||
],
|
||||
"responses": {}
|
||||
"summary": "restores multiple photos from the archive",
|
||||
"operationId": "BatchPhotosRestore",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Photo Selection",
|
||||
"name": "photos",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/form.Selection"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/i18n.Response"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/i18n.Response"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/i18n.Response"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/i18n.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/config/options": {
|
||||
@@ -1831,35 +2063,17 @@
|
||||
1000000000,
|
||||
60000000000,
|
||||
3600000000000,
|
||||
-9223372036854775808,
|
||||
9223372036854775807,
|
||||
1,
|
||||
1000,
|
||||
1000000,
|
||||
1000000000,
|
||||
60000000000,
|
||||
3600000000000,
|
||||
-9223372036854775808,
|
||||
9223372036854775807,
|
||||
1,
|
||||
1000,
|
||||
1000000,
|
||||
1000000000,
|
||||
60000000000,
|
||||
3600000000000,
|
||||
-9223372036854775808,
|
||||
9223372036854775807,
|
||||
1,
|
||||
1000,
|
||||
1000000,
|
||||
1000000000,
|
||||
60000000000,
|
||||
3600000000000,
|
||||
1,
|
||||
1000,
|
||||
1000000,
|
||||
1000000000,
|
||||
60000000000
|
||||
3600000000000
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"minDuration",
|
||||
@@ -1870,35 +2084,17 @@
|
||||
"Second",
|
||||
"Minute",
|
||||
"Hour",
|
||||
"minDuration",
|
||||
"maxDuration",
|
||||
"Nanosecond",
|
||||
"Microsecond",
|
||||
"Millisecond",
|
||||
"Second",
|
||||
"Minute",
|
||||
"Hour",
|
||||
"minDuration",
|
||||
"maxDuration",
|
||||
"Nanosecond",
|
||||
"Microsecond",
|
||||
"Millisecond",
|
||||
"Second",
|
||||
"Minute",
|
||||
"Hour",
|
||||
"minDuration",
|
||||
"maxDuration",
|
||||
"Nanosecond",
|
||||
"Microsecond",
|
||||
"Millisecond",
|
||||
"Second",
|
||||
"Minute",
|
||||
"Hour",
|
||||
"Nanosecond",
|
||||
"Microsecond",
|
||||
"Millisecond",
|
||||
"Second",
|
||||
"Minute"
|
||||
"Hour"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user