aboutsummaryrefslogtreecommitdiffstats
path: root/templates/swagger
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-04-08 04:54:46 +0200
committerGitHub <noreply@github.com>2020-04-07 22:54:46 -0400
commit3d63caa54245d87dd057d4e853bb5dc7fc39e7db (patch)
tree2fbbb48a39cff157f8cf171b0dad51af366c0908 /templates/swagger
parent71979d9663d8e43b772c37f2a79af5b8911df661 (diff)
downloadgitea-3d63caa54245d87dd057d4e853bb5dc7fc39e7db.tar.gz
gitea-3d63caa54245d87dd057d4e853bb5dc7fc39e7db.zip
[API] Get a single commit via Ref (#10915)
* GET /repos/:owner/:repo/commits/:ref * add Validation Checks * Fix & Extend TEST * add two new tast cases
Diffstat (limited to 'templates/swagger')
-rw-r--r--templates/swagger/v1_json.tmpl51
1 files changed, 50 insertions, 1 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 6e5086d507..55094e391d 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -2511,6 +2511,52 @@
}
}
},
+ "/repos/{owner}/{repo}/commits/{ref}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get a single commit from a repository",
+ "operationId": "repoGetSingleCommitByRef",
+ "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": "a git ref",
+ "name": "ref",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Commit"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
"/repos/{owner}/{repo}/commits/{ref}/statuses": {
"get": {
"produces": [
@@ -2976,7 +3022,7 @@
"repository"
],
"summary": "Get a single commit from a repository",
- "operationId": "repoGetSingleCommit",
+ "operationId": "repoGetSingleCommitBySHA",
"parameters": [
{
"type": "string",
@@ -3006,6 +3052,9 @@
},
"404": {
"$ref": "#/responses/notFound"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
}
}
}