diff options
Diffstat (limited to 'spec/fixtures/api/schemas/entities')
17 files changed, 380 insertions, 5 deletions
diff --git a/spec/fixtures/api/schemas/entities/discussion.json b/spec/fixtures/api/schemas/entities/discussion.json index 21d8efe0b2b..2afabcc9195 100644 --- a/spec/fixtures/api/schemas/entities/discussion.json +++ b/spec/fixtures/api/schemas/entities/discussion.json @@ -60,6 +60,9 @@ "resolve_with_issue_path": { "type": "string" }, "cached_markdown_version": { "type": "integer" }, "human_access": { "type": ["string", "null"] }, + "is_noteable_author": { "type": "boolean" }, + "is_contributor": { "type": "boolean" }, + "project_name": { "type": "string" }, "toggle_award_path": { "type": "string" }, "path": { "type": "string" }, "commands_changes": { "type": "object", "additionalProperties": true }, diff --git a/spec/fixtures/api/schemas/entities/github/branches.json b/spec/fixtures/api/schemas/entities/github/branches.json new file mode 100644 index 00000000000..ee3da3704f3 --- /dev/null +++ b/spec/fixtures/api/schemas/entities/github/branches.json @@ -0,0 +1,16 @@ +{ + "type": "array", + "properties" : { + "name": { "type": "string" }, + "commit": { + "type": "object", + "required": ["sha", "type"], + "properties" : { + "sha": { "type": "string" }, + "type": { "type": "string" } + }, + "additionalProperties": false + }, + "additionalProperties": false + } +} diff --git a/spec/fixtures/api/schemas/entities/github/commit.json b/spec/fixtures/api/schemas/entities/github/commit.json new file mode 100644 index 00000000000..698d933be07 --- /dev/null +++ b/spec/fixtures/api/schemas/entities/github/commit.json @@ -0,0 +1,61 @@ +{ + "type": "object", + "properties" : { + "sha": { "type": "string" }, + "parents": { + "type": "array", + "properties": { + "sha": { "type": "string" } + }, + "additionalProperties": false + }, + "author": { + "type": "object", + "required": ["login", "email"], + "properties" : { + "login": { "type": ["string", "null"] }, + "email": { "type": "string" } + }, + "additionalProperties": false + }, + "committer": { + "type": "object", + "required": ["login", "email"], + "properties" : { + "login": { "type": ["string", "null"] }, + "email": { "type": "string" } + }, + "additionalProperties": false + }, + "commit": { + "type": "object", + "properties": { + "message": { "type": "string" }, + "author": { + "type": "object", + "required": ["name", "email", "date", "type"], + "properties" : { + "name": { "type": "string" }, + "email": { "type": "string" }, + "date": { "type": "date" }, + "type": { "type": "string" } + }, + "additionalProperties": false + }, + "committer": { + "type": "object", + "required": ["name", "email", "date", "type"], + "properties" : { + "name": { "type": "string" }, + "email": { "type": "string" }, + "date": { "type": "date" }, + "type": { "type": "string" } + }, + "additionalProperties": false + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } +} diff --git a/spec/fixtures/api/schemas/entities/github/pull_request.json b/spec/fixtures/api/schemas/entities/github/pull_request.json new file mode 100644 index 00000000000..6c24879b800 --- /dev/null +++ b/spec/fixtures/api/schemas/entities/github/pull_request.json @@ -0,0 +1,108 @@ +{ + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "body": { + "type": [ + "string", + "null" + ] + }, + "id": { + "type": "integer" + }, + "number": { + "type": "integer" + }, + "state": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "merged": { + "type": "boolean" + }, + "merged_at": { + "type": [ + "date", + "null" + ] + }, + "closed_at": { + "type": [ + "date", + "null" + ] + }, + "updated_at": { + "type": "date" + }, + "assignee": { + "$ref": "user.json" + }, + "author": { + "$ref": "user.json" + }, + "head": { + "type": "object", + "required": [ + "label", + "ref", + "repo" + ], + "properties": { + "label": { + "type": "string" + }, + "ref": { + "type": "string" + }, + "repo": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "repository.json" + } + ] + } + }, + "additionalProperties": false + }, + "base": { + "type": "object", + "required": [ + "label", + "ref", + "repo" + ], + "properties": { + "label": { + "type": "string" + }, + "ref": { + "type": "string" + }, + "repo": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "repository.json" + } + ] + } + }, + "additionalProperties": false + }, + "additionalProperties": false + } +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/entities/github/pull_requests.json b/spec/fixtures/api/schemas/entities/github/pull_requests.json new file mode 100644 index 00000000000..4dddeb5fa20 --- /dev/null +++ b/spec/fixtures/api/schemas/entities/github/pull_requests.json @@ -0,0 +1,6 @@ +{ + "type": "array", + "items": { + "$ref": "pull_request.json" + } +} diff --git a/spec/fixtures/api/schemas/entities/github/repositories.json b/spec/fixtures/api/schemas/entities/github/repositories.json new file mode 100644 index 00000000000..26457901ef2 --- /dev/null +++ b/spec/fixtures/api/schemas/entities/github/repositories.json @@ -0,0 +1,16 @@ +{ + "type": "array", + "properties" : { + "id": { "type": "integer" }, + "name": { "type": "string" }, + "owner": { + "type": "object", + "required": ["login"], + "properties" : { + "login": { "type": "string" } + }, + "additionalProperties": false + }, + "additionalProperties": false + } +} diff --git a/spec/fixtures/api/schemas/entities/github/repository.json b/spec/fixtures/api/schemas/entities/github/repository.json new file mode 100644 index 00000000000..44d7d059140 --- /dev/null +++ b/spec/fixtures/api/schemas/entities/github/repository.json @@ -0,0 +1,16 @@ +{ + "type": "object", + "properties": { + "id": { "type": "integer" }, + "name": { "type": "string" }, + "owner": { + "type": "object", + "required": ["login"], + "properties" : { + "login": { "type": "string" } + }, + "additionalProperties": false + }, + "additionalProperties": false + } +} diff --git a/spec/fixtures/api/schemas/entities/github/user.json b/spec/fixtures/api/schemas/entities/github/user.json new file mode 100644 index 00000000000..3d772a0c648 --- /dev/null +++ b/spec/fixtures/api/schemas/entities/github/user.json @@ -0,0 +1,13 @@ +{ + "type": "object", + "required": ["id", "login", "url", "avatar_url"], + "properties" : { + "id": { "type": "integer" }, + "login": { "type": "string" }, + "url": { "type": "string" }, + "avatar_url": { "type": "string" }, + "html_url": { "type": "string" } + }, + "additionalProperties": false +} + diff --git a/spec/fixtures/api/schemas/entities/group_group_link.json b/spec/fixtures/api/schemas/entities/group_group_link.json new file mode 100644 index 00000000000..4c9aae140d2 --- /dev/null +++ b/spec/fixtures/api/schemas/entities/group_group_link.json @@ -0,0 +1,29 @@ +{ + "type": "object", + "required": ["id", "created_at", "expires_at", "access_level"], + "properties": { + "id": { "type": "integer" }, + "created_at": { "type": "date-time" }, + "expires_at": { "type": ["date-time", "null"] }, + "access_level": { + "type": "object", + "required": ["integer_value", "string_value"], + "properties": { + "integer_value": { "type": "integer" }, + "string_value": { "type": "string" } + } + }, + "shared_with_group": { + "type": "object", + "required": ["id", "name", "full_name", "full_path", "avatar_url", "web_url"], + "properties": { + "id": { "type": "integer" }, + "name": { "type": "string" }, + "full_name": { "type": "string" }, + "full_path": { "type": "string" }, + "avatar_url": { "type": ["string", "null"] }, + "web_url": { "type": "string" } + } + } + } +} diff --git a/spec/fixtures/api/schemas/entities/issue_sidebar.json b/spec/fixtures/api/schemas/entities/issue_sidebar.json index 93adb493d1b..717eb4992ea 100644 --- a/spec/fixtures/api/schemas/entities/issue_sidebar.json +++ b/spec/fixtures/api/schemas/entities/issue_sidebar.json @@ -42,6 +42,9 @@ "project_labels_path": { "type": "string" }, "toggle_subscription_path": { "type": "string" }, "move_issue_path": { "type": "string" }, - "projects_autocomplete_path": { "type": "string" } + "projects_autocomplete_path": { "type": "string" }, + "supports_time_tracking": { "type": "boolean" }, + "supports_milestone": { "type": "boolean" }, + "supports_severity": { "type": "boolean" } } } diff --git a/spec/fixtures/api/schemas/entities/lint_job_entity.json b/spec/fixtures/api/schemas/entities/lint_job_entity.json new file mode 100644 index 00000000000..b85f58d4291 --- /dev/null +++ b/spec/fixtures/api/schemas/entities/lint_job_entity.json @@ -0,0 +1,58 @@ +{ + "type": "object", + "required": [ + "name", + "stage", + "before_script", + "script", + "after_script", + "tag_list", + "environment", + "when", + "allow_failure", + "only", + "except" + ], + "properties": { + "name": { + "type": ["string"] + }, + "stage": { + "type": ["string"] + }, + "before_script": { + "type": ["array"], + "items": { "type": "string" } + }, + "script": { + "type": ["array"], + "items": { "type": "string" } + }, + "after_script": { + "type": ["array"], + "items": { "type": "string" } + }, + "when": { + "items": { "type": ["string"] } + }, + "allow_failure": { + "type": ["boolean"] + }, + "environment": { + "type": ["string", null] + }, + "tag_list": { + "type": ["array"], + "items": { "type": "string" } + }, + "only": { + "type": ["array", "object", null], + "items": { "type": ["string", "array"]} + }, + "except": { + "type": ["array", "object", null], + "items": { "type": ["string", "array"]} + } + }, + "additionalProperties": false +} diff --git a/spec/fixtures/api/schemas/entities/lint_result_entity.json b/spec/fixtures/api/schemas/entities/lint_result_entity.json new file mode 100644 index 00000000000..502e1dac1ac --- /dev/null +++ b/spec/fixtures/api/schemas/entities/lint_result_entity.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": ["valid", "errors", "jobs", "warnings"], + "properties": { + "errors": { + "type": "array", + "items": { "type": "string" } + }, + "warnings": { + "type": "array", + "items": { "type": "string" } + }, + "valid": { + "type": "boolean" + }, + "jobs": { + "type": ["array", null], + "items": { + "type": "object", + "$ref": "lint_job_entity.json" + } + } + }, + "additionalProperties": false +} diff --git a/spec/fixtures/api/schemas/entities/merge_request_basic.json b/spec/fixtures/api/schemas/entities/merge_request_basic.json index ac0a0314455..3c19528d71b 100644 --- a/spec/fixtures/api/schemas/entities/merge_request_basic.json +++ b/spec/fixtures/api/schemas/entities/merge_request_basic.json @@ -15,6 +15,13 @@ "$ref": "../public_api/v4/user/basic.json" } }, + "reviewers": { + "type": ["array"], + "items": { + "type": "object", + "$ref": "../public_api/v4/user/basic.json" + } + }, "milestone": { "type": [ "object", "null" ] }, diff --git a/spec/fixtures/api/schemas/entities/merge_request_poll_cached_widget.json b/spec/fixtures/api/schemas/entities/merge_request_poll_cached_widget.json index b40b71d2cd6..3d6b20896ce 100644 --- a/spec/fixtures/api/schemas/entities/merge_request_poll_cached_widget.json +++ b/spec/fixtures/api/schemas/entities/merge_request_poll_cached_widget.json @@ -7,8 +7,8 @@ "title": { "type": "string" }, "auto_merge_enabled": { "type": "boolean" }, "state": { "type": "string" }, - "merge_commit_sha": { "type": ["string", "null"] }, - "short_merge_commit_sha": { "type": ["string", "null"] }, + "merged_commit_sha": { "type": ["string", "null"] }, + "short_merged_commit_sha": { "type": ["string", "null"] }, "merge_error": { "type": ["string", "null"] }, "merge_status": { "type": "string" }, "merge_user_id": { "type": ["integer", "null"] }, @@ -40,7 +40,7 @@ "diverged_commits_count": { "type": "integer" }, "target_branch_commits_path": { "type": "string" }, "target_branch_tree_path": { "type": "string" }, - "merge_commit_path": { "type": ["string", "null"] }, + "merged_commit_path": { "type": ["string", "null"] }, "source_branch_with_namespace_link": { "type": "string" }, "source_branch_path": { "type": "string" } } diff --git a/spec/fixtures/api/schemas/entities/merge_request_poll_widget.json b/spec/fixtures/api/schemas/entities/merge_request_poll_widget.json index 1eda0e12920..be2fe19b067 100644 --- a/spec/fixtures/api/schemas/entities/merge_request_poll_widget.json +++ b/spec/fixtures/api/schemas/entities/merge_request_poll_widget.json @@ -22,6 +22,14 @@ "only_allow_merge_if_pipeline_succeeds": { "type": "boolean" }, "has_ci": { "type": "boolean" }, "ci_status": { "type": ["string", "null"] }, + "pipeline_coverage_delta": { "type": ["float", "null"] }, + "builds_with_coverage": { + "type": ["array", "null"], + "items": { + "type": "object", + "required": ["name", "coverage"] + } + }, "cancel_auto_merge_path": { "type": ["string", "null"] }, "test_reports_path": { "type": ["string", "null"] }, "create_issue_to_resolve_discussions_path": { "type": ["string", "null"] }, diff --git a/spec/fixtures/api/schemas/entities/merge_request_sidebar.json b/spec/fixtures/api/schemas/entities/merge_request_sidebar.json index 9945de8a856..633203aed28 100644 --- a/spec/fixtures/api/schemas/entities/merge_request_sidebar.json +++ b/spec/fixtures/api/schemas/entities/merge_request_sidebar.json @@ -51,6 +51,8 @@ "project_labels_path": { "type": "string" }, "toggle_subscription_path": { "type": "string" }, "move_issue_path": { "type": "string" }, - "projects_autocomplete_path": { "type": "string" } + "projects_autocomplete_path": { "type": "string" }, + "supports_time_tracking": { "type": "boolean" }, + "supports_milestone": { "type": "boolean" } } } diff --git a/spec/fixtures/api/schemas/entities/merge_request_sidebar_extras.json b/spec/fixtures/api/schemas/entities/merge_request_sidebar_extras.json index 11076ec73de..c54ae551d6a 100644 --- a/spec/fixtures/api/schemas/entities/merge_request_sidebar_extras.json +++ b/spec/fixtures/api/schemas/entities/merge_request_sidebar_extras.json @@ -17,6 +17,10 @@ "assignees": { "type": "array", "items": { "$ref": "../public_api/v4/user/basic.json" } + }, + "reviewers": { + "type": "array", + "items": { "$ref": "../public_api/v4/user/basic.json" } } }, "additionalProperties": false |