diff options
author | qwerty287 <80460567+qwerty287@users.noreply.github.com> | 2021-12-24 05:26:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-23 23:26:52 -0500 |
commit | 7cc44491fae1e5f00616a5b8d8da2934a8a619f8 (patch) | |
tree | 076c8d2bb9d706ce77356378547bfeb4dc83a510 /templates/swagger | |
parent | 5754080eb9b13e3446443bc7c17cd53d160dfdf2 (diff) | |
download | gitea-7cc44491fae1e5f00616a5b8d8da2934a8a619f8.tar.gz gitea-7cc44491fae1e5f00616a5b8d8da2934a8a619f8.zip |
Add API to manage repo tranfers (#17963)
Diffstat (limited to 'templates/swagger')
-rw-r--r-- | templates/swagger/v1_json.tmpl | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index b016ad22a2..96dd262301 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -9895,6 +9895,84 @@ } } }, + "/repos/{owner}/{repo}/transfer/accept": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Accept a repo transfer", + "operationId": "acceptRepoTransfer", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to transfer", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to transfer", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "202": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/transfer/reject": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Reject a repo transfer", + "operationId": "rejectRepoTransfer", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to transfer", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to transfer", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, "/repos/{owner}/{repo}/wiki/new": { "post": { "consumes": [ @@ -16890,6 +16968,26 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "RepoTransfer": { + "description": "RepoTransfer represents a pending repo transfer", + "type": "object", + "properties": { + "doer": { + "$ref": "#/definitions/User" + }, + "recipient": { + "$ref": "#/definitions/User" + }, + "teams": { + "type": "array", + "items": { + "$ref": "#/definitions/Team" + }, + "x-go-name": "Teams" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "Repository": { "description": "Repository represents a repository", "type": "object", @@ -17042,6 +17140,9 @@ "format": "int64", "x-go-name": "Releases" }, + "repo_transfer": { + "$ref": "#/definitions/RepoTransfer" + }, "size": { "type": "integer", "format": "int64", |