Fix swagger docs for /repos/issues (#12069)

Co-authored-by: Lauris BH <lauris@nix.lv>
tokarchuk/v1.17
Cirno the Strongest 4 years ago committed by GitHub
parent 2ff585f0da
commit 1fd2beb6e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      routers/api/v1/repo/issue.go
  2. 9
      templates/swagger/v1_json.tmpl

@ -198,6 +198,7 @@ func ListIssues(ctx *context.APIContext) {
// in: query // in: query
// description: whether issue is open or closed // description: whether issue is open or closed
// type: string // type: string
// enum: [closed, open, all]
// - name: labels // - name: labels
// in: query // in: query
// description: comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded // description: comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded
@ -210,6 +211,7 @@ func ListIssues(ctx *context.APIContext) {
// in: query // in: query
// description: filter by type (issues / pulls) if set // description: filter by type (issues / pulls) if set
// type: string // type: string
// enum: [issues, pulls]
// - name: milestones // - name: milestones
// in: query // in: query
// description: comma separated list of milestone names or ids. It uses names and fall back to ids. Fetch only issues that have any of this milestones. Non existent milestones are discarded // description: comma separated list of milestone names or ids. It uses names and fall back to ids. Fetch only issues that have any of this milestones. Non existent milestones are discarded

@ -3776,6 +3776,11 @@
"required": true "required": true
}, },
{ {
"enum": [
"closed",
"open",
"all"
],
"type": "string", "type": "string",
"description": "whether issue is open or closed", "description": "whether issue is open or closed",
"name": "state", "name": "state",
@ -3794,6 +3799,10 @@
"in": "query" "in": "query"
}, },
{ {
"enum": [
"issues",
"pulls"
],
"type": "string", "type": "string",
"description": "filter by type (issues / pulls) if set", "description": "filter by type (issues / pulls) if set",
"name": "type", "name": "type",

Loading…
Cancel
Save