API: Improve swagger annotations

This commit is contained in:
graciousgrey
2025-09-12 15:46:22 +02:00
parent 64da1d36ed
commit 11c7d9f7af
2 changed files with 82 additions and 11 deletions

View File

@@ -27,10 +27,10 @@ import (
// @Failure 400,401,403,404 {object} i18n.Response // @Failure 400,401,403,404 {object} i18n.Response
// @Param count query int true "maximum number of files" minimum(1) maximum(100000) // @Param count query int true "maximum number of files" minimum(1) maximum(100000)
// @Param offset query int false "file offset" minimum(0) maximum(100000) // @Param offset query int false "file offset" minimum(0) maximum(100000)
// @Param order query string false "sort order" Enums(favorites, name, title, added, edited) // @Param order query string false "sort order" Enums(name, title, added, edited, newest, oldest, size, random, duration, relevance)
// @Param merged query bool false "groups consecutive files that belong to the same photo" // @Param merged query bool false "groups consecutive files that belong to the same photo"
// @Param public query bool false "excludes private pictures" // @Param public query bool false "excludes private pictures"
// @Param quality query int true "minimum quality score (1-7)" Enums(0, 1, 2, 3, 4, 5, 6, 7) // @Param quality query int false "minimum quality score (1-7)" Enums(0, 1, 2, 3, 4, 5, 6, 7)
// @Param q query string false "search query" // @Param q query string false "search query"
// @Param s query string false "album uid" // @Param s query string false "album uid"
// @Param path query string false "photo path" // @Param path query string false "photo path"

View File

@@ -1570,6 +1570,50 @@
} }
} }
}, },
"/api/v1/cluster/theme": {
"get": {
"produces": [
"application/zip"
],
"tags": [
"Cluster"
],
"summary": "returns custom theme files as zip, if available",
"operationId": "ClusterGetTheme",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "file"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/i18n.Response"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/i18n.Response"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/i18n.Response"
}
},
"429": {
"description": "Too Many Requests",
"schema": {
"$ref": "#/definitions/i18n.Response"
}
}
}
}
},
"/api/v1/config/options": { "/api/v1/config/options": {
"get": { "get": {
"produces": [ "produces": [
@@ -2897,11 +2941,16 @@
}, },
{ {
"enum": [ "enum": [
"favorites",
"name", "name",
"title", "title",
"added", "added",
"edited" "edited",
"newest",
"oldest",
"size",
"random",
"duration",
"relevance"
], ],
"type": "string", "type": "string",
"description": "sort order", "description": "sort order",
@@ -2934,8 +2983,7 @@
"type": "integer", "type": "integer",
"description": "minimum quality score (1-7)", "description": "minimum quality score (1-7)",
"name": "quality", "name": "quality",
"in": "query", "in": "query"
"required": true
}, },
{ {
"type": "string", "type": "string",
@@ -5909,6 +5957,9 @@
"IndexWorkers": { "IndexWorkers": {
"type": "integer" "type": "integer"
}, },
"InternalUrl": {
"type": "string"
},
"JpegQuality": { "JpegQuality": {
"type": "integer" "type": "integer"
}, },
@@ -8874,11 +8925,16 @@
"type": "integer", "type": "integer",
"format": "int64", "format": "int64",
"enum": [ "enum": [
-9223372036854775808,
9223372036854775807,
1, 1,
1000, 1000,
1000000, 1000000,
1000000000, 1000000000,
60000000000, 60000000000,
3600000000000,
-9223372036854775808,
9223372036854775807,
1, 1,
1000, 1000,
1000000, 1000000,
@@ -8890,20 +8946,35 @@
1000000, 1000000,
1000000000, 1000000000,
60000000000, 60000000000,
1,
1000,
1000000,
1000000000,
60000000000,
3600000000000 3600000000000
], ],
"x-enum-varnames": [ "x-enum-varnames": [
"Nanosecond", "minDuration",
"Microsecond", "maxDuration",
"Millisecond",
"Second",
"Minute",
"Nanosecond", "Nanosecond",
"Microsecond", "Microsecond",
"Millisecond", "Millisecond",
"Second", "Second",
"Minute", "Minute",
"Hour", "Hour",
"minDuration",
"maxDuration",
"Nanosecond",
"Microsecond",
"Millisecond",
"Second",
"Minute",
"Hour",
"Nanosecond",
"Microsecond",
"Millisecond",
"Second",
"Minute",
"Nanosecond", "Nanosecond",
"Microsecond", "Microsecond",
"Millisecond", "Millisecond",