summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorCirno the Strongest <1447794+CirnoT@users.noreply.github.com>2020-05-11 11:44:36 +0200
committerGitHub <noreply@github.com>2020-05-11 12:44:36 +0300
commit32b8172e56c38d98ce493f31a30e1642e29a9030 (patch)
tree8cc6d9a66a0af925aa06e5a59e060456bd4d09a0 /templates
parent59b9b77a0dce02076195c5f6402afbbb6edd9deb (diff)
downloadgitea-32b8172e56c38d98ce493f31a30e1642e29a9030.tar.gz
gitea-32b8172e56c38d98ce493f31a30e1642e29a9030.zip
Consolidate API for getting single commit (#11368)
* Allow Git ref for /repos/{owner}/{repo}/git/commits/{sha} * Consolidate API for getting single commit * Fix tests and do it differently Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'templates')
-rw-r--r--templates/swagger/v1_json.tmpl50
1 files changed, 2 insertions, 48 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 01ad43a904..66a07419b1 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -2549,52 +2549,6 @@
}
}
},
- "/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": [
@@ -3075,7 +3029,7 @@
"repository"
],
"summary": "Get a single commit from a repository",
- "operationId": "repoGetSingleCommitBySHA",
+ "operationId": "repoGetSingleCommit",
"parameters": [
{
"type": "string",
@@ -3093,7 +3047,7 @@
},
{
"type": "string",
- "description": "the commit hash",
+ "description": "a git ref or commit sha",
"name": "sha",
"in": "path",
"required": true