diff options
author | 6543 <6543@obermui.de> | 2019-12-12 05:23:05 +0100 |
---|---|---|
committer | techknowlogick <techknowlogick@gitea.io> | 2019-12-11 23:23:05 -0500 |
commit | aceb1085c79e4c75268ce794a8ee84631382a403 (patch) | |
tree | 0e2a9137e07d04ff33c034f2a610e4a51fa0897a /templates/swagger | |
parent | 382936a668c48b3c83fe80cdf138f76fb74a5f8f (diff) | |
download | gitea-aceb1085c79e4c75268ce794a8ee84631382a403.tar.gz gitea-aceb1085c79e4c75268ce794a8ee84631382a403.zip |
[API] extend StopWatch (#9196)
* squash api-stopwatch
* fix prepair logic! + add Tests
* fix lint
* more robust time compare
* delete responce 202 -> 204
* change http responce in test too
Diffstat (limited to 'templates/swagger')
-rw-r--r-- | templates/swagger/v1_json.tmpl | 107 |
1 files changed, 106 insertions, 1 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 9c8db28817..7ed43b450c 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -3972,6 +3972,59 @@ } } }, + "/repos/{owner}/{repo}/issues/{index}/stopwatch/delete": { + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Delete an issue's existing stopwatch.", + "operationId": "issueDeleteStopWatch", + "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": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "description": "Not repo writer, user does not have rights to toggle stopwatch" + }, + "404": { + "description": "Issue not found" + }, + "409": { + "description": "Cannot cancel a non existent stopwatch" + } + } + } + }, "/repos/{owner}/{repo}/issues/{index}/stopwatch/start": { "post": { "consumes": [ @@ -4037,7 +4090,7 @@ "issue" ], "summary": "Stop an issue's existing stopwatch.", - "operationId": "issueStopWatch", + "operationId": "issueStopStopWatch", "parameters": [ { "type": "string", @@ -7174,6 +7227,26 @@ } } }, + "/user/stopwatches": { + "get": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get list of all existing stopwatches", + "operationId": "userGetStopWatches", + "responses": { + "200": { + "$ref": "#/responses/StopWatchList" + } + } + } + }, "/user/subscriptions": { "get": { "produces": [ @@ -10808,6 +10881,23 @@ "type": "string", "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "StopWatch": { + "description": "StopWatch represent a running stopwatch", + "type": "object", + "properties": { + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "issue_index": { + "type": "integer", + "format": "int64", + "x-go-name": "IssueIndex" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "Tag": { "description": "Tag represents a repository tag", "type": "object", @@ -11553,6 +11643,21 @@ } } }, + "StopWatch": { + "description": "StopWatch", + "schema": { + "$ref": "#/definitions/StopWatch" + } + }, + "StopWatchList": { + "description": "StopWatchList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/StopWatch" + } + } + }, "Tag": { "description": "Tag", "schema": { |