mirror of
https://github.com/go-gitea/gitea.git
synced 2025-06-22 14:08:01 +02:00
Add API for Label templates (#24602)
This adds API that allows getting the Label templates of the Gitea Instance
This commit is contained in:
89
templates/swagger/v1_json.tmpl
generated
89
templates/swagger/v1_json.tmpl
generated
@ -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": {
|
||||
|
Reference in New Issue
Block a user