diff options
author | 6543 <6543@obermui.de> | 2020-01-08 08:00:59 +0100 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2020-01-08 15:00:59 +0800 |
commit | e88d67b774ae615208b25133c299f2d50b3a018b (patch) | |
tree | 4471be8b873a81f2ce7a7c951e9fcf5ab4518a2b /templates/swagger | |
parent | c884735740ddbf6c950b44964b7ef7c77c4a0325 (diff) | |
download | gitea-e88d67b774ae615208b25133c299f2d50b3a018b.tar.gz gitea-e88d67b774ae615208b25133c299f2d50b3a018b.zip |
[API] add comments endpoint for single comment (#9494)
* add GET /repos/{owner}/{repo}/issues/comments/{id}
and complete error list for swagger in other func
* add repo check
Diffstat (limited to 'templates/swagger')
-rw-r--r-- | templates/swagger/v1_json.tmpl | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 45e84d3ed0..f37c900cca 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -3002,6 +3002,57 @@ } }, "/repos/{owner}/{repo}/issues/comments/{id}": { + "get": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a comment", + "operationId": "issueGetComment", + "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": "integer", + "format": "int64", + "description": "id of the comment", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, "delete": { "tags": [ "issue" @@ -3038,6 +3089,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -3087,6 +3141,15 @@ "responses": { "200": { "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -3491,6 +3554,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -3554,6 +3620,9 @@ }, "403": { "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" } } } |