diff options
author | 6543 <6543@obermui.de> | 2020-01-08 22:14:00 +0100 |
---|---|---|
committer | techknowlogick <techknowlogick@gitea.io> | 2020-01-08 16:14:00 -0500 |
commit | 14a96874442a13bb212affb13a585f0536d89c2a (patch) | |
tree | f5406f59da2da0c70ca0d4efa3af3343b02debbb /templates/swagger | |
parent | f8dcc5f9f8e389218f1908ad9d5fe2044102abf1 (diff) | |
download | gitea-14a96874442a13bb212affb13a585f0536d89c2a.tar.gz gitea-14a96874442a13bb212affb13a585f0536d89c2a.zip |
times Add filters (#9373)
(extend #9200)
* add query param for GET functions (created Bevore & after)
* add test
* generalize func GetQueryBeforeSince
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'templates/swagger')
-rw-r--r-- | templates/swagger/v1_json.tmpl | 63 |
1 files changed, 60 insertions, 3 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index f37c900cca..d3e2ac6113 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -4433,6 +4433,20 @@ "name": "index", "in": "path", "required": true + }, + { + "type": "string", + "format": "date-time", + "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format", + "name": "since", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format", + "name": "before", + "in": "query" } ], "responses": { @@ -4543,7 +4557,7 @@ "$ref": "#/responses/error" }, "403": { - "$ref": "#/responses/error" + "$ref": "#/responses/forbidden" } } } @@ -4601,7 +4615,7 @@ "$ref": "#/responses/error" }, "403": { - "$ref": "#/responses/error" + "$ref": "#/responses/forbidden" } } } @@ -6419,6 +6433,26 @@ "name": "repo", "in": "path", "required": true + }, + { + "type": "string", + "description": "optional filter by user", + "name": "user", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format", + "name": "since", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format", + "name": "before", + "in": "query" } ], "responses": { @@ -6427,6 +6461,9 @@ }, "400": { "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" } } } @@ -6437,10 +6474,11 @@ "application/json" ], "tags": [ - "user" + "repository" ], "summary": "List a user's tracked times in a repo", "operationId": "userTrackedTimes", + "deprecated": true, "parameters": [ { "type": "string", @@ -6470,6 +6508,9 @@ }, "400": { "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" } } } @@ -7685,6 +7726,22 @@ ], "summary": "List the current user's tracked times", "operationId": "userCurrentTrackedTimes", + "parameters": [ + { + "type": "string", + "format": "date-time", + "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format", + "name": "since", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format", + "name": "before", + "in": "query" + } + ], "responses": { "200": { "$ref": "#/responses/TrackedTimeList" |