fix wrong issue endpoints in swagger doc (#3914)
This commit is contained in:
		
							parent
							
								
									773530c917
								
							
						
					
					
						commit
						ea01decb6b
					
				
					 3 changed files with 230 additions and 234 deletions
				
			
		
							
								
								
									
										454
									
								
								public/swagger.v1.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										454
									
								
								public/swagger.v1.json
									
									
									
									
										vendored
									
									
								
							|  | @ -1605,235 +1605,6 @@ | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "/repos/{owner}/{repo}/issue/{index}/comments": { |  | ||||||
|       "get": { |  | ||||||
|         "produces": [ |  | ||||||
|           "application/json" |  | ||||||
|         ], |  | ||||||
|         "tags": [ |  | ||||||
|           "issue" |  | ||||||
|         ], |  | ||||||
|         "summary": "List all comments on an issue", |  | ||||||
|         "operationId": "issueGetComments", |  | ||||||
|         "parameters": [ |  | ||||||
|           { |  | ||||||
|             "type": "string", |  | ||||||
|             "description": "owner of the repo", |  | ||||||
|             "name": "owner", |  | ||||||
|             "in": "path", |  | ||||||
|             "required": true |  | ||||||
|           }, |  | ||||||
|           { |  | ||||||
|             "type": "string", |  | ||||||
|             "description": "name of the repo", |  | ||||||
|             "name": "repo", |  | ||||||
|             "in": "path", |  | ||||||
|             "required": true |  | ||||||
|           }, |  | ||||||
|           { |  | ||||||
|             "type": "integer", |  | ||||||
|             "description": "index of the issue", |  | ||||||
|             "name": "id", |  | ||||||
|             "in": "path", |  | ||||||
|             "required": true |  | ||||||
|           }, |  | ||||||
|           { |  | ||||||
|             "type": "string", |  | ||||||
|             "description": "if provided, only comments updated since the specified time are returned.", |  | ||||||
|             "name": "string", |  | ||||||
|             "in": "query" |  | ||||||
|           } |  | ||||||
|         ], |  | ||||||
|         "responses": { |  | ||||||
|           "200": { |  | ||||||
|             "$ref": "#/responses/CommentList" |  | ||||||
|           } |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     "/repos/{owner}/{repo}/issue/{index}/labels": { |  | ||||||
|       "put": { |  | ||||||
|         "consumes": [ |  | ||||||
|           "application/json" |  | ||||||
|         ], |  | ||||||
|         "produces": [ |  | ||||||
|           "application/json" |  | ||||||
|         ], |  | ||||||
|         "tags": [ |  | ||||||
|           "issue" |  | ||||||
|         ], |  | ||||||
|         "summary": "Replace an issue's labels", |  | ||||||
|         "operationId": "issueReplaceLabels", |  | ||||||
|         "parameters": [ |  | ||||||
|           { |  | ||||||
|             "type": "string", |  | ||||||
|             "description": "owner of the repo", |  | ||||||
|             "name": "owner", |  | ||||||
|             "in": "path", |  | ||||||
|             "required": true |  | ||||||
|           }, |  | ||||||
|           { |  | ||||||
|             "type": "string", |  | ||||||
|             "description": "name of the repo", |  | ||||||
|             "name": "repo", |  | ||||||
|             "in": "path", |  | ||||||
|             "required": true |  | ||||||
|           }, |  | ||||||
|           { |  | ||||||
|             "type": "integer", |  | ||||||
|             "description": "index of the issue", |  | ||||||
|             "name": "index", |  | ||||||
|             "in": "path", |  | ||||||
|             "required": true |  | ||||||
|           }, |  | ||||||
|           { |  | ||||||
|             "name": "body", |  | ||||||
|             "in": "body", |  | ||||||
|             "schema": { |  | ||||||
|               "$ref": "#/definitions/IssueLabelsOption" |  | ||||||
|             } |  | ||||||
|           } |  | ||||||
|         ], |  | ||||||
|         "responses": { |  | ||||||
|           "200": { |  | ||||||
|             "$ref": "#/responses/LabelList" |  | ||||||
|           } |  | ||||||
|         } |  | ||||||
|       }, |  | ||||||
|       "post": { |  | ||||||
|         "consumes": [ |  | ||||||
|           "application/json" |  | ||||||
|         ], |  | ||||||
|         "produces": [ |  | ||||||
|           "application/json" |  | ||||||
|         ], |  | ||||||
|         "tags": [ |  | ||||||
|           "issue" |  | ||||||
|         ], |  | ||||||
|         "summary": "Add a label to an issue", |  | ||||||
|         "operationId": "issueAddLabel", |  | ||||||
|         "parameters": [ |  | ||||||
|           { |  | ||||||
|             "type": "string", |  | ||||||
|             "description": "owner of the repo", |  | ||||||
|             "name": "owner", |  | ||||||
|             "in": "path", |  | ||||||
|             "required": true |  | ||||||
|           }, |  | ||||||
|           { |  | ||||||
|             "type": "string", |  | ||||||
|             "description": "name of the repo", |  | ||||||
|             "name": "repo", |  | ||||||
|             "in": "path", |  | ||||||
|             "required": true |  | ||||||
|           }, |  | ||||||
|           { |  | ||||||
|             "type": "integer", |  | ||||||
|             "description": "index of the issue", |  | ||||||
|             "name": "index", |  | ||||||
|             "in": "path", |  | ||||||
|             "required": true |  | ||||||
|           }, |  | ||||||
|           { |  | ||||||
|             "name": "body", |  | ||||||
|             "in": "body", |  | ||||||
|             "schema": { |  | ||||||
|               "$ref": "#/definitions/IssueLabelsOption" |  | ||||||
|             } |  | ||||||
|           } |  | ||||||
|         ], |  | ||||||
|         "responses": { |  | ||||||
|           "200": { |  | ||||||
|             "$ref": "#/responses/LabelList" |  | ||||||
|           } |  | ||||||
|         } |  | ||||||
|       }, |  | ||||||
|       "delete": { |  | ||||||
|         "produces": [ |  | ||||||
|           "application/json" |  | ||||||
|         ], |  | ||||||
|         "tags": [ |  | ||||||
|           "issue" |  | ||||||
|         ], |  | ||||||
|         "summary": "Remove all labels from an issue", |  | ||||||
|         "operationId": "issueClearLabels", |  | ||||||
|         "parameters": [ |  | ||||||
|           { |  | ||||||
|             "type": "string", |  | ||||||
|             "description": "owner of the repo", |  | ||||||
|             "name": "owner", |  | ||||||
|             "in": "path", |  | ||||||
|             "required": true |  | ||||||
|           }, |  | ||||||
|           { |  | ||||||
|             "type": "string", |  | ||||||
|             "description": "name of the repo", |  | ||||||
|             "name": "repo", |  | ||||||
|             "in": "path", |  | ||||||
|             "required": true |  | ||||||
|           }, |  | ||||||
|           { |  | ||||||
|             "type": "integer", |  | ||||||
|             "description": "index of the issue", |  | ||||||
|             "name": "index", |  | ||||||
|             "in": "path", |  | ||||||
|             "required": true |  | ||||||
|           } |  | ||||||
|         ], |  | ||||||
|         "responses": { |  | ||||||
|           "204": { |  | ||||||
|             "$ref": "#/responses/empty" |  | ||||||
|           } |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     "/repos/{owner}/{repo}/issue/{index}/labels/{id}": { |  | ||||||
|       "delete": { |  | ||||||
|         "produces": [ |  | ||||||
|           "application/json" |  | ||||||
|         ], |  | ||||||
|         "tags": [ |  | ||||||
|           "issue" |  | ||||||
|         ], |  | ||||||
|         "summary": "Remove a label from an issue", |  | ||||||
|         "operationId": "issueRemoveLabel", |  | ||||||
|         "parameters": [ |  | ||||||
|           { |  | ||||||
|             "type": "string", |  | ||||||
|             "description": "owner of the repo", |  | ||||||
|             "name": "owner", |  | ||||||
|             "in": "path", |  | ||||||
|             "required": true |  | ||||||
|           }, |  | ||||||
|           { |  | ||||||
|             "type": "string", |  | ||||||
|             "description": "name of the repo", |  | ||||||
|             "name": "repo", |  | ||||||
|             "in": "path", |  | ||||||
|             "required": true |  | ||||||
|           }, |  | ||||||
|           { |  | ||||||
|             "type": "integer", |  | ||||||
|             "description": "index of the issue", |  | ||||||
|             "name": "index", |  | ||||||
|             "in": "path", |  | ||||||
|             "required": true |  | ||||||
|           }, |  | ||||||
|           { |  | ||||||
|             "type": "integer", |  | ||||||
|             "description": "id of the label to remove", |  | ||||||
|             "name": "id", |  | ||||||
|             "in": "path", |  | ||||||
|             "required": true |  | ||||||
|           } |  | ||||||
|         ], |  | ||||||
|         "responses": { |  | ||||||
|           "204": { |  | ||||||
|             "$ref": "#/responses/empty" |  | ||||||
|           } |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     "/repos/{owner}/{repo}/issues": { |     "/repos/{owner}/{repo}/issues": { | ||||||
|       "get": { |       "get": { | ||||||
|         "produces": [ |         "produces": [ | ||||||
|  | @ -2139,6 +1910,50 @@ | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "/repos/{owner}/{repo}/issues/{index}/comments": { |     "/repos/{owner}/{repo}/issues/{index}/comments": { | ||||||
|  |       "get": { | ||||||
|  |         "produces": [ | ||||||
|  |           "application/json" | ||||||
|  |         ], | ||||||
|  |         "tags": [ | ||||||
|  |           "issue" | ||||||
|  |         ], | ||||||
|  |         "summary": "List all comments on an issue", | ||||||
|  |         "operationId": "issueGetComments", | ||||||
|  |         "parameters": [ | ||||||
|  |           { | ||||||
|  |             "type": "string", | ||||||
|  |             "description": "owner of the repo", | ||||||
|  |             "name": "owner", | ||||||
|  |             "in": "path", | ||||||
|  |             "required": true | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "type": "string", | ||||||
|  |             "description": "name of the repo", | ||||||
|  |             "name": "repo", | ||||||
|  |             "in": "path", | ||||||
|  |             "required": true | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "type": "integer", | ||||||
|  |             "description": "index of the issue", | ||||||
|  |             "name": "id", | ||||||
|  |             "in": "path", | ||||||
|  |             "required": true | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "type": "string", | ||||||
|  |             "description": "if provided, only comments updated since the specified time are returned.", | ||||||
|  |             "name": "string", | ||||||
|  |             "in": "query" | ||||||
|  |           } | ||||||
|  |         ], | ||||||
|  |         "responses": { | ||||||
|  |           "200": { | ||||||
|  |             "$ref": "#/responses/CommentList" | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       }, | ||||||
|       "post": { |       "post": { | ||||||
|         "consumes": [ |         "consumes": [ | ||||||
|           "application/json" |           "application/json" | ||||||
|  | @ -2330,6 +2145,187 @@ | ||||||
|             "$ref": "#/responses/notFound" |             "$ref": "#/responses/notFound" | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
|  |       }, | ||||||
|  |       "put": { | ||||||
|  |         "consumes": [ | ||||||
|  |           "application/json" | ||||||
|  |         ], | ||||||
|  |         "produces": [ | ||||||
|  |           "application/json" | ||||||
|  |         ], | ||||||
|  |         "tags": [ | ||||||
|  |           "issue" | ||||||
|  |         ], | ||||||
|  |         "summary": "Replace an issue's labels", | ||||||
|  |         "operationId": "issueReplaceLabels", | ||||||
|  |         "parameters": [ | ||||||
|  |           { | ||||||
|  |             "type": "string", | ||||||
|  |             "description": "owner of the repo", | ||||||
|  |             "name": "owner", | ||||||
|  |             "in": "path", | ||||||
|  |             "required": true | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "type": "string", | ||||||
|  |             "description": "name of the repo", | ||||||
|  |             "name": "repo", | ||||||
|  |             "in": "path", | ||||||
|  |             "required": true | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "type": "integer", | ||||||
|  |             "description": "index of the issue", | ||||||
|  |             "name": "index", | ||||||
|  |             "in": "path", | ||||||
|  |             "required": true | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "name": "body", | ||||||
|  |             "in": "body", | ||||||
|  |             "schema": { | ||||||
|  |               "$ref": "#/definitions/IssueLabelsOption" | ||||||
|  |             } | ||||||
|  |           } | ||||||
|  |         ], | ||||||
|  |         "responses": { | ||||||
|  |           "200": { | ||||||
|  |             "$ref": "#/responses/LabelList" | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       }, | ||||||
|  |       "post": { | ||||||
|  |         "consumes": [ | ||||||
|  |           "application/json" | ||||||
|  |         ], | ||||||
|  |         "produces": [ | ||||||
|  |           "application/json" | ||||||
|  |         ], | ||||||
|  |         "tags": [ | ||||||
|  |           "issue" | ||||||
|  |         ], | ||||||
|  |         "summary": "Add a label to an issue", | ||||||
|  |         "operationId": "issueAddLabel", | ||||||
|  |         "parameters": [ | ||||||
|  |           { | ||||||
|  |             "type": "string", | ||||||
|  |             "description": "owner of the repo", | ||||||
|  |             "name": "owner", | ||||||
|  |             "in": "path", | ||||||
|  |             "required": true | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "type": "string", | ||||||
|  |             "description": "name of the repo", | ||||||
|  |             "name": "repo", | ||||||
|  |             "in": "path", | ||||||
|  |             "required": true | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "type": "integer", | ||||||
|  |             "description": "index of the issue", | ||||||
|  |             "name": "index", | ||||||
|  |             "in": "path", | ||||||
|  |             "required": true | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "name": "body", | ||||||
|  |             "in": "body", | ||||||
|  |             "schema": { | ||||||
|  |               "$ref": "#/definitions/IssueLabelsOption" | ||||||
|  |             } | ||||||
|  |           } | ||||||
|  |         ], | ||||||
|  |         "responses": { | ||||||
|  |           "200": { | ||||||
|  |             "$ref": "#/responses/LabelList" | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       }, | ||||||
|  |       "delete": { | ||||||
|  |         "produces": [ | ||||||
|  |           "application/json" | ||||||
|  |         ], | ||||||
|  |         "tags": [ | ||||||
|  |           "issue" | ||||||
|  |         ], | ||||||
|  |         "summary": "Remove all labels from an issue", | ||||||
|  |         "operationId": "issueClearLabels", | ||||||
|  |         "parameters": [ | ||||||
|  |           { | ||||||
|  |             "type": "string", | ||||||
|  |             "description": "owner of the repo", | ||||||
|  |             "name": "owner", | ||||||
|  |             "in": "path", | ||||||
|  |             "required": true | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "type": "string", | ||||||
|  |             "description": "name of the repo", | ||||||
|  |             "name": "repo", | ||||||
|  |             "in": "path", | ||||||
|  |             "required": true | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "type": "integer", | ||||||
|  |             "description": "index of the issue", | ||||||
|  |             "name": "index", | ||||||
|  |             "in": "path", | ||||||
|  |             "required": true | ||||||
|  |           } | ||||||
|  |         ], | ||||||
|  |         "responses": { | ||||||
|  |           "204": { | ||||||
|  |             "$ref": "#/responses/empty" | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "/repos/{owner}/{repo}/issues/{index}/labels/{id}": { | ||||||
|  |       "delete": { | ||||||
|  |         "produces": [ | ||||||
|  |           "application/json" | ||||||
|  |         ], | ||||||
|  |         "tags": [ | ||||||
|  |           "issue" | ||||||
|  |         ], | ||||||
|  |         "summary": "Remove a label from an issue", | ||||||
|  |         "operationId": "issueRemoveLabel", | ||||||
|  |         "parameters": [ | ||||||
|  |           { | ||||||
|  |             "type": "string", | ||||||
|  |             "description": "owner of the repo", | ||||||
|  |             "name": "owner", | ||||||
|  |             "in": "path", | ||||||
|  |             "required": true | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "type": "string", | ||||||
|  |             "description": "name of the repo", | ||||||
|  |             "name": "repo", | ||||||
|  |             "in": "path", | ||||||
|  |             "required": true | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "type": "integer", | ||||||
|  |             "description": "index of the issue", | ||||||
|  |             "name": "index", | ||||||
|  |             "in": "path", | ||||||
|  |             "required": true | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "type": "integer", | ||||||
|  |             "description": "id of the label to remove", | ||||||
|  |             "name": "id", | ||||||
|  |             "in": "path", | ||||||
|  |             "required": true | ||||||
|  |           } | ||||||
|  |         ], | ||||||
|  |         "responses": { | ||||||
|  |           "204": { | ||||||
|  |             "$ref": "#/responses/empty" | ||||||
|  |           } | ||||||
|  |         } | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "/repos/{owner}/{repo}/issues/{index}/times": { |     "/repos/{owner}/{repo}/issues/{index}/times": { | ||||||
|  |  | ||||||
|  | @ -15,7 +15,7 @@ import ( | ||||||
| 
 | 
 | ||||||
| // ListIssueComments list all the comments of an issue
 | // ListIssueComments list all the comments of an issue
 | ||||||
| func ListIssueComments(ctx *context.APIContext) { | func ListIssueComments(ctx *context.APIContext) { | ||||||
| 	// swagger:operation GET /repos/{owner}/{repo}/issue/{index}/comments issue issueGetComments
 | 	// swagger:operation GET /repos/{owner}/{repo}/issues/{index}/comments issue issueGetComments
 | ||||||
| 	// ---
 | 	// ---
 | ||||||
| 	// summary: List all comments on an issue
 | 	// summary: List all comments on an issue
 | ||||||
| 	// produces:
 | 	// produces:
 | ||||||
|  |  | ||||||
|  | @ -58,7 +58,7 @@ func ListIssueLabels(ctx *context.APIContext) { | ||||||
| 
 | 
 | ||||||
| // AddIssueLabels add labels for an issue
 | // AddIssueLabels add labels for an issue
 | ||||||
| func AddIssueLabels(ctx *context.APIContext, form api.IssueLabelsOption) { | func AddIssueLabels(ctx *context.APIContext, form api.IssueLabelsOption) { | ||||||
| 	// swagger:operation POST /repos/{owner}/{repo}/issue/{index}/labels issue issueAddLabel
 | 	// swagger:operation POST /repos/{owner}/{repo}/issues/{index}/labels issue issueAddLabel
 | ||||||
| 	// ---
 | 	// ---
 | ||||||
| 	// summary: Add a label to an issue
 | 	// summary: Add a label to an issue
 | ||||||
| 	// consumes:
 | 	// consumes:
 | ||||||
|  | @ -129,7 +129,7 @@ func AddIssueLabels(ctx *context.APIContext, form api.IssueLabelsOption) { | ||||||
| 
 | 
 | ||||||
| // DeleteIssueLabel delete a label for an issue
 | // DeleteIssueLabel delete a label for an issue
 | ||||||
| func DeleteIssueLabel(ctx *context.APIContext) { | func DeleteIssueLabel(ctx *context.APIContext) { | ||||||
| 	// swagger:operation DELETE /repos/{owner}/{repo}/issue/{index}/labels/{id} issue issueRemoveLabel
 | 	// swagger:operation DELETE /repos/{owner}/{repo}/issues/{index}/labels/{id} issue issueRemoveLabel
 | ||||||
| 	// ---
 | 	// ---
 | ||||||
| 	// summary: Remove a label from an issue
 | 	// summary: Remove a label from an issue
 | ||||||
| 	// produces:
 | 	// produces:
 | ||||||
|  | @ -193,7 +193,7 @@ func DeleteIssueLabel(ctx *context.APIContext) { | ||||||
| 
 | 
 | ||||||
| // ReplaceIssueLabels replace labels for an issue
 | // ReplaceIssueLabels replace labels for an issue
 | ||||||
| func ReplaceIssueLabels(ctx *context.APIContext, form api.IssueLabelsOption) { | func ReplaceIssueLabels(ctx *context.APIContext, form api.IssueLabelsOption) { | ||||||
| 	// swagger:operation PUT /repos/{owner}/{repo}/issue/{index}/labels issue issueReplaceLabels
 | 	// swagger:operation PUT /repos/{owner}/{repo}/issues/{index}/labels issue issueReplaceLabels
 | ||||||
| 	// ---
 | 	// ---
 | ||||||
| 	// summary: Replace an issue's labels
 | 	// summary: Replace an issue's labels
 | ||||||
| 	// consumes:
 | 	// consumes:
 | ||||||
|  | @ -264,7 +264,7 @@ func ReplaceIssueLabels(ctx *context.APIContext, form api.IssueLabelsOption) { | ||||||
| 
 | 
 | ||||||
| // ClearIssueLabels delete all the labels for an issue
 | // ClearIssueLabels delete all the labels for an issue
 | ||||||
| func ClearIssueLabels(ctx *context.APIContext) { | func ClearIssueLabels(ctx *context.APIContext) { | ||||||
| 	// swagger:operation DELETE /repos/{owner}/{repo}/issue/{index}/labels issue issueClearLabels
 | 	// swagger:operation DELETE /repos/{owner}/{repo}/issues/{index}/labels issue issueClearLabels
 | ||||||
| 	// ---
 | 	// ---
 | ||||||
| 	// summary: Remove all labels from an issue
 | 	// summary: Remove all labels from an issue
 | ||||||
| 	// produces:
 | 	// produces:
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue