summaryrefslogtreecommitdiffstats
path: root/templates/swagger
diff options
context:
space:
mode:
authorLanre Adelowo <adelowomailbox@gmail.com>2019-02-07 03:57:25 +0100
committertechknowlogick <matti@mdranta.net>2019-02-06 21:57:25 -0500
commit9dfdf80af08cee3b2f0297843084fe14e3af31e7 (patch)
tree82de57b6085e8dfa4c9697edbf6b13c1daf0e26d /templates/swagger
parentcc48c12d8f16dcb10b21972f7bfd631c5d15be48 (diff)
downloadgitea-9dfdf80af08cee3b2f0297843084fe14e3af31e7.tar.gz
gitea-9dfdf80af08cee3b2f0297843084fe14e3af31e7.zip
Expose issue stopwatch toggling via API (#5970)
Diffstat (limited to 'templates/swagger')
-rw-r--r--templates/swagger/v1_json.tmpl106
1 files changed, 106 insertions, 0 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index c2ed1d75b8..d45a3d6d1b 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -2942,6 +2942,112 @@
}
}
},
+ "/repos/{owner}/{repo}/issues/{index}/stopwatch/start": {
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Start stopwatch on an issue.",
+ "operationId": "issueStartStopWatch",
+ "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": "index of the issue to create the stopwatch on",
+ "name": "index",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "description": "Not repo writer, user does not have rights to toggle stopwatch"
+ },
+ "404": {
+ "description": "Issue not found"
+ },
+ "409": {
+ "description": "Cannot start a stopwatch again if it already exists"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/{repo}/issues/{index}/stopwatch/stop": {
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "issue"
+ ],
+ "summary": "Stop an issue's existing stopwatch.",
+ "operationId": "issueStopWatch",
+ "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": "index of the issue to stop the stopwatch on",
+ "name": "index",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/empty"
+ },
+ "403": {
+ "description": "Not repo writer, user does not have rights to toggle stopwatch"
+ },
+ "404": {
+ "description": "Issue not found"
+ },
+ "409": {
+ "description": "Cannot stop a non existent stopwatch"
+ }
+ }
+ }
+ },
"/repos/{owner}/{repo}/keys": {
"get": {
"produces": [