mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 19:38:23 +00:00 
			
		
		
		
	Add missing description of label on API (#7159)
* add missing description of label on API * fix comment head * fix swagger
This commit is contained in:
		| @@ -1,4 +1,5 @@ | ||||
| // Copyright 2016 The Gogs Authors. All rights reserved. | ||||
| // Copyright 2019 The Gitea Authors. All rights reserved. | ||||
| // Use of this source code is governed by a MIT-style | ||||
| // license that can be found in the LICENSE file. | ||||
|  | ||||
| @@ -10,8 +11,9 @@ type Label struct { | ||||
| 	ID   int64  `json:"id"` | ||||
| 	Name string `json:"name"` | ||||
| 	// example: 00aabb | ||||
| 	Color string `json:"color"` | ||||
| 	URL   string `json:"url"` | ||||
| 	Color       string `json:"color"` | ||||
| 	Description string `json:"description"` | ||||
| 	URL         string `json:"url"` | ||||
| } | ||||
|  | ||||
| // CreateLabelOption options for creating a label | ||||
| @@ -20,13 +22,15 @@ type CreateLabelOption struct { | ||||
| 	Name string `json:"name" binding:"Required"` | ||||
| 	// required:true | ||||
| 	// example: #00aabb | ||||
| 	Color string `json:"color" binding:"Required;Size(7)"` | ||||
| 	Color       string `json:"color" binding:"Required;Size(7)"` | ||||
| 	Description string `json:"description"` | ||||
| } | ||||
|  | ||||
| // EditLabelOption options for editing a label | ||||
| type EditLabelOption struct { | ||||
| 	Name  *string `json:"name"` | ||||
| 	Color *string `json:"color"` | ||||
| 	Name        *string `json:"name"` | ||||
| 	Color       *string `json:"color"` | ||||
| 	Description *string `json:"description"` | ||||
| } | ||||
|  | ||||
| // IssueLabelsOption a collection of labels | ||||
|   | ||||
		Reference in New Issue
	
	Block a user