summaryrefslogtreecommitdiffstats
path: root/templates/swagger
diff options
context:
space:
mode:
authorJakobDev <jakobdev@gmx.de>2023-05-23 12:10:23 +0200
committerGitHub <noreply@github.com>2023-05-23 18:10:23 +0800
commit25dc1556cd70b567a4920beb002a0addfbfd6ef2 (patch)
tree7857b6b323818a1b4f84a5b7c128d06bc6aedf2b /templates/swagger
parentabcf5a7b5e2c3df951b8048317a99a89b040b489 (diff)
downloadgitea-25dc1556cd70b567a4920beb002a0addfbfd6ef2.tar.gz
gitea-25dc1556cd70b567a4920beb002a0addfbfd6ef2.zip
Add API for Label templates (#24602)
This adds API that allows getting the Label templates of the Gitea Instance
Diffstat (limited to 'templates/swagger')
-rw-r--r--templates/swagger/v1_json.tmpl89
1 files changed, 89 insertions, 0 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 3c56fc9efb..15402ecdfd 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -929,6 +929,52 @@
}
}
},
+ "/label/templates": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "miscellaneous"
+ ],
+ "summary": "Returns a list of all label templates",
+ "operationId": "listLabelTemplates",
+ "responses": {
+ "200": {
+ "$ref": "#/responses/LabelTemplateList"
+ }
+ }
+ }
+ },
+ "/label/templates/{name}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "miscellaneous"
+ ],
+ "summary": "Returns all labels in a template",
+ "operationId": "getLabelTemplateInfo",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "name of the template",
+ "name": "name",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/LabelTemplateInfo"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
"/licenses": {
"get": {
"produces": [
@@ -18858,6 +18904,31 @@
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
+ "LabelTemplate": {
+ "description": "LabelTemplate info of a Label template",
+ "type": "object",
+ "properties": {
+ "color": {
+ "type": "string",
+ "x-go-name": "Color",
+ "example": "00aabb"
+ },
+ "description": {
+ "type": "string",
+ "x-go-name": "Description"
+ },
+ "exclusive": {
+ "type": "boolean",
+ "x-go-name": "Exclusive",
+ "example": false
+ },
+ "name": {
+ "type": "string",
+ "x-go-name": "Name"
+ }
+ },
+ "x-go-package": "code.gitea.io/gitea/modules/structs"
+ },
"LicenseTemplateInfo": {
"description": "LicensesInfo contains information about a License",
"type": "object",
@@ -21797,6 +21868,24 @@
}
}
},
+ "LabelTemplateInfo": {
+ "description": "LabelTemplateInfo",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/LabelTemplate"
+ }
+ }
+ },
+ "LabelTemplateList": {
+ "description": "LabelTemplateList",
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
"LanguageStatistics": {
"description": "LanguageStatistics",
"schema": {