diff --git a/routers/api/v1/repo/project.go b/routers/api/v1/repo/project.go index 17c194c7fc..ea4f3f8825 100644 --- a/routers/api/v1/repo/project.go +++ b/routers/api/v1/repo/project.go @@ -28,6 +28,7 @@ func getRepoProjectByID(ctx *context.APIContext) *project_model.Project { } return nil } + project.Repo = ctx.Repo.Repository return project } @@ -713,9 +714,9 @@ func AddIssueToProjectColumn(ctx *context.APIContext) { // RemoveIssueFromProjectColumn remove an issue from a project column func RemoveIssueFromProjectColumn(ctx *context.APIContext) { - // swagger:operation POST /repos/{owner}/{repo}/projects/columns/{id}/issues/{issue_id} repository repoAddIssueToProjectColumn + // swagger:operation DELETE /repos/{owner}/{repo}/projects/columns/{id}/issues/{issue_id} repository repoRemoveIssueFromProjectColumn // --- - // summary: Add an issue to a project column + // summary: Remove an issue from a project column // consumes: // - application/json // produces: @@ -744,7 +745,7 @@ func RemoveIssueFromProjectColumn(ctx *context.APIContext) { // format: int64 // required: true // responses: - // "201": + // "204": // "$ref": "#/responses/empty" // "403": // "$ref": "#/responses/forbidden" diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 3847cbaae5..71ed0ea380 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -13843,6 +13843,65 @@ "$ref": "#/responses/validationError" } } + }, + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Remove an issue from a project column", + "operationId": "repoRemoveIssueFromProjectColumn", + "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", + "format": "int64", + "description": "id of the column", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the issue", + "name": "issue_id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } } }, "/repos/{owner}/{repo}/projects/{id}": {