diff options
author | 6543 <6543@obermui.de> | 2020-04-19 04:38:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-19 10:38:09 +0800 |
commit | 3c5a4d094a572b446435ccf7ebf75836c2d98c57 (patch) | |
tree | 9b8e22a014004c4e008024de8b1697565cbac81a /templates/swagger | |
parent | 0ef11ff2c909d1775642fa03b09f1342fcaaeb69 (diff) | |
download | gitea-3c5a4d094a572b446435ccf7ebf75836c2d98c57.tar.gz gitea-3c5a4d094a572b446435ccf7ebf75836c2d98c57.zip |
[API] Add branch delete (#11112)
* use same process as in routers/repo/branch.go/deleteBranch
* make sure default branch can not be deleted
* remove IsDefaultBranch from UI process - it is worth its own pull
* permissions
Diffstat (limited to 'templates/swagger')
-rw-r--r-- | templates/swagger/v1_json.tmpl | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index e87af4f5c9..24a6330a06 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -2269,6 +2269,47 @@ "$ref": "#/responses/Branch" } } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a specific branch from a repository", + "operationId": "repoDeleteBranch", + "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": "string", + "description": "branch to delete", + "name": "branch", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/error" + } + } } }, "/repos/{owner}/{repo}/collaborators": { |