aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/code.gitea.io/sdk/gitea/issue.go
diff options
context:
space:
mode:
authorEthan Koenig <ethantkoenig@gmail.com>2017-11-12 23:02:25 -0800
committerLauris BH <lauris@nix.lv>2017-11-13 09:02:25 +0200
commitf26f4a7e01f9c380c261fa5bc21bd7e48f2f2f9f (patch)
tree39c2fc0abc5a10f80f8fa31b3bd57ec3604bf7fd /vendor/code.gitea.io/sdk/gitea/issue.go
parent4287d100b39ff89e297ba8945e54fb5911226974 (diff)
downloadgitea-f26f4a7e01f9c380c261fa5bc21bd7e48f2f2f9f.tar.gz
gitea-f26f4a7e01f9c380c261fa5bc21bd7e48f2f2f9f.zip
Update swagger documentation (#2899)
* Update swagger documentation Add docs for missing endpoints Add documentation for request parameters Make parameter naming consistent Fix response documentation * Restore delete comments
Diffstat (limited to 'vendor/code.gitea.io/sdk/gitea/issue.go')
-rw-r--r--vendor/code.gitea.io/sdk/gitea/issue.go15
1 files changed, 13 insertions, 2 deletions
diff --git a/vendor/code.gitea.io/sdk/gitea/issue.go b/vendor/code.gitea.io/sdk/gitea/issue.go
index 729e54fe8b..720f54caae 100644
--- a/vendor/code.gitea.io/sdk/gitea/issue.go
+++ b/vendor/code.gitea.io/sdk/gitea/issue.go
@@ -27,7 +27,8 @@ type PullRequestMeta struct {
Merged *time.Time `json:"merged_at"`
}
-// Issue an issue to a repository
+// Issue represents an issue in a repository
+// swagger:model
type Issue struct {
ID int64 `json:"id"`
URL string `json:"url"`
@@ -38,9 +39,15 @@ type Issue struct {
Labels []*Label `json:"labels"`
Milestone *Milestone `json:"milestone"`
Assignee *User `json:"assignee"`
+ // Whether the issue is open or closed
+ //
+ // type: string
+ // enum: open,closed
State StateType `json:"state"`
Comments int `json:"comments"`
+ // swagger:strfmt date-time
Created time.Time `json:"created_at"`
+ // swagger:strfmt date-time
Updated time.Time `json:"updated_at"`
PullRequest *PullRequestMeta `json:"pull_request"`
@@ -78,10 +85,14 @@ func (c *Client) GetIssue(owner, repo string, index int64) (*Issue, error) {
// CreateIssueOption options to create one issue
type CreateIssueOption struct {
+ // required:true
Title string `json:"title" binding:"Required"`
Body string `json:"body"`
+ // username of assignee
Assignee string `json:"assignee"`
+ // milestone id
Milestone int64 `json:"milestone"`
+ // list of label ids
Labels []int64 `json:"labels"`
Closed bool `json:"closed"`
}
@@ -97,7 +108,7 @@ func (c *Client) CreateIssue(owner, repo string, opt CreateIssueOption) (*Issue,
jsonHeader, bytes.NewReader(body), issue)
}
-// EditIssueOption edit issue options
+// EditIssueOption options for editing an issue
type EditIssueOption struct {
Title string `json:"title"`
Body *string `json:"body"`