diff options
author | Alexandru Croitor <acroitor@gitlab.com> | 2019-04-08 14:17:22 +0300 |
---|---|---|
committer | Alexandru Croitor <acroitor@gitlab.com> | 2019-05-15 10:15:16 +0300 |
commit | 5ec28dc387fb4adc3c5b65ac47819a8663186954 (patch) | |
tree | 4e40a2bf57265d1613ab207e18ab45ee2c4195a5 /spec/fixtures | |
parent | 6bf5af2acd5e046d4235dee6473c214e91d86379 (diff) | |
download | gitlab-ce-5ec28dc387fb4adc3c5b65ac47819a8663186954.tar.gz |
Changes to issues api
When issues_controller endpoint was used for search, the parameters
passed to the controller were slightly different then the ones
passed to API. Because the searchbar UI is reused in different
places and builds the parameters passed to request in same way
we need to account for old parameter names.
Add issues_statistics api endpoints
Adds issue_statistics api endpoints for issue lists and returns
counts of issues for all, closed and opened states.
Expose more label attributes based on a param
When requesting issues list through API expose more attributes
for labels, like color, description if with_labels_data param is
being passed, avoiding this way to change response schema for users
that already use API.
https://gitlab.com/gitlab-org/gitlab-ce/issues/57402
Diffstat (limited to 'spec/fixtures')
-rw-r--r-- | spec/fixtures/api/schemas/public_api/v4/issue.json | 6 | ||||
-rw-r--r-- | spec/fixtures/api/schemas/public_api/v4/label_basic.json | 24 |
2 files changed, 28 insertions, 2 deletions
diff --git a/spec/fixtures/api/schemas/public_api/v4/issue.json b/spec/fixtures/api/schemas/public_api/v4/issue.json index 147f53239e0..455941f05da 100644 --- a/spec/fixtures/api/schemas/public_api/v4/issue.json +++ b/spec/fixtures/api/schemas/public_api/v4/issue.json @@ -14,7 +14,7 @@ "labels": { "type": "array", "items": { - "type": "string" + "$ref": "../../entities/label.json" } }, "milestone": { @@ -79,6 +79,8 @@ "due_date": { "type": ["date", "null"] }, "confidential": { "type": "boolean" }, "web_url": { "type": "uri" }, + "has_tasks": {"type": "boolean"}, + "task_status": {"type": "string"}, "time_stats": { "time_estimate": { "type": "integer" }, "total_time_spent": { "type": "integer" }, @@ -91,6 +93,6 @@ "state", "created_at", "updated_at", "labels", "milestone", "assignees", "author", "user_notes_count", "upvotes", "downvotes", "due_date", "confidential", - "web_url" + "has_tasks", "web_url" ] } diff --git a/spec/fixtures/api/schemas/public_api/v4/label_basic.json b/spec/fixtures/api/schemas/public_api/v4/label_basic.json new file mode 100644 index 00000000000..37bbdcb14fe --- /dev/null +++ b/spec/fixtures/api/schemas/public_api/v4/label_basic.json @@ -0,0 +1,24 @@ +{ + "type": "object", + "required": [ + "id", + "name", + "color", + "description", + "text_color" + ], + "properties": { + "id": { "type": "integer" }, + "name": { "type": "string" }, + "color": { + "type": "string", + "pattern": "^#[0-9A-Fa-f]{3}{1,2}$" + }, + "description": { "type": ["string", "null"] }, + "text_color": { + "type": "string", + "pattern": "^#[0-9A-Fa-f]{3}{1,2}$" + } + }, + "additionalProperties": false +} |