diff options
author | Heinrich Lee Yu <heinrich@gitlab.com> | 2018-11-30 07:03:35 +0300 |
---|---|---|
committer | Heinrich Lee Yu <hleeyu@gmail.com> | 2018-12-20 02:28:28 +0300 |
commit | 95aae95a1cbb55facd127c74d6c044b13533f3fe (patch) | |
tree | 6ecf27a219ee09f9e9d294d8304df2cb93c4da3d /spec/fixtures | |
parent | 48d2c02efe7697914591d7381ce1c72d68eed336 (diff) |
Code style changes and refactor
Diffstat (limited to 'spec/fixtures')
3 files changed, 29 insertions, 29 deletions
diff --git a/spec/fixtures/api/schemas/entities/issuable_sidebar_todo.json b/spec/fixtures/api/schemas/entities/issuable_sidebar_todo.json index 264f0a5f0db..b77e60ece12 100644 --- a/spec/fixtures/api/schemas/entities/issuable_sidebar_todo.json +++ b/spec/fixtures/api/schemas/entities/issuable_sidebar_todo.json @@ -1,5 +1,5 @@ { - "type": "object", + "type": ["object", "null"], "properties" : { "id": { "type": "integer" }, "delete_path": { "type": "string" } diff --git a/spec/fixtures/api/schemas/entities/issue_sidebar.json b/spec/fixtures/api/schemas/entities/issue_sidebar.json index ed08df27e0b..93adb493d1b 100644 --- a/spec/fixtures/api/schemas/entities/issue_sidebar.json +++ b/spec/fixtures/api/schemas/entities/issue_sidebar.json @@ -10,15 +10,16 @@ "confidential": { "type": "boolean" }, "reference": { "type": "string" }, "current_user": { - "oneOf": [ - { "type": "null" }, - { "$ref": "user.json" } - ] - }, - "todo": { - "oneOf": [ - { "type": "null" }, - { "$ref": "issuable_sidebar_todo.json" } + "allOf": [ + { "$ref": "../public_api/v4/user/basic.json" }, + { "type": "object", + "properties" : { + "todo": { "$ref": "issuable_sidebar_todo.json" }, + "can_edit": { "type": "boolean" }, + "can_move": { "type": "boolean" }, + "can_admin_label": { "type": "boolean" } + } + } ] }, "milestone": { @@ -31,10 +32,6 @@ "type": "array", "items": { "$ref": "label.json" } }, - "signed_in": { "type": "boolean" }, - "can_edit": { "type": "boolean" }, - "can_move": { "type": "boolean" }, - "can_admin_label": { "type": "boolean" }, "issuable_json_path": { "type": "string" }, "namespace_path": { "type": "string" }, "project_path": { "type": "string" }, diff --git a/spec/fixtures/api/schemas/entities/merge_request_sidebar.json b/spec/fixtures/api/schemas/entities/merge_request_sidebar.json index 3172c2788b9..7e9e048a9fd 100644 --- a/spec/fixtures/api/schemas/entities/merge_request_sidebar.json +++ b/spec/fixtures/api/schemas/entities/merge_request_sidebar.json @@ -8,15 +8,16 @@ "discussion_locked": { "type": ["boolean", "null"] }, "reference": { "type": "string" }, "current_user": { - "oneOf": [ - { "type": "null" }, - { "$ref": "user.json" } - ] - }, - "todo": { - "oneOf": [ - { "type": "null" }, - { "$ref": "issuable_sidebar_todo.json" } + "allOf": [ + { "$ref": "../public_api/v4/user/basic.json" }, + { "type": "object", + "properties" : { + "todo": { "$ref": "issuable_sidebar_todo.json" }, + "can_edit": { "type": "boolean" }, + "can_move": { "type": "boolean" }, + "can_admin_label": { "type": "boolean" } + } + } ] }, "milestone": { @@ -30,13 +31,15 @@ "items": { "$ref": "label.json" } }, "assignee": { - "$ref": "../public_api/v4/user/basic.json" + "allOf": [ + { "$ref": "../public_api/v4/user/basic.json" }, + { "type": "object", + "properties" : { + "can_merge": { "type": "boolean" } + } + } + ] }, - "signed_in": { "type": "boolean" }, - "can_edit": { "type": "boolean" }, - "can_move": { "type": "boolean" }, - "can_admin_label": { "type": "boolean" }, - "can_merge": { "type": ["boolean", "null"] }, "issuable_json_path": { "type": "string" }, "namespace_path": { "type": "string" }, "project_path": { "type": "string" }, |