diff options
author | 6543 <6543@obermui.de> | 2021-06-17 18:04:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-17 18:04:10 +0200 |
commit | f7cd394680f885061144d236abc3c25f30be3147 (patch) | |
tree | b0cceab982c18db7fb48489729dc44fdff8101af /templates/swagger | |
parent | 19dedc3fa521fdb6456bad2b080bb1aaa6722b24 (diff) | |
download | gitea-f7cd394680f885061144d236abc3c25f30be3147.tar.gz gitea-f7cd394680f885061144d236abc3c25f30be3147.zip |
[API] Add repoCreateTag (#16165)
* Add API CreateTag
* Add Test
* API: expose Tag Message
Diffstat (limited to 'templates/swagger')
-rw-r--r-- | templates/swagger/v1_json.tmpl | 72 |
1 files changed, 71 insertions, 1 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 9b0d07ebfc..017dc824d7 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -9082,6 +9082,50 @@ "$ref": "#/responses/TagList" } } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a new git tag in a repository", + "operationId": "repoCreateTag", + "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 + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateTagOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/AnnotatedTag" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/conflict" + } + } } }, "/repos/{owner}/{repo}/tags/{tag}": { @@ -13092,6 +13136,28 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "CreateTagOption": { + "description": "CreateTagOption options when creating a tag", + "type": "object", + "required": [ + "tag_name" + ], + "properties": { + "message": { + "type": "string", + "x-go-name": "Message" + }, + "tag_name": { + "type": "string", + "x-go-name": "TagName" + }, + "target": { + "type": "string", + "x-go-name": "Target" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "CreateTeamOption": { "description": "CreateTeamOption options for creating a team", "type": "object", @@ -16149,6 +16215,10 @@ "type": "string", "x-go-name": "ID" }, + "message": { + "type": "string", + "x-go-name": "Message" + }, "name": { "type": "string", "x-go-name": "Name" @@ -17265,7 +17335,7 @@ "parameterBodies": { "description": "parameterBodies", "schema": { - "$ref": "#/definitions/PullReviewRequestOptions" + "$ref": "#/definitions/CreateTagOption" } }, "redirect": { |