diff options
author | 6543 <6543@obermui.de> | 2020-01-31 16:49:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-31 15:49:04 +0000 |
commit | 13bc82009c2def4e729f11340e74a14d6c6b32e8 (patch) | |
tree | b545d0af8fdebbddb79fee55b8e643c9f392ff49 /templates/swagger | |
parent | d816f7018b0726f868fa0cddf02ffae184601395 (diff) | |
download | gitea-13bc82009c2def4e729f11340e74a14d6c6b32e8.tar.gz gitea-13bc82009c2def4e729f11340e74a14d6c6b32e8.zip |
API endpoint for repo transfer (#9947)
* squash
* optimize
* fail before make any changes
* fix-header
Diffstat (limited to 'templates/swagger')
-rw-r--r-- | templates/swagger/v1_json.tmpl | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index c5fa6d6ad8..ecd9639049 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -7321,6 +7321,57 @@ } } }, + "/repos/{owner}/{repo}/transfer": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Transfer a repo ownership", + "operationId": "repoTransfer", + "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 + }, + { + "description": "Transfer Options", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/TransferRepoOption" + } + } + ], + "responses": { + "202": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, "/repositories/{id}": { "get": { "produces": [ @@ -12580,6 +12631,29 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "TransferRepoOption": { + "description": "TransferRepoOption options when transfer a repository's ownership", + "type": "object", + "required": [ + "new_owner" + ], + "properties": { + "new_owner": { + "type": "string", + "x-go-name": "NewOwner" + }, + "team_ids": { + "description": "ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.", + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "x-go-name": "TeamIDs" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "UpdateFileOptions": { "description": "UpdateFileOptions options for updating files\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)", "type": "object", |