aboutsummaryrefslogtreecommitdiffstats
path: root/templates/swagger
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2021-06-23 23:08:47 +0200
committerGitHub <noreply@github.com>2021-06-23 17:08:47 -0400
commiteb324a9402878a13029116bafa8ccce527796522 (patch)
tree8ad442182f440e9acfd4e929a30919d9796fb3ea /templates/swagger
parent08f4b3f31288bc4e12e94f00c7d88583ab04dd2e (diff)
downloadgitea-eb324a9402878a13029116bafa8ccce527796522.tar.gz
gitea-eb324a9402878a13029116bafa8ccce527796522.zip
[API] Add repoGetTag (#16166)
* GetTag -> GetAnnotatedTag * API: Add repoGetTag * fix swagger docs * support "/" as tag name char Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'templates/swagger')
-rw-r--r--templates/swagger/v1_json.tmpl45
1 files changed, 43 insertions, 2 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 7425150a98..9453b1af32 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -3657,7 +3657,7 @@
"repository"
],
"summary": "Gets the tag object of an annotated tag (not lightweight tags)",
- "operationId": "GetTag",
+ "operationId": "GetAnnotatedTag",
"parameters": [
{
"type": "string",
@@ -9117,7 +9117,7 @@
],
"responses": {
"200": {
- "$ref": "#/responses/AnnotatedTag"
+ "$ref": "#/responses/Tag"
},
"404": {
"$ref": "#/responses/notFound"
@@ -9129,6 +9129,47 @@
}
},
"/repos/{owner}/{repo}/tags/{tag}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get the tag of a repository by tag name",
+ "operationId": "repoGetTag",
+ "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": "name of tag",
+ "name": "tag",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Tag"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ },
"delete": {
"produces": [
"application/json"