diff options
Diffstat (limited to 'spec/fixtures/api/schemas/public_api/v4')
28 files changed, 1455 insertions, 428 deletions
diff --git a/spec/fixtures/api/schemas/public_api/v4/basic_environment.json b/spec/fixtures/api/schemas/public_api/v4/basic_environment.json new file mode 100644 index 00000000000..f22f73f573b --- /dev/null +++ b/spec/fixtures/api/schemas/public_api/v4/basic_environment.json @@ -0,0 +1,34 @@ +{ + "type": "object", + "required": [ + "id", + "name", + "slug", + "external_url", + "created_at", + "updated_at" + ], + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "external_url": { + "$ref": "../../types/nullable_string.json" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/public_api/v4/basic_environments.json b/spec/fixtures/api/schemas/public_api/v4/basic_environments.json new file mode 100644 index 00000000000..6620e423c96 --- /dev/null +++ b/spec/fixtures/api/schemas/public_api/v4/basic_environments.json @@ -0,0 +1,6 @@ +{ + "type": "array", + "items": { + "$ref": "./basic_environment.json" + } +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/public_api/v4/branch.json b/spec/fixtures/api/schemas/public_api/v4/branch.json index 0073a6d89fc..ed65f3c2e5c 100644 --- a/spec/fixtures/api/schemas/public_api/v4/branch.json +++ b/spec/fixtures/api/schemas/public_api/v4/branch.json @@ -1,6 +1,6 @@ { "type": "object", - "required" : [ + "required": [ "name", "commit", "merged", @@ -10,16 +10,35 @@ "developers_can_merge", "web_url" ], - "properties" : { - "name": { "type": "string" }, - "commit": { "$ref": "commit/basic.json" }, - "merged": { "type": "boolean" }, - "protected": { "type": "boolean" }, - "default": { "type": "boolean" }, - "developers_can_push": { "type": "boolean" }, - "developers_can_merge": { "type": "boolean" }, - "can_push": { "type": "boolean" }, - "web_url": { "type": "uri" } + "properties": { + "name": { + "type": "string" + }, + "commit": { + "$ref": "commit/basic.json" + }, + "merged": { + "type": "boolean" + }, + "protected": { + "type": "boolean" + }, + "default": { + "type": "boolean" + }, + "developers_can_push": { + "type": "boolean" + }, + "developers_can_merge": { + "type": "boolean" + }, + "can_push": { + "type": "boolean" + }, + "web_url": { + "type": "string", + "format": "uri" + } }, "additionalProperties": false -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/public_api/v4/deploy_key.json b/spec/fixtures/api/schemas/public_api/v4/deploy_key.json index 99e57a4c218..4f8b5c8422e 100644 --- a/spec/fixtures/api/schemas/public_api/v4/deploy_key.json +++ b/spec/fixtures/api/schemas/public_api/v4/deploy_key.json @@ -7,20 +7,50 @@ "expires_at", "key", "fingerprint_sha256", + "usage_type", "projects_with_write_access" ], "properties": { - "id": { "type": "integer" }, - "title": { "type": "string" }, - "created_at": { "type": "string", "format": "date-time" }, - "expires_at": { "type": ["string", "null"], "format": "date-time" }, - "key": { "type": "string" }, - "fingerprint": { "type": "string" }, - "fingerprint_sha256": { "type": "string" }, + "id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "expires_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "key": { + "type": "string" + }, + "fingerprint": { + "type": "string" + }, + "fingerprint_sha256": { + "type": "string" + }, + "usage_type": { + "type": "string", + "enum": [ + "auth", + "signing", + "auth_and_signing" + ] + }, "projects_with_write_access": { "type": "array", - "items": { "$ref": "project/identity.json" } + "items": { + "$ref": "project/identity.json" + } } }, "additionalProperties": false -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/public_api/v4/deploy_token.json b/spec/fixtures/api/schemas/public_api/v4/deploy_token.json index 102ab95a4ee..664740c2a3c 100644 --- a/spec/fixtures/api/schemas/public_api/v4/deploy_token.json +++ b/spec/fixtures/api/schemas/public_api/v4/deploy_token.json @@ -19,7 +19,9 @@ "username": { "type": "string" }, - "expires_at": { "type": "string" }, + "expires_at": { + "type": "string" + }, "scopes": { "type": "array", "items": { diff --git a/spec/fixtures/api/schemas/public_api/v4/environments.json b/spec/fixtures/api/schemas/public_api/v4/environments.json index f739c06f604..1697da0f231 100644 --- a/spec/fixtures/api/schemas/public_api/v4/environments.json +++ b/spec/fixtures/api/schemas/public_api/v4/environments.json @@ -1,9 +1,6 @@ { "type": "array", "items": { - "type": "object", - "properties": { - "$ref": "./environment.json" - } + "$ref": "./environment.json" } -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/public_api/v4/feature_flag_scopes.json b/spec/fixtures/api/schemas/public_api/v4/feature_flag_scopes.json index b1a7021db8b..1df46780a03 100644 --- a/spec/fixtures/api/schemas/public_api/v4/feature_flag_scopes.json +++ b/spec/fixtures/api/schemas/public_api/v4/feature_flag_scopes.json @@ -1,9 +1,6 @@ { "type": "array", "items": { - "type": "object", - "properties": { - "$ref": "./feature_flag_scope.json" - } + "$ref": "./feature_flag_scope.json" } -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/public_api/v4/feature_flags.json b/spec/fixtures/api/schemas/public_api/v4/feature_flags.json index c19df0443d9..f381adc3c8b 100644 --- a/spec/fixtures/api/schemas/public_api/v4/feature_flags.json +++ b/spec/fixtures/api/schemas/public_api/v4/feature_flags.json @@ -1,9 +1,6 @@ { "type": "array", "items": { - "type": "object", - "properties": { - "$ref": "./feature_flag.json" - } + "$ref": "./feature_flag.json" } -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/public_api/v4/integration.json b/spec/fixtures/api/schemas/public_api/v4/integration.json index b6f13d1cfe7..d1538db7de4 100644 --- a/spec/fixtures/api/schemas/public_api/v4/integration.json +++ b/spec/fixtures/api/schemas/public_api/v4/integration.json @@ -1,24 +1,62 @@ { "type": "object", "properties": { - "id": { "type": "integer" }, - "title": { "type": "string" }, - "slug": { "type": "string" }, - "created_at": { "type": "date-time" }, - "updated_at": { "type": "date-time" }, - "active": { "type": "boolean" }, - "commit_events": { "type": "boolean" }, - "push_events": { "type": "boolean" }, - "issues_events": { "type": "boolean" }, - "confidential_issues_events": { "type": "boolean" }, - "merge_requests_events": { "type": "boolean" }, - "tag_push_events": { "type": "boolean" }, - "note_events": { "type": "boolean" }, - "confidential_note_events": { "type": "boolean" }, - "pipeline_events": { "type": "boolean" }, - "wiki_page_events": { "type": "boolean" }, - "job_events": { "type": "boolean" }, - "comment_on_event_enabled": { "type": "boolean" } + "id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "active": { + "type": "boolean" + }, + "commit_events": { + "type": "boolean" + }, + "push_events": { + "type": "boolean" + }, + "issues_events": { + "type": "boolean" + }, + "confidential_issues_events": { + "type": "boolean" + }, + "merge_requests_events": { + "type": "boolean" + }, + "tag_push_events": { + "type": "boolean" + }, + "note_events": { + "type": "boolean" + }, + "confidential_note_events": { + "type": "boolean" + }, + "pipeline_events": { + "type": "boolean" + }, + "wiki_page_events": { + "type": "boolean" + }, + "job_events": { + "type": "boolean" + }, + "comment_on_event_enabled": { + "type": "boolean" + } }, "additionalProperties": false -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/public_api/v4/issue.json b/spec/fixtures/api/schemas/public_api/v4/issue.json index 90b368b5226..c2b096a922f 100644 --- a/spec/fixtures/api/schemas/public_api/v4/issue.json +++ b/spec/fixtures/api/schemas/public_api/v4/issue.json @@ -1,16 +1,47 @@ { "type": "object", - "properties" : { - "id": { "type": "integer" }, - "iid": { "type": "integer" }, - "project_id": { "type": "integer" }, - "title": { "type": "string" }, - "description": { "type": ["string", "null"] }, - "state": { "type": "string" }, - "discussion_locked": { "type": ["boolean", "null"] }, - "closed_at": { "type": ["string", "null"] }, - "created_at": { "type": "string", "format": "date-time" }, - "updated_at": { "type": "string", "format": "date-time" }, + "properties": { + "id": { + "type": "integer" + }, + "iid": { + "type": "integer" + }, + "project_id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "state": { + "type": "string" + }, + "discussion_locked": { + "type": [ + "boolean", + "null" + ] + }, + "closed_at": { + "type": [ + "string", + "null" + ] + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, "labels": { "type": "array", "items": { @@ -18,58 +49,171 @@ } }, "milestone": { - "type": ["object", "null"], + "type": [ + "object", + "null" + ], "properties": { - "id": { "type": "integer" }, - "iid": { "type": "integer" }, - "project_id": { "type": ["integer", "null"] }, - "group_id": { "type": ["integer", "null"] }, - "title": { "type": "string" }, - "description": { "type": ["string", "null"] }, - "state": { "type": "string" }, - "created_at": { "type": "string", "format": "date-time" }, - "updated_at": { "type": "string", "format": "date-time" }, - "due_date": { "type": "string" , "format": "date-time" }, - "start_date": { "type": "string", "format": "date-time" } + "id": { + "type": "integer" + }, + "iid": { + "type": "integer" + }, + "project_id": { + "type": [ + "integer", + "null" + ] + }, + "group_id": { + "type": [ + "integer", + "null" + ] + }, + "title": { + "type": "string" + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "state": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "due_date": { + "type": [ + "string", + "null" + ], + "anyOf": [ + { + "format": "date-time" + }, + { + "format": "date" + } + ] + }, + "start_date": { + "type": [ + "string", + "null" + ], + "anyOf": [ + { + "format": "date-time" + }, + { + "format": "date" + } + ] + }, + "expired": { + "type": "boolean" + }, + "web_url": { + "type": "string", + "format": "uri" + } }, "additionalProperties": false }, "assignees": { "type": "array", "items": { - "type": ["object", "null"], + "type": [ + "object", + "null" + ], "properties": { - "name": { "type": "string" }, - "username": { "type": "string" }, - "id": { "type": "integer" }, - "state": { "type": "string" }, - "avatar_url": { "type": "uri" }, - "web_url": { "type": "uri" } + "name": { + "type": "string" + }, + "username": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "state": { + "type": "string" + }, + "avatar_url": { + "type": "string", + "format": "uri" + }, + "web_url": { + "type": "string", + "format": "uri" + } }, "additionalProperties": false } }, "assignee": { - "type": ["object", "null"], + "type": [ + "object", + "null" + ], "properties": { - "name": { "type": "string" }, - "username": { "type": "string" }, - "id": { "type": "integer" }, - "state": { "type": "string" }, - "avatar_url": { "type": "uri" }, - "web_url": { "type": "uri" } + "name": { + "type": "string" + }, + "username": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "state": { + "type": "string" + }, + "avatar_url": { + "type": "string", + "format": "uri" + }, + "web_url": { + "type": "string", + "format": "uri" + } }, "additionalProperties": false }, "author": { "type": "object", "properties": { - "name": { "type": "string" }, - "username": { "type": "string" }, - "id": { "type": "integer" }, - "state": { "type": "string" }, - "avatar_url": { "type": "uri" }, - "web_url": { "type": "uri" } + "name": { + "type": "string" + }, + "username": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "state": { + "type": "string" + }, + "avatar_url": { + "type": "string", + "format": "uri" + }, + "web_url": { + "type": "string", + "format": "uri" + } }, "required": [ "id", @@ -80,30 +224,88 @@ "web_url" ] }, - "user_notes_count": { "type": "integer" }, - "upvotes": { "type": "integer" }, - "downvotes": { "type": "integer" }, - "due_date": { "type": ["string", "null"] }, - "confidential": { "type": "boolean" }, - "web_url": { "type": "uri" }, - "severity": { "type": "string", "enum": ["UNKNOWN", "LOW", "MEDIUM", "HIGH", "CRITICAL"] }, + "user_notes_count": { + "type": "integer" + }, + "upvotes": { + "type": "integer" + }, + "downvotes": { + "type": "integer" + }, + "due_date": { + "type": [ + "string", + "null" + ] + }, + "confidential": { + "type": "boolean" + }, + "web_url": { + "type": "string", + "format": "uri" + }, + "severity": { + "type": "string", + "enum": [ + "UNKNOWN", + "LOW", + "MEDIUM", + "HIGH", + "CRITICAL" + ] + }, "time_stats": { - "time_estimate": { "type": "integer" }, - "total_time_spent": { "type": "integer" }, - "human_time_estimate": { "type": ["string", "null"] }, - "human_total_time_spent": { "type": ["string", "null"] } + "time_estimate": { + "type": "integer" + }, + "total_time_spent": { + "type": "integer" + }, + "human_time_estimate": { + "type": [ + "string", + "null" + ] + }, + "human_total_time_spent": { + "type": [ + "string", + "null" + ] + } }, "references": { - "short": {"type": "string"}, - "relative": {"type": "string"}, - "full": {"type": "string"} + "short": { + "type": "string" + }, + "relative": { + "type": "string" + }, + "full": { + "type": "string" + } } }, "required": [ - "id", "iid", "project_id", "title", "description", - "state", "created_at", "updated_at", "labels", - "milestone", "assignees", "author", "user_notes_count", - "upvotes", "downvotes", "due_date", "confidential", + "id", + "iid", + "project_id", + "title", + "description", + "state", + "created_at", + "updated_at", + "labels", + "milestone", + "assignees", + "author", + "user_notes_count", + "upvotes", + "downvotes", + "due_date", + "confidential", "web_url" ] -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/public_api/v4/issues.json b/spec/fixtures/api/schemas/public_api/v4/issues.json index c76806705e8..5ef97b020f9 100644 --- a/spec/fixtures/api/schemas/public_api/v4/issues.json +++ b/spec/fixtures/api/schemas/public_api/v4/issues.json @@ -1,9 +1,6 @@ { "type": "array", "items": { - "type": "object", - "properties" : { - "$ref": "./issue.json" - } + "$ref": "./issue.json" } -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/public_api/v4/labels/label_with_counts.json b/spec/fixtures/api/schemas/public_api/v4/labels/label_with_counts.json index 2331932e07d..4aa3199919b 100644 --- a/spec/fixtures/api/schemas/public_api/v4/labels/label_with_counts.json +++ b/spec/fixtures/api/schemas/public_api/v4/labels/label_with_counts.json @@ -1,16 +1,22 @@ { "type": "object", - "properties": { - "allOf": [ - { "$ref": "label.json" }, - { - "type": "object", - "properties": { - "open_issues_count": { "type": "integer" }, - "closed_issues_count": { "type": "integer" }, - "open_merge_requests_count": { "type": "integer" } + "allOf": [ + { + "$ref": "label.json" + }, + { + "type": "object", + "properties": { + "open_issues_count": { + "type": "integer" + }, + "closed_issues_count": { + "type": "integer" + }, + "open_merge_requests_count": { + "type": "integer" } } - ] - } -} + } + ] +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/public_api/v4/labels/project_label.json b/spec/fixtures/api/schemas/public_api/v4/labels/project_label.json index a9a065ee71f..ec4f64b6772 100644 --- a/spec/fixtures/api/schemas/public_api/v4/labels/project_label.json +++ b/spec/fixtures/api/schemas/public_api/v4/labels/project_label.json @@ -1,15 +1,22 @@ { "type": "object", - "properties": { - "allOf": [ - { "$ref": "label.json" }, - { - "type": "object", - "properties": { - "priority": { "type": ["integer", "null"] }, - "is_project_label": { "type": "boolean" } + "allOf": [ + { + "$ref": "label.json" + }, + { + "type": "object", + "properties": { + "priority": { + "type": [ + "integer", + "null" + ] + }, + "is_project_label": { + "type": "boolean" } } - ] - } -} + } + ] +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/public_api/v4/labels/project_label_with_counts.json b/spec/fixtures/api/schemas/public_api/v4/labels/project_label_with_counts.json index 87b90b2b3b5..cc0dc4024fe 100644 --- a/spec/fixtures/api/schemas/public_api/v4/labels/project_label_with_counts.json +++ b/spec/fixtures/api/schemas/public_api/v4/labels/project_label_with_counts.json @@ -1,9 +1,11 @@ { "type": "object", - "properties": { - "allOf": [ - { "$ref": "project_label.json" }, - { "$ref": "label_with_counts.json" } - ] - } -} + "allOf": [ + { + "$ref": "project_label.json" + }, + { + "$ref": "label_with_counts.json" + } + ] +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/public_api/v4/merge_request.json b/spec/fixtures/api/schemas/public_api/v4/merge_request.json index 1ef2f9f9534..9a6c1757eea 100644 --- a/spec/fixtures/api/schemas/public_api/v4/merge_request.json +++ b/spec/fixtures/api/schemas/public_api/v4/merge_request.json @@ -1,25 +1,75 @@ { "type": "object", - "properties" : { - "id": { "type": "integer" }, - "iid": { "type": "integer" }, - "project_id": { "type": "integer" }, - "title": { "type": "string" }, - "description": { "type": ["string", "null"] }, - "state": { "type": "string" }, - "merged_by": { "$ref": "user/basic.json" }, - "merge_user": { "$ref": "user/basic.json" }, - "merged_at": { "type": ["string", "null"] }, - "closed_by": { "$ref": "user/basic.json" }, - "closed_at": { "type": ["string", "null"], "format": "date-time" }, - "created_at": { "type": "string", "format": "date-time" }, - "updated_at": { "type": "string", "format": "date-time" }, - "target_branch": { "type": "string" }, - "source_branch": { "type": "string" }, - "upvotes": { "type": "integer" }, - "downvotes": { "type": "integer" }, - "author": { "$ref": "user/basic.json" }, - "assignee": { "$ref": "user/basic.json" }, + "properties": { + "id": { + "type": "integer" + }, + "iid": { + "type": "integer" + }, + "project_id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "state": { + "type": "string" + }, + "merged_by": { + "$ref": "user/basic.json" + }, + "merge_user": { + "$ref": "user/basic.json" + }, + "merged_at": { + "type": [ + "string", + "null" + ] + }, + "closed_by": { + "$ref": "user/basic.json" + }, + "closed_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "target_branch": { + "type": "string" + }, + "source_branch": { + "type": "string" + }, + "upvotes": { + "type": "integer" + }, + "downvotes": { + "type": "integer" + }, + "author": { + "$ref": "user/basic.json" + }, + "assignee": { + "$ref": "user/basic.json" + }, "assignees": { "type": "array", "items": { @@ -32,60 +82,159 @@ "$ref": "user/basic.json" } }, - "source_project_id": { "type": "integer" }, - "target_project_id": { "type": "integer" }, + "source_project_id": { + "type": "integer" + }, + "target_project_id": { + "type": "integer" + }, "labels": { "type": "array", "items": { "type": "string" } }, - "work_in_progress": { "type": "boolean" }, + "work_in_progress": { + "type": "boolean" + }, "milestone": { "oneOf": [ - { "type": "null" }, - { "$ref": "milestone.json" } + { + "type": "null" + }, + { + "$ref": "milestone.json" + } ] }, - "merge_when_pipeline_succeeds": { "type": "boolean" }, - "merge_status": { "type": "string" }, - "sha": { "type": "string" }, - "merge_commit_sha": { "type": ["string", "null"] }, - "user_notes_count": { "type": "integer" }, - "changes_count": { "type": "string" }, - "should_remove_source_branch": { "type": ["boolean", "null"] }, - "force_remove_source_branch": { "type": ["boolean", "null"] }, - "discussion_locked": { "type": ["boolean", "null"] }, - "web_url": { "type": "uri" }, - "squash": { "type": "boolean" }, + "merge_when_pipeline_succeeds": { + "type": "boolean" + }, + "merge_status": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "merge_commit_sha": { + "type": [ + "string", + "null" + ] + }, + "user_notes_count": { + "type": "integer" + }, + "changes_count": { + "type": "string" + }, + "should_remove_source_branch": { + "type": [ + "boolean", + "null" + ] + }, + "force_remove_source_branch": { + "type": [ + "boolean", + "null" + ] + }, + "discussion_locked": { + "type": [ + "boolean", + "null" + ] + }, + "web_url": { + "type": "string", + "format": "uri" + }, + "squash": { + "type": "boolean" + }, "time_stats": { - "time_estimate": { "type": "integer" }, - "total_time_spent": { "type": "integer" }, - "human_time_estimate": { "type": ["string", "null"] }, - "human_total_time_spent": { "type": ["string", "null"] } + "time_estimate": { + "type": "integer" + }, + "total_time_spent": { + "type": "integer" + }, + "human_time_estimate": { + "type": [ + "string", + "null" + ] + }, + "human_total_time_spent": { + "type": [ + "string", + "null" + ] + } + }, + "allow_collaboration": { + "type": [ + "boolean", + "null" + ] + }, + "allow_maintainer_to_push": { + "type": [ + "boolean", + "null" + ] }, - "allow_collaboration": { "type": ["boolean", "null"] }, - "allow_maintainer_to_push": { "type": ["boolean", "null"] }, "references": { - "short": {"type": "string"}, - "relative": {"type": "string"}, - "full": {"type": "string"} + "short": { + "type": "string" + }, + "relative": { + "type": "string" + }, + "full": { + "type": "string" + } } }, "required": [ - "id", "iid", "project_id", "title", "description", - "state", "created_at", "updated_at", "target_branch", - "source_branch", "upvotes", "downvotes", "author", - "assignee", "source_project_id", "target_project_id", - "labels", "work_in_progress", "milestone", "merge_when_pipeline_succeeds", - "merge_status", "sha", "merge_commit_sha", "user_notes_count", - "should_remove_source_branch", "force_remove_source_branch", - "web_url", "squash" + "id", + "iid", + "project_id", + "title", + "description", + "state", + "created_at", + "updated_at", + "target_branch", + "source_branch", + "upvotes", + "downvotes", + "author", + "assignee", + "source_project_id", + "target_project_id", + "labels", + "work_in_progress", + "milestone", + "merge_when_pipeline_succeeds", + "merge_status", + "sha", + "merge_commit_sha", + "user_notes_count", + "should_remove_source_branch", + "force_remove_source_branch", + "web_url", + "squash" ], "head_pipeline": { "oneOf": [ - { "type": "null" }, - { "$ref": "pipeline/detail.json" } + { + "type": "null" + }, + { + "$ref": "pipeline/detail.json" + } ] } -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/public_api/v4/merge_request_simple.json b/spec/fixtures/api/schemas/public_api/v4/merge_request_simple.json index f176e5ee261..48de8f13547 100644 --- a/spec/fixtures/api/schemas/public_api/v4/merge_request_simple.json +++ b/spec/fixtures/api/schemas/public_api/v4/merge_request_simple.json @@ -1,26 +1,59 @@ { "type": "object", - "properties" : { - "properties" : { - "id": { "type": "integer" }, - "iid": { "type": "integer" }, - "project_id": { "type": "integer" }, - "title": { "type": "string" }, - "description": { "type": ["string", "null"] }, - "state": { "type": "string" }, - "created_at": { "type": "string", "format": "date-time" }, - "updated_at": { "type": "string", "format": "date-time" }, - "web_url": { "type": "uri" } - }, - "required": [ - "id", "iid", "project_id", "title", "description", - "state", "created_at", "updated_at", "web_url" - ], + "properties": { + "id": { + "type": "integer" + }, + "iid": { + "type": "integer" + }, + "project_id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "state": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "web_url": { + "type": "string", + "format": "uri" + }, "head_pipeline": { "oneOf": [ - { "type": "null" }, - { "$ref": "pipeline/detail.json" } + { + "type": "null" + }, + { + "$ref": "pipeline/detail.json" + } ] } - } -} + }, + "required": [ + "id", + "iid", + "project_id", + "title", + "description", + "state", + "created_at", + "updated_at", + "web_url" + ] +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/public_api/v4/milestone.json b/spec/fixtures/api/schemas/public_api/v4/milestone.json index e7e0e57f02f..c33c4044a62 100644 --- a/spec/fixtures/api/schemas/public_api/v4/milestone.json +++ b/spec/fixtures/api/schemas/public_api/v4/milestone.json @@ -1,24 +1,77 @@ { "type": "object", - "properties" : { - "id": { "type": "integer" }, - "iid": { "type": "integer" }, - "project_id": { "type": ["integer", "null"] }, - "group_id": { "type": ["integer", "null"] }, - "title": { "type": "string" }, - "description": { "type": ["string", "null"] }, - "state": { "type": "string" }, - "created_at": { "type": "string" }, - "updated_at": { "type": "string" }, - "start_date": { "type": ["string", "null"], "format": "date-time" }, - "due_date": { "type": ["string", "null"], "format": "date-time" }, - "expired": { "type": ["boolean", "null"] }, - "web_url": { "type": "string" } + "properties": { + "id": { + "type": "integer" + }, + "iid": { + "type": "integer" + }, + "project_id": { + "type": [ + "integer", + "null" + ] + }, + "group_id": { + "type": [ + "integer", + "null" + ] + }, + "title": { + "type": "string" + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "state": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "start_date": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "due_date": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "expired": { + "type": [ + "boolean", + "null" + ] + }, + "web_url": { + "type": "string" + } }, "required": [ - "id", "iid", "title", "description", "state", - "state", "created_at", "updated_at", "start_date", - "due_date", "expired" + "id", + "iid", + "title", + "description", + "state", + "created_at", + "updated_at", + "start_date", + "due_date", + "expired" ], "additionalProperties": false -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/public_api/v4/milestone_with_stats.json b/spec/fixtures/api/schemas/public_api/v4/milestone_with_stats.json index d09d1634eb9..b5fa161ec2a 100644 --- a/spec/fixtures/api/schemas/public_api/v4/milestone_with_stats.json +++ b/spec/fixtures/api/schemas/public_api/v4/milestone_with_stats.json @@ -1,32 +1,95 @@ { "type": "object", - "properties" : { - "id": { "type": "integer" }, - "iid": { "type": "integer" }, - "project_id": { "type": ["integer", "null"] }, - "group_id": { "type": ["integer", "null"] }, - "title": { "type": "string" }, - "description": { "type": ["string", "null"] }, - "state": { "type": "string" }, - "created_at": { "type": "string", "format": "date-time" }, - "updated_at": { "type": "string", "format": "date-time" }, - "start_date": { "type": ["string", "null"], "format": "date-time" }, - "due_date": { "type": ["string", "null"], "format": "date-time" }, - "expired": { "type": ["boolean", "null"] }, - "web_url": { "type": "string" }, + "properties": { + "id": { + "type": "integer" + }, + "iid": { + "type": "integer" + }, + "project_id": { + "type": [ + "integer", + "null" + ] + }, + "group_id": { + "type": [ + "integer", + "null" + ] + }, + "title": { + "type": "string" + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "state": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "start_date": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "due_date": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "expired": { + "type": [ + "boolean", + "null" + ] + }, + "web_url": { + "type": "string" + }, "issue_stats": { - "required": ["total", "closed"], + "required": [ + "total", + "closed" + ], "properties": { - "total": { "type": "integer" }, - "closed": { "type": "integer" } + "total": { + "type": "integer" + }, + "closed": { + "type": "integer" + } }, "additionalProperties": false } }, "required": [ - "id", "iid", "title", "description", "state", - "state", "created_at", "updated_at", "start_date", - "due_date", "expired", "issue_stats" + "id", + "iid", + "title", + "description", + "state", + "created_at", + "updated_at", + "start_date", + "due_date", + "expired", + "issue_stats" ], "additionalProperties": false -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/public_api/v4/notes.json b/spec/fixtures/api/schemas/public_api/v4/notes.json index d6d0300a64f..1987a0f2f71 100644 --- a/spec/fixtures/api/schemas/public_api/v4/notes.json +++ b/spec/fixtures/api/schemas/public_api/v4/notes.json @@ -2,43 +2,124 @@ "type": "array", "items": { "type": "object", - "properties" : { - "id": { "type": "integer" }, - "type": { "type": ["string", "null"] }, - "body": { "type": "string" }, - "attachment": { "type": ["string", "null"] }, + "properties": { + "id": { + "type": "integer" + }, + "type": { + "type": [ + "string", + "null" + ] + }, + "body": { + "type": "string" + }, + "attachment": { + "type": [ + "string", + "null" + ] + }, "author": { "type": "object", "properties": { - "name": { "type": "string" }, - "username": { "type": "string" }, - "id": { "type": "integer" }, - "state": { "type": "string" }, - "avatar_url": { "type": "uri" }, - "web_url": { "type": "uri" } + "name": { + "type": "string" + }, + "username": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "state": { + "type": "string" + }, + "avatar_url": { + "type": "string", + "format": "uri" + }, + "web_url": { + "type": "string", + "format": "uri" + } }, - "required" : [ - "id", "name", "username", "state", "avatar_url", "web_url" + "required": [ + "id", + "name", + "username", + "state", + "avatar_url", + "web_url" ] }, - "commands_changes": { "type": "object", "additionalProperties": true }, - "created_at": { "type": "string", "format": "date-time" }, - "updated_at": { "type": "string", "format": "date-time" }, - "system": { "type": "boolean" }, - "noteable_id": { "type": "integer" }, - "noteable_iid": { "type": "integer" }, - "noteable_type": { "type": "string" }, - "resolved": { "type": "boolean" }, - "resolvable": { "type": "boolean" }, - "resolved_by": { "type": ["string", "null"] }, - "resolved_at": { "type": ["string", "null"] }, - "confidential": { "type": ["boolean", "null"] }, - "internal": { "type": ["boolean", "null"] } + "commands_changes": { + "type": "object", + "additionalProperties": true + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "system": { + "type": "boolean" + }, + "noteable_id": { + "type": "integer" + }, + "noteable_iid": { + "type": "integer" + }, + "noteable_type": { + "type": "string" + }, + "resolved": { + "type": "boolean" + }, + "resolvable": { + "type": "boolean" + }, + "resolved_by": { + "type": [ + "string", + "null" + ] + }, + "resolved_at": { + "type": [ + "string", + "null" + ] + }, + "confidential": { + "type": [ + "boolean", + "null" + ] + }, + "internal": { + "type": [ + "boolean", + "null" + ] + } }, "required": [ - "id", "body", "attachment", "author", "created_at", "updated_at", - "system", "noteable_id", "noteable_type" + "id", + "body", + "attachment", + "author", + "created_at", + "updated_at", + "system", + "noteable_id", + "noteable_type" ], "additionalProperties": false } -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/public_api/v4/packages/package.json b/spec/fixtures/api/schemas/public_api/v4/packages/package.json index 5d0d5f63aa9..c1b4fc09079 100644 --- a/spec/fixtures/api/schemas/public_api/v4/packages/package.json +++ b/spec/fixtures/api/schemas/public_api/v4/packages/package.json @@ -28,12 +28,9 @@ }, "_links": { "type": "object", - "required": [ - "web_path" - ], "properties": { - "details": { - "type": "string" + "web_path": { + "type": ["string", "null"] } } }, diff --git a/spec/fixtures/api/schemas/public_api/v4/pages_domain/basic.json b/spec/fixtures/api/schemas/public_api/v4/pages_domain/basic.json index 66d4be529b1..9bcd191741f 100644 --- a/spec/fixtures/api/schemas/public_api/v4/pages_domain/basic.json +++ b/spec/fixtures/api/schemas/public_api/v4/pages_domain/basic.json @@ -1,23 +1,60 @@ { "type": "object", "properties": { - "domain": { "type": "string" }, - "url": { "type": "uri" }, - "project_id": { "type": "integer" }, - "verified": { "type": "boolean" }, - "verification_code": { "type": ["string", "null"] }, - "enabled_until": { "type": ["string", "null"], "format": "date-time" }, - "auto_ssl_enabled": { "type": "boolean" }, + "domain": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "project_id": { + "type": "integer" + }, + "verified": { + "type": "boolean" + }, + "verification_code": { + "type": [ + "string", + "null" + ] + }, + "enabled_until": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "auto_ssl_enabled": { + "type": "boolean" + }, "certificate_expiration": { "type": "object", "properties": { - "expired": { "type": "boolean" }, - "expiration": { "type": "string" } + "expired": { + "type": "boolean" + }, + "expiration": { + "type": "string" + } }, - "required": ["expired", "expiration"], + "required": [ + "expired", + "expiration" + ], "additionalProperties": false } }, - "required": ["domain", "url", "project_id", "verified", "verification_code", "enabled_until", "auto_ssl_enabled"], + "required": [ + "domain", + "url", + "project_id", + "verified", + "verification_code", + "enabled_until", + "auto_ssl_enabled" + ], "additionalProperties": false -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/public_api/v4/pages_domain/detail.json b/spec/fixtures/api/schemas/public_api/v4/pages_domain/detail.json index bbbc610eb27..6ce431a274a 100644 --- a/spec/fixtures/api/schemas/public_api/v4/pages_domain/detail.json +++ b/spec/fixtures/api/schemas/public_api/v4/pages_domain/detail.json @@ -1,24 +1,61 @@ { "type": "object", "properties": { - "domain": { "type": "string" }, - "url": { "type": "uri" }, - "verified": { "type": "boolean" }, - "verification_code": { "type": ["string", "null"] }, - "enabled_until": { "type": ["string", "null"] }, - "auto_ssl_enabled": { "type": "boolean" }, + "domain": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "verified": { + "type": "boolean" + }, + "verification_code": { + "type": [ + "string", + "null" + ] + }, + "enabled_until": { + "type": [ + "string", + "null" + ] + }, + "auto_ssl_enabled": { + "type": "boolean" + }, "certificate": { "type": "object", "properties": { - "subject": { "type": "string" }, - "expired": { "type": "boolean" }, - "certificate": { "type": "string" }, - "certificate_text": { "type": "string" } + "subject": { + "type": "string" + }, + "expired": { + "type": "boolean" + }, + "certificate": { + "type": "string" + }, + "certificate_text": { + "type": "string" + } }, - "required": ["subject", "expired"], + "required": [ + "subject", + "expired" + ], "additionalProperties": false } }, - "required": ["domain", "url", "verified", "verification_code", "enabled_until", "auto_ssl_enabled"], + "required": [ + "domain", + "url", + "verified", + "verification_code", + "enabled_until", + "auto_ssl_enabled" + ], "additionalProperties": false -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/public_api/v4/project_hooks.json b/spec/fixtures/api/schemas/public_api/v4/project_hooks.json index 8c542ebe3ad..8557e5cae40 100644 --- a/spec/fixtures/api/schemas/public_api/v4/project_hooks.json +++ b/spec/fixtures/api/schemas/public_api/v4/project_hooks.json @@ -1,10 +1,6 @@ { "type": "array", "items": { - "type": "object", - "properties" : { - "$ref": "./project_hook.json" - } + "$ref": "./project_hook.json" } -} - +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/public_api/v4/snippets.json b/spec/fixtures/api/schemas/public_api/v4/snippets.json index 65299901128..dab6b69f1c1 100644 --- a/spec/fixtures/api/schemas/public_api/v4/snippets.json +++ b/spec/fixtures/api/schemas/public_api/v4/snippets.json @@ -2,46 +2,107 @@ "type": "array", "items": { "type": "object", - "properties" : { - "id": { "type": "integer" }, - "project_id": { "type": ["integer", "null"] }, - "title": { "type": "string" }, - "file_name": { "type": ["string", "null"] }, - "files" : { + "properties": { + "id": { + "type": "integer" + }, + "project_id": { + "type": [ + "integer", + "null" + ] + }, + "title": { + "type": "string" + }, + "file_name": { + "type": [ + "string", + "null" + ] + }, + "files": { "type": "array", "items": { "type": "object", "properties": { - "path": { "type": "string" }, - "raw_url": { "type": "string" } + "path": { + "type": "string" + }, + "raw_url": { + "type": "string" + } } } }, - "description": { "type": ["string", "null"] }, - "visibility": { "type": "string" }, - "web_url": { "type": "string" }, - "raw_url": { "type": "string" }, - "created_at": { "type": "string", "format": "date-time" }, - "updated_at": { "type": "string", "format": "date-time" }, + "description": { + "type": [ + "string", + "null" + ] + }, + "visibility": { + "type": "string" + }, + "web_url": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, "author": { "type": "object", "properties": { - "name": { "type": "string" }, - "username": { "type": "string" }, - "id": { "type": "integer" }, - "state": { "type": "string" }, - "avatar_url": { "type": "uri" }, - "web_url": { "type": "uri" } + "name": { + "type": "string" + }, + "username": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "state": { + "type": "string" + }, + "avatar_url": { + "type": "string", + "format": "uri" + }, + "web_url": { + "type": "string", + "format": "uri" + } }, - "required" : [ - "id", "name", "username", "state", "avatar_url", "web_url" + "required": [ + "id", + "name", + "username", + "state", + "avatar_url", + "web_url" ] } }, "required": [ - "id", "title", "file_name", "description", "web_url", - "created_at", "updated_at", "author", "raw_url" + "id", + "title", + "file_name", + "description", + "web_url", + "created_at", + "updated_at", + "author", + "raw_url" ], "additionalProperties": false } -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/public_api/v4/system_hooks.json b/spec/fixtures/api/schemas/public_api/v4/system_hooks.json index a56542a8b99..a0800e4bc97 100644 --- a/spec/fixtures/api/schemas/public_api/v4/system_hooks.json +++ b/spec/fixtures/api/schemas/public_api/v4/system_hooks.json @@ -1,9 +1,6 @@ { "type": "array", "items": { - "type": "object", - "properties" : { - "$ref": "./system_hook.json" - } + "$ref": "./system_hook.json" } -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/public_api/v4/user/admin.json b/spec/fixtures/api/schemas/public_api/v4/user/admin.json index f0d3cf3ba0e..7b46cbf5a36 100644 --- a/spec/fixtures/api/schemas/public_api/v4/user/admin.json +++ b/spec/fixtures/api/schemas/public_api/v4/user/admin.json @@ -32,6 +32,148 @@ "namespace_id" ], "properties": { - "$ref": "full.json" + "id": { + "type": "integer" + }, + "username": { + "type": "string" + }, + "email": { + "type": "string", + "pattern": "^[^@]+@[^@]+$" + }, + "commit_email": { + "type": "string", + "pattern": "^[^@]+@[^@]+$" + }, + "name": { + "type": "string" + }, + "state": { + "type": "string", + "enum": [ + "active", + "blocked" + ] + }, + "avatar_url": { + "type": [ + "string", + "null" + ], + "format": "uri" + }, + "web_url": { + "type": "string", + "format": "uri" + }, + "is_admin": { + "type": "boolean" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "bio": { + "type": [ + "string", + "null" + ] + }, + "location": { + "type": [ + "string", + "null" + ] + }, + "pronouns": { + "type": [ + "string", + "null" + ] + }, + "skype": { + "type": "string" + }, + "linkedin": { + "type": "string" + }, + "twitter": { + "type": "string" + }, + "website_url": { + "type": "string" + }, + "organization": { + "type": [ + "string", + "null" + ] + }, + "last_sign_in_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "confirmed_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "color_scheme_id": { + "type": "integer" + }, + "projects_limit": { + "type": "integer" + }, + "current_sign_in_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "identities": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "github", + "bitbucket", + "google_oauth2", + "twitter" + ] + }, + "extern_uid": { + "type": [ + "number", + "string" + ] + } + } + } + }, + "can_create_group": { + "type": "boolean" + }, + "can_create_project": { + "type": "boolean" + }, + "two_factor_enabled": { + "type": "boolean" + }, + "external": { + "type": "boolean" + }, + "namespace_id": { + "type": "integer" + } } -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/public_api/v4/user/login.json b/spec/fixtures/api/schemas/public_api/v4/user/login.json deleted file mode 100644 index aa066883c47..00000000000 --- a/spec/fixtures/api/schemas/public_api/v4/user/login.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "type": "object", - "required": [ - "id", - "username", - "email", - "name", - "state", - "avatar_url", - "web_url", - "created_at", - "is_admin", - "bio", - "location", - "skype", - "linkedin", - "twitter", - "website_url", - "organization", - "last_sign_in_at", - "confirmed_at", - "theme_id", - "color_scheme_id", - "projects_limit", - "current_sign_in_at", - "identities", - "can_create_group", - "can_create_project", - "two_factor_enabled", - "external" - ], - "properties": { - "$ref": "full.json" - } -} diff --git a/spec/fixtures/api/schemas/public_api/v4/user/public.json b/spec/fixtures/api/schemas/public_api/v4/user/public.json index c4549e3ef63..53d67e041a1 100644 --- a/spec/fixtures/api/schemas/public_api/v4/user/public.json +++ b/spec/fixtures/api/schemas/public_api/v4/user/public.json @@ -28,32 +28,95 @@ "external" ], "properties": { - "id": { "type": "integer" }, - "username": { "type": "string" }, + "id": { + "type": "integer" + }, + "username": { + "type": "string" + }, "email": { "type": "string", "pattern": "^[^@]+@[^@]+$" }, - "name": { "type": "string" }, + "name": { + "type": "string" + }, "state": { "type": "string", - "enum": ["active", "blocked"] - }, - "avatar_url": { "type": [ "string", "null" ] }, - "web_url": { "type": "string" }, - "created_at": { "type": "string", "format": "date-time" }, - "bio": { "type": ["string", "null"] }, - "location": { "type": ["string", "null"] }, - "skype": { "type": "string" }, - "linkedin": { "type": "string" }, - "twitter": { "type": "string "}, - "website_url": { "type": "string" }, - "organization": { "type": ["string", "null"] }, - "last_sign_in_at": { "type": ["string", "null"], "format": "date-time" }, - "confirmed_at": { "type": ["string", "null"] }, - "color_scheme_id": { "type": "integer" }, - "projects_limit": { "type": "integer" }, - "current_sign_in_at": { "type": ["string", "null"], "format": "date-time" }, + "enum": [ + "active", + "blocked" + ] + }, + "avatar_url": { + "type": [ + "string", + "null" + ] + }, + "web_url": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "bio": { + "type": [ + "string", + "null" + ] + }, + "location": { + "type": [ + "string", + "null" + ] + }, + "skype": { + "type": "string" + }, + "linkedin": { + "type": "string" + }, + "twitter": { + "type": "string" + }, + "website_url": { + "type": "string" + }, + "organization": { + "type": [ + "string", + "null" + ] + }, + "last_sign_in_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "confirmed_at": { + "type": [ + "string", + "null" + ] + }, + "color_scheme_id": { + "type": "integer" + }, + "projects_limit": { + "type": "integer" + }, + "current_sign_in_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, "identities": { "type": "array", "items": { @@ -61,16 +124,35 @@ "properties": { "provider": { "type": "string", - "enum": ["github", "bitbucket", "google_oauth2"] + "enum": [ + "github", + "bitbucket", + "google_oauth2" + ] }, - "extern_uid": { "type": ["number", "string"] } + "extern_uid": { + "type": [ + "number", + "string" + ] + } } } }, - "can_create_group": { "type": "boolean" }, - "can_create_project": { "type": "boolean" }, - "two_factor_enabled": { "type": "boolean" }, - "external": { "type": "boolean" }, - "commit_email": { "type": "string" } + "can_create_group": { + "type": "boolean" + }, + "can_create_project": { + "type": "boolean" + }, + "two_factor_enabled": { + "type": "boolean" + }, + "external": { + "type": "boolean" + }, + "commit_email": { + "type": "string" + } } -} +}
\ No newline at end of file |