diff options
Diffstat (limited to 'spec/fixtures/api')
58 files changed, 3191 insertions, 944 deletions
diff --git a/spec/fixtures/api/schemas/branch.json b/spec/fixtures/api/schemas/branch.json index 0bb74577010..02389a1b979 100644 --- a/spec/fixtures/api/schemas/branch.json +++ b/spec/fixtures/api/schemas/branch.json @@ -1,12 +1,17 @@ { "type": "object", - "required" : [ + "required": [ "name", "url" ], - "properties" : { - "name": { "type": "string" }, - "url": { "type": "uri" } + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } }, "additionalProperties": false -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/cluster_status.json b/spec/fixtures/api/schemas/cluster_status.json index 6f9535286ed..efc609b3c3f 100644 --- a/spec/fixtures/api/schemas/cluster_status.json +++ b/spec/fixtures/api/schemas/cluster_status.json @@ -1,55 +1,118 @@ { "type": "object", - "required" : [ + "required": [ "status", "applications" ], - "properties" : { - "status": { "type": "string" }, - "status_reason": { "type": ["string", "null"] }, + "properties": { + "status": { + "type": "string" + }, + "status_reason": { + "$ref": "types/nullable_string.json" + }, "applications": { "type": "array", - "items": { "$ref": "#/definitions/application_status" } + "items": { + "$ref": "#/definitions/application_status" + } } }, "additionalProperties": false, "definitions": { "application_status": { "type": "object", + "required": [ + "name", + "status" + ], "additionalProperties": false, - "properties" : { - "name": { "type": "string" }, + "properties": { + "name": { + "type": "string" + }, "status": { - "type": { - "enum": [ - "installable", - "scheduled", - "installing", - "installed", - "errored" - ] - } + "type": "string", + "enum": [ + "installable", + "scheduled", + "installing", + "installed", + "errored", + "not_installable" + ] + }, + "version": { + "type": "string" + }, + "status_reason": { + "$ref": "types/nullable_string.json" + }, + "external_ip": { + "$ref": "types/nullable_string.json" + }, + "external_hostname": { + "$ref": "types/nullable_string.json" + }, + "hostname": { + "$ref": "types/nullable_string.json" + }, + "email": { + "$ref": "types/nullable_string.json" + }, + "stack": { + "$ref": "types/nullable_string.json" + }, + "host": { + "$ref": "types/nullable_string.json" + }, + "port": { + "type": "integer" + }, + "protocol": { + "type": "integer" + }, + "update_available": { + "type": [ + "boolean", + "null" + ] + }, + "can_uninstall": { + "type": "boolean" }, - "version": { "type": "string" }, - "status_reason": { "type": ["string", "null"] }, - "external_ip": { "type": ["string", "null"] }, - "external_hostname": { "type": ["string", "null"] }, - "hostname": { "type": ["string", "null"] }, - "email": { "type": ["string", "null"] }, - "stack": { "type": ["string", "null"] }, - "host": {"type": ["string", "null"]}, - "port": {"type": ["integer", "514"]}, - "protocol": {"type": ["integer", "0"]}, - "update_available": { "type": ["boolean", "null"] }, - "can_uninstall": { "type": "boolean" }, "available_domains": { "type": "array", - "items": { "$ref": "#/definitions/domain" } + "items": { + "$ref": "#/definitions/domain" + } }, - "pages_domain": { "type": [ { "$ref": "#/definitions/domain" }, "null"] } - }, - "required" : [ "name", "status" ] + "pages_domain": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/domain" + } + ] + } + } }, - "domain": { "id": "integer", "domain": "string" } + "domain": { + "type": "object", + "required": [ + "id", + "domain" + ], + "properties": { + "id": { + "type": "integer" + }, + "domain": { + "type": "string" + } + } + } } -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/conflicts.json b/spec/fixtures/api/schemas/conflicts.json index a947783d505..f8acac9f074 100644 --- a/spec/fixtures/api/schemas/conflicts.json +++ b/spec/fixtures/api/schemas/conflicts.json @@ -8,16 +8,29 @@ "files" ], "properties": { - "commit_message": {"type": "string"}, - "commit_sha": {"type": "string", "pattern": "^[0-9a-f]{40}$"}, - "source_branch": {"type": "string"}, - "target_branch": {"type": "string"}, + "commit_message": { + "type": "string" + }, + "commit_sha": { + "type": "string", + "pattern": "^[0-9a-f]{40}$" + }, + "source_branch": { + "type": "string" + }, + "target_branch": { + "type": "string" + }, "files": { "type": "array", "items": { "oneOf": [ - { "$ref": "#/definitions/conflict-text-with-sections" }, - { "$ref": "#/definitions/conflict-text-for-editor" } + { + "$ref": "#/definitions/conflict-text-with-sections" + }, + { + "$ref": "#/definitions/conflict-text-for-editor" + } ] } } @@ -32,15 +45,25 @@ "blob_path" ], "properties": { - "old_path": {"type": "string"}, - "new_path": {"type": "string"}, - "blob_icon": {"type": "string"}, - "blob_path": {"type": "string"} + "old_path": { + "type": "string" + }, + "new_path": { + "type": "string" + }, + "blob_icon": { + "type": "string" + }, + "blob_path": { + "type": "string" + } } }, "conflict-text-for-editor": { "allOf": [ - {"$ref": "#/definitions/conflict-base"}, + { + "$ref": "#/definitions/conflict-base" + }, { "type": "object", "required": [ @@ -48,15 +71,25 @@ "content_path" ], "properties": { - "type": {"type": {"enum": ["text-editor"]}}, - "content_path": {"type": "string"} + "type": { + "type": "string", + "enum": [ + "text", + "text-editor" + ] + }, + "content_path": { + "type": "string" + } } } ] }, "conflict-text-with-sections": { "allOf": [ - {"$ref": "#/definitions/conflict-base"}, + { + "$ref": "#/definitions/conflict-base" + }, { "type": "object", "required": [ @@ -65,14 +98,25 @@ "sections" ], "properties": { - "type": {"type": {"enum": ["text"]}}, - "content_path": {"type": "string"}, + "type": { + "type": "string", + "enum": [ + "text" + ] + }, + "content_path": { + "type": "string" + }, "sections": { "type": "array", "items": { "oneOf": [ - { "$ref": "#/definitions/section-context" }, - { "$ref": "#/definitions/section-conflict" } + { + "$ref": "#/definitions/section-context" + }, + { + "$ref": "#/definitions/section-conflict" + } ] } } @@ -87,7 +131,9 @@ "lines" ], "properties": { - "conflict": {"type": "boolean"}, + "conflict": { + "type": "boolean" + }, "lines": { "type": "array", "items": { @@ -99,11 +145,21 @@ "rich_text" ], "properties": { - "type": {"type": "string"}, - "old_line": {"type": "string"}, - "new_line": {"type": "string"}, - "text": {"type": "string"}, - "rich_text": {"type": "string"} + "type": { + "type": "string" + }, + "old_line": { + "type": "string" + }, + "new_line": { + "type": "string" + }, + "text": { + "type": "string" + }, + "rich_text": { + "type": "string" + } } } } @@ -111,27 +167,39 @@ }, "section-context": { "allOf": [ - {"$ref": "#/definitions/section-base"}, + { + "$ref": "#/definitions/section-base" + }, { "type": "object", "properties": { - "conflict": {"enum": [false]} + "conflict": { + "type": "boolean" + } } } ] }, "section-conflict": { "allOf": [ - {"$ref": "#/definitions/section-base"}, + { + "$ref": "#/definitions/section-base" + }, { "type": "object", - "required": ["id"], + "required": [ + "id" + ], "properties": { - "conflict": {"enum": [true]}, - "id": {"type": "string"} + "conflict": { + "type": "boolean" + }, + "id": { + "type": "string" + } } } ] } } -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/entities/discussion.json b/spec/fixtures/api/schemas/entities/discussion.json index da2d2a83a8d..45271926547 100644 --- a/spec/fixtures/api/schemas/entities/discussion.json +++ b/spec/fixtures/api/schemas/entities/discussion.json @@ -1,34 +1,75 @@ { "type": "object", - "required" : [ + "required": [ "id", "notes", "individual_note" ], - "properties" : { - "id": { "type": "string" }, - "individual_note": { "type": "boolean" }, + "properties": { + "id": { + "type": "string" + }, + "individual_note": { + "type": "boolean" + }, "notes": { "type": "array", "items": { "type": "object", - "properties" : { - "id": { "type": "string" }, - "type": { "type": ["string", "null"] }, - "body": { "type": "string" }, - "attachment": { "type": ["string", "null"]}, - "award_emoji": { "type": "array" }, + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": [ + "string", + "null" + ] + }, + "body": { + "type": "string" + }, + "attachment": { + "type": [ + "string", + "null" + ] + }, + "award_emoji": { + "type": "array" + }, "author": { "type": "object", "properties": { - "name": { "type": "string" }, - "username": { "type": "string" }, - "id": { "type": "integer" }, - "state": { "type": "string" }, - "avatar_url": { "type": "uri" }, - "web_url": { "type": "uri" }, - "status_tooltip_html": { "type": ["string", "null"] }, - "path": { "type": "string" } + "name": { + "type": "string" + }, + "username": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "state": { + "type": "string" + }, + "avatar_url": { + "type": "string", + "format": "uri" + }, + "web_url": { + "type": "string", + "format": "uri" + }, + "status_tooltip_html": { + "type": [ + "string", + "null" + ] + }, + "path": { + "type": "string" + } }, "required": [ "id", @@ -39,43 +80,131 @@ "username" ] }, - "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", "null"] }, - "noteable_type": { "type": "string" }, - "resolved": { "type": "boolean" }, - "resolvable": { "type": "boolean" }, - "resolved_by": { "type": ["string", "null"] }, - "resolved_at": { "type": ["string", "null"], "format": "date-time" }, - "note": { "type": "string" }, - "note_html": { "type": "string" }, - "current_user": { "type": "object" }, - "suggestions": { "type": "array" }, - "discussion_id": { "type": "string" }, - "emoji_awardable": { "type": "boolean" }, - "report_abuse_path": { "type": "string" }, - "noteable_note_url": { "type": "string" }, - "resolve_path": { "type": "string" }, - "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 }, - "confidential": { "type": ["boolean", "null"] }, - "internal": { "type": ["boolean", "null"] } + "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", + "null" + ] + }, + "noteable_type": { + "type": "string" + }, + "resolved": { + "type": "boolean" + }, + "resolvable": { + "type": "boolean" + }, + "resolved_by": { + "type": [ + "string", + "null" + ] + }, + "resolved_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "note": { + "type": "string" + }, + "note_html": { + "type": "string" + }, + "current_user": { + "type": "object" + }, + "suggestions": { + "type": "array" + }, + "discussion_id": { + "type": "string" + }, + "emoji_awardable": { + "type": "boolean" + }, + "report_abuse_path": { + "type": "string" + }, + "noteable_note_url": { + "type": "string" + }, + "resolve_path": { + "type": "string" + }, + "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 + }, + "confidential": { + "type": [ + "boolean", + "null" + ] + }, + "internal": { + "type": [ + "boolean", + "null" + ] + } }, "required": [ - "id", "attachment", "author", "created_at", "updated_at", - "system", "noteable_id", "noteable_type" + "id", + "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/entities/issue.json b/spec/fixtures/api/schemas/entities/issue.json index b4a076780d9..08937b5e68b 100644 --- a/spec/fixtures/api/schemas/entities/issue.json +++ b/spec/fixtures/api/schemas/entities/issue.json @@ -1,43 +1,142 @@ { "type": "object", - "properties" : { - "id": { "type": "integer" }, - "iid": { "type": "integer" }, - "type": { "type": "string" }, - "author_id": { "type": "integer" }, - "description": { "type": ["string", "null"] }, - "lock_version": { "type": ["integer", "null"] }, - "milestone_id": { "type": ["string", "null"] }, - "title": { "type": "string" }, - "moved_to_id": { "type": ["integer", "null"] }, - "project_id": { "type": "integer" }, - "web_url": { "type": "string" }, - "state": { "type": "string" }, - "create_note_path": { "type": "string" }, - "preview_note_path": { "type": "string" }, + "properties": { + "id": { + "type": "integer" + }, + "iid": { + "type": "integer" + }, + "type": { + "type": "string" + }, + "author_id": { + "type": "integer" + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "lock_version": { + "type": [ + "integer", + "null" + ] + }, + "milestone_id": { + "type": [ + "string", + "null" + ] + }, + "title": { + "type": "string" + }, + "moved_to_id": { + "type": [ + "integer", + "null" + ] + }, + "project_id": { + "type": "integer" + }, + "web_url": { + "type": "string" + }, + "state": { + "type": "string" + }, + "create_note_path": { + "type": "string" + }, + "preview_note_path": { + "type": "string" + }, "current_user": { "type": "object", "properties": { - "can_create_note": { "type": "boolean" }, - "can_update": { "type": "boolean" } + "can_create_note": { + "type": "boolean" + }, + "can_update": { + "type": "boolean" + } } }, - "created_at": { "type": "date-time" }, - "updated_at": { "type": "date-time" }, - "branch_name": { "type": ["string", "null"] }, - "due_date": { "type": ["string", "null"], "format": "date-time" }, - "confidential": { "type": "boolean" }, - "discussion_locked": { "type": ["boolean", "null"] }, - "updated_by_id": { "type": ["integer", "null"] }, - "time_estimate": { "type": "integer" }, - "total_time_spent": { "type": "integer" }, - "human_time_estimate": { "type": ["integer", "null"] }, - "human_total_time_spent": { "type": ["integer", "null"] }, - "milestone": { "type": ["object", "null"] }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "branch_name": { + "type": [ + "string", + "null" + ] + }, + "due_date": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "confidential": { + "type": "boolean" + }, + "discussion_locked": { + "type": [ + "boolean", + "null" + ] + }, + "updated_by_id": { + "type": [ + "integer", + "null" + ] + }, + "time_estimate": { + "type": "integer" + }, + "total_time_spent": { + "type": "integer" + }, + "human_time_estimate": { + "type": [ + "integer", + "null" + ] + }, + "human_total_time_spent": { + "type": [ + "integer", + "null" + ] + }, + "milestone": { + "type": [ + "object", + "null" + ] + }, "labels": { "type": "array", - "items": { "$ref": "label.json" } + "items": { + "$ref": "label.json" + } }, - "assignees": { "type": ["array", "null"] } + "assignees": { + "type": [ + "array", + "null" + ] + } } -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/entities/member.json b/spec/fixtures/api/schemas/entities/member.json index 24a4863df9b..cd8a4e0519b 100644 --- a/spec/fixtures/api/schemas/entities/member.json +++ b/spec/fixtures/api/schemas/entities/member.json @@ -14,59 +14,130 @@ "is_direct_member" ], "properties": { - "id": { "type": "integer" }, - "created_at": { "type": "date-time" }, - "expires_at": { "type": ["date-time", "null"] }, - "requested_at": { "type": ["date-time", "null"] }, - "can_update": { "type": "boolean" }, - "can_remove": { "type": "boolean" }, - "is_direct_member": { "type": "boolean" }, + "id": { + "type": "integer" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "expires_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "requested_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "can_update": { + "type": "boolean" + }, + "can_remove": { + "type": "boolean" + }, + "is_direct_member": { + "type": "boolean" + }, "access_level": { "type": "object", - "required": ["integer_value", "string_value"], + "required": [ + "integer_value", + "string_value" + ], "properties": { - "integer_value": { "type": "integer" }, - "string_value": { "type": "string" } + "integer_value": { + "type": "integer" + }, + "string_value": { + "type": "string" + } }, "additionalProperties": false }, "source": { "type": "object", - "required": ["id", "full_name", "web_url"], + "required": [ + "id", + "full_name", + "web_url" + ], "properties": { - "id": { "type": "integer" }, - "full_name": { "type": "string" }, - "web_url": { "type": "string" } + "id": { + "type": "integer" + }, + "full_name": { + "type": "string" + }, + "web_url": { + "type": "string" + } }, "additionalProperties": false }, - "valid_roles": { "type": "object" }, - "type": { "type": "string" }, + "valid_roles": { + "type": "object" + }, + "type": { + "type": "string" + }, "created_by": { "type": "object", - "required": ["name", "web_url"], + "required": [ + "name", + "web_url" + ], "properties": { - "name": { "type": "string" }, - "web_url": { "type": "string" } + "name": { + "type": "string" + }, + "web_url": { + "type": "string" + } }, "additionalProperties": false }, "user": { "allOf": [ - { "$ref": "member_user_default.json" } + { + "$ref": "member_user_default.json" + } ] }, - "state": { "type": "integer" }, + "state": { + "type": "integer" + }, "invite": { "type": "object", - "required": ["email", "avatar_url", "can_resend", "user_state"], + "required": [ + "email", + "avatar_url", + "can_resend", + "user_state" + ], "properties": { - "email": { "type": "string" }, - "avatar_url": { "type": [ "string", "null" ] }, - "can_resend": { "type": "boolean" }, - "user_state": { "type": "string" } + "email": { + "type": "string" + }, + "avatar_url": { + "type": [ + "string", + "null" + ] + }, + "can_resend": { + "type": "boolean" + }, + "user_state": { + "type": "string" + } }, "additionalProperties": false } } -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/entities/merge_request_metrics.json b/spec/fixtures/api/schemas/entities/merge_request_metrics.json index 3fa767f85df..591c5919b19 100644 --- a/spec/fixtures/api/schemas/entities/merge_request_metrics.json +++ b/spec/fixtures/api/schemas/entities/merge_request_metrics.json @@ -1,21 +1,46 @@ { "type": "object", - "required": ["closed_at", "merged_at", "closed_by", "merged_by"], - "properties" : { - "closed_at": { "type": ["datetime", "null"] }, - "merged_at": { "type": ["datetime", "null"] }, + "required": [ + "closed_at", + "merged_at", + "closed_by", + "merged_by" + ], + "properties": { + "closed_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "merged_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, "closed_by": { "oneOf": [ - { "type": "null" }, - { "$ref": "user.json" } + { + "type": "null" + }, + { + "$ref": "user.json" + } ] }, "merged_by": { "oneOf": [ - { "type": "null" }, - { "$ref": "user.json" } + { + "type": "null" + }, + { + "$ref": "user.json" + } ] } }, "additionalProperties": false -} +}
\ No newline at end of file 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 be2fe19b067..f0509f7a76f 100644 --- a/spec/fixtures/api/schemas/entities/merge_request_poll_widget.json +++ b/spec/fixtures/api/schemas/entities/merge_request_poll_widget.json @@ -1,38 +1,128 @@ { "type": "object", - "properties" : { - "id": { "type": "integer" }, - "iid": { "type": "integer" }, - "description": { "type": ["string", "null"] }, - "title": { "type": "string" }, - "auto_merge_strategy": { "type": ["string", "null"] }, - "available_auto_merge_strategies": { "type": "array" }, - "source_branch_protected": { "type": "boolean" }, - "allow_collaboration": { "type": "boolean"}, - "should_be_rebased": { "type": "boolean" }, - "ff_only_enabled": { "type": ["boolean", false] }, - "merge_user": { "type": ["object", "null"] }, - "pipeline": { "type": ["object", "null"] }, - "merge_pipeline": { "type": ["object", "null"] }, - "default_merge_commit_message": { "type": ["string", "null"] }, - "mergeable": { "type": "boolean" }, - "default_merge_commit_message_with_description": { "type": "string" }, - "mergeable_discussions_state": { "type": "boolean" }, - "project_archived": { "type": "boolean" }, - "only_allow_merge_if_pipeline_succeeds": { "type": "boolean" }, - "has_ci": { "type": "boolean" }, - "ci_status": { "type": ["string", "null"] }, - "pipeline_coverage_delta": { "type": ["float", "null"] }, + "properties": { + "id": { + "type": "integer" + }, + "iid": { + "type": "integer" + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "title": { + "type": "string" + }, + "auto_merge_strategy": { + "type": [ + "string", + "null" + ] + }, + "available_auto_merge_strategies": { + "type": "array" + }, + "source_branch_protected": { + "type": "boolean" + }, + "allow_collaboration": { + "type": "boolean" + }, + "should_be_rebased": { + "type": "boolean" + }, + "ff_only_enabled": { + "type": "boolean" + }, + "merge_user": { + "type": [ + "object", + "null" + ] + }, + "pipeline": { + "type": [ + "object", + "null" + ] + }, + "merge_pipeline": { + "type": [ + "object", + "null" + ] + }, + "default_merge_commit_message": { + "type": [ + "string", + "null" + ] + }, + "mergeable": { + "type": "boolean" + }, + "default_merge_commit_message_with_description": { + "type": "string" + }, + "mergeable_discussions_state": { + "type": "boolean" + }, + "project_archived": { + "type": "boolean" + }, + "only_allow_merge_if_pipeline_succeeds": { + "type": "boolean" + }, + "has_ci": { + "type": "boolean" + }, + "ci_status": { + "type": [ + "string", + "null" + ] + }, + "pipeline_coverage_delta": { + "type": [ + "string", + "null" + ], + "format": "float" + }, "builds_with_coverage": { - "type": ["array", "null"], + "type": [ + "array", + "null" + ], "items": { "type": "object", - "required": ["name", "coverage"] + "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"] }, + "cancel_auto_merge_path": { + "type": [ + "string", + "null" + ] + }, + "test_reports_path": { + "type": [ + "string", + "null" + ] + }, + "create_issue_to_resolve_discussions_path": { + "type": [ + "string", + "null" + ] + }, "current_user": { "type": "object", "required": [ @@ -42,20 +132,71 @@ "can_create_issue" ], "properties": { - "can_remove_source_branch": { "type": "boolean" }, - "can_revert_on_current_merge_request": { "type": ["boolean", "null"] }, - "can_cherry_pick_on_current_merge_request": { "type": ["boolean", "null"] }, - "can_create_issue": { "type": "boolean" } + "can_remove_source_branch": { + "type": "boolean" + }, + "can_revert_on_current_merge_request": { + "type": [ + "boolean", + "null" + ] + }, + "can_cherry_pick_on_current_merge_request": { + "type": [ + "boolean", + "null" + ] + }, + "can_create_issue": { + "type": "boolean" + } }, "additionalProperties": false }, - "can_push_to_source_branch": { "type": "boolean" }, - "new_blob_path": { "type": ["string", "null"] }, - "rebase_path": { "type": ["string", "null"] }, - "conflict_resolution_path": { "type": ["string", "null"] }, - "remove_wip_path": { "type": ["string", "null"] }, - "merge_path": { "type": ["string", "null"] }, - "cherry_pick_in_fork_path": { "type": ["string", "null"] }, - "revert_in_fork_path": { "type": ["string", "null"] } + "can_push_to_source_branch": { + "type": "boolean" + }, + "new_blob_path": { + "type": [ + "string", + "null" + ] + }, + "rebase_path": { + "type": [ + "string", + "null" + ] + }, + "conflict_resolution_path": { + "type": [ + "string", + "null" + ] + }, + "remove_wip_path": { + "type": [ + "string", + "null" + ] + }, + "merge_path": { + "type": [ + "string", + "null" + ] + }, + "cherry_pick_in_fork_path": { + "type": [ + "string", + "null" + ] + }, + "revert_in_fork_path": { + "type": [ + "string", + "null" + ] + } } -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/entities/test_case.json b/spec/fixtures/api/schemas/entities/test_case.json index 483fa881f8c..660d40c4a9f 100644 --- a/spec/fixtures/api/schemas/entities/test_case.json +++ b/spec/fixtures/api/schemas/entities/test_case.json @@ -1,24 +1,57 @@ { "type": "object", - "required" : [ + "required": [ "status", "name" ], "properties": { - "status": { "type": "string" }, - "name": { "type": "string" }, - "classname": { "type": "string" }, - "file": { "type": ["string", "null"] }, - "execution_time": { "type": "float" }, - "system_output": { "type": ["string", "null"] }, - "stack_trace": { "type": ["string", "null"] }, - "attachment_url": { "type": ["string", "null"] }, + "status": { + "type": "string" + }, + "name": { + "type": "string" + }, + "classname": { + "type": "string" + }, + "file": { + "type": [ + "string", + "null" + ] + }, + "execution_time": { + "type": "number", + "format": "float" + }, + "system_output": { + "type": [ + "string", + "null" + ] + }, + "stack_trace": { + "type": [ + "string", + "null" + ] + }, + "attachment_url": { + "type": [ + "string", + "null" + ] + }, "recent_failures": { "oneOf": [ - { "type": "null" }, - { "$ref": "test_case/recent_failures.json" } + { + "type": "null" + }, + { + "$ref": "test_case/recent_failures.json" + } ] } }, "additionalProperties": false -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/entities/trigger.json b/spec/fixtures/api/schemas/entities/trigger.json index 5c46142673f..c6ccd84dcdd 100644 --- a/spec/fixtures/api/schemas/entities/trigger.json +++ b/spec/fixtures/api/schemas/entities/trigger.json @@ -10,14 +10,21 @@ ], "properties": { "description": { - "type": ["string", "null"] + "type": [ + "string", + "null" + ] }, "owner": { "type": "object", "$ref": "user.json" }, "last_used": { - "type": ["datetime", "null"] + "type": [ + "string", + "null" + ], + "format": "date-time" }, "token": { "type": "string" @@ -36,4 +43,4 @@ } }, "additionalProperties": false -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/environment.json b/spec/fixtures/api/schemas/environment.json index 87b6e5da370..fe842844223 100644 --- a/spec/fixtures/api/schemas/environment.json +++ b/spec/fixtures/api/schemas/environment.json @@ -15,52 +15,120 @@ "can_stop" ], "properties": { - "id": { "type": "integer" }, - "global_id": { "type": "string" }, - "name": { "type": "string" }, - "state": { "type": "string" }, - "external_url": { "$ref": "types/nullable_string.json" }, - "environment_type": { "$ref": "types/nullable_string.json" }, - "name_without_type": { "type": "string" }, - "has_stop_action": { "type": "boolean" }, - "environment_path": { "type": "string" }, - "stop_path": { "type": "string" }, - "cancel_auto_stop_path": { "type": "string" }, - "folder_path": { "type": "string" }, - "logs_path": { "type": "string" }, - "logs_api_path": { "type": "string" }, - "enable_advanced_logs_querying": { "type": "boolean" }, - "created_at": { "type": "string", "format": "date-time" }, - "updated_at": { "type": "string", "format": "date-time" }, - "auto_stop_at": { "type": "string", "format": "date-time" }, - "can_stop": { "type": "boolean" }, - "has_opened_alert": { "type": "boolean" }, - "tier": { "type": "string" }, - "required_approval_count": { "type": "integer" }, - "cluster_type": { "type": "types/nullable_string.json" }, - "terminal_path": { "type": "types/nullable_string.json" }, + "id": { + "type": "integer" + }, + "global_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "state": { + "type": "string" + }, + "external_url": { + "$ref": "types/nullable_string.json", + "format": "uri" + }, + "environment_type": { + "$ref": "types/nullable_string.json", + "format": "uri" + }, + "name_without_type": { + "type": "string" + }, + "has_stop_action": { + "type": "boolean" + }, + "environment_path": { + "type": "string" + }, + "stop_path": { + "type": "string" + }, + "cancel_auto_stop_path": { + "type": "string" + }, + "folder_path": { + "type": "string" + }, + "logs_path": { + "type": "string" + }, + "logs_api_path": { + "type": "string" + }, + "enable_advanced_logs_querying": { + "type": "boolean" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "auto_stop_at": { + "type": "string", + "format": "date-time" + }, + "can_stop": { + "type": "boolean" + }, + "has_opened_alert": { + "type": "boolean" + }, + "tier": { + "type": "string" + }, + "required_approval_count": { + "type": "integer" + }, + "cluster_type": { + "ref": "types/nullable_string.json" + }, + "terminal_path": { + "ref": "types/nullable_string.json" + }, "rollout_status": { "oneOf": [ - { "type": "null" }, - { "$ref": "rollout_status.json" } + { + "type": "null" + }, + { + "$ref": "rollout_status.json" + } ] }, "last_deployment": { "oneOf": [ - { "type": "null" }, - { "$ref": "deployment.json" }, + { + "type": "null" + }, + { + "$ref": "deployment.json" + }, { "type": "object", - "properties" : { - "name": { "type": "string" }, - "build_path": { "type": "string" } + "properties": { + "name": { + "type": "string" + }, + "build_path": { + "type": "string" + } } } ] }, - "can_delete": { "type": "boolean" } - , - "delete_path": { "type": "string" } + "can_delete": { + "type": "boolean" + }, + "delete_path": { + "type": "string" + } }, "additionalProperties": false -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/group_link/group_link.json b/spec/fixtures/api/schemas/group_link/group_link.json index 3c2195df11e..885ed6d18e0 100644 --- a/spec/fixtures/api/schemas/group_link/group_link.json +++ b/spec/fixtures/api/schemas/group_link/group_link.json @@ -11,34 +11,82 @@ "is_direct_member" ], "properties": { - "id": { "type": "integer" }, - "created_at": { "type": "date-time" }, - "expires_at": { "type": ["date-time", "null"] }, + "id": { + "type": "integer" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "expires_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, "access_level": { "type": "object", - "required": ["integer_value", "string_value"], + "required": [ + "integer_value", + "string_value" + ], "properties": { - "integer_value": { "type": "integer" }, - "string_value": { "type": "string" } + "integer_value": { + "type": "integer" + }, + "string_value": { + "type": "string" + } }, "additionalProperties": false }, - "valid_roles": { "type": "object" }, + "valid_roles": { + "type": "object" + }, "shared_with_group": { "type": "object", - "required": ["id", "name", "full_name", "full_path", "avatar_url", "web_url"], + "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" } + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "full_path": { + "type": "string" + }, + "avatar_url": { + "type": [ + "string", + "null" + ] + }, + "web_url": { + "type": "string" + } }, "additionalProperties": false }, - "can_update": { "type": "boolean" }, - "can_remove": { "type": "boolean" }, - "is_direct_member": { "type": "boolean" } + "can_update": { + "type": "boolean" + }, + "can_remove": { + "type": "boolean" + }, + "is_direct_member": { + "type": "boolean" + } } -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/issue.json b/spec/fixtures/api/schemas/issue.json index aefba89d9e2..ac8c05eb377 100644 --- a/spec/fixtures/api/schemas/issue.json +++ b/spec/fixtures/api/schemas/issue.json @@ -1,43 +1,104 @@ { "type": "object", - "required" : [ + "required": [ "iid", "title", "confidential" ], - "properties" : { - "id": { "type": "integer" }, - "iid": { "type": "integer" }, - "project_id": { "type": ["integer", "null"] }, - "title": { "type": "string" }, - "confidential": { "type": "boolean" }, - "due_date": { "type": ["string", "null"] }, - "relative_position": { "type": ["integer", "null"] }, - "time_estimate": { "type": "integer" }, - "type": { "type": "string", "enum": ["ISSUE", "INCIDENT", "TEST_CASE", "REQUIREMENT"] }, - "issue_sidebar_endpoint": { "type": "string" }, - "toggle_subscription_endpoint": { "type": "string" }, - "assignable_labels_endpoint": { "type": "string" }, - "reference_path": { "type": "string" }, - "real_path": { "type": "string" }, + "properties": { + "id": { + "type": "integer" + }, + "iid": { + "type": "integer" + }, + "project_id": { + "type": [ + "integer", + "null" + ] + }, + "title": { + "type": "string" + }, + "confidential": { + "type": "boolean" + }, + "due_date": { + "type": [ + "string", + "null" + ] + }, + "relative_position": { + "type": [ + "integer", + "null" + ] + }, + "time_estimate": { + "type": "integer" + }, + "type": { + "type": "string", + "enum": [ + "ISSUE", + "INCIDENT", + "TEST_CASE", + "REQUIREMENT" + ] + }, + "issue_sidebar_endpoint": { + "type": "string" + }, + "toggle_subscription_endpoint": { + "type": "string" + }, + "assignable_labels_endpoint": { + "type": "string" + }, + "reference_path": { + "type": "string" + }, + "real_path": { + "type": "string" + }, "project": { - "id": { "type": "integer" }, - "path": { "type": "string" } + "id": { + "type": "integer" + }, + "path": { + "type": "string" + } }, "labels": { "type": "array", - "items": { "$ref": "entities/label.json" } + "items": { + "$ref": "entities/label.json" + } }, "assignee": { - "id": { "type": "integer" }, - "name": { "type": "string" }, - "username": { "type": "string" }, - "avatar_url": { "type": "uri" } + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "username": { + "type": "string" + }, + "avatar_url": { + "type": "string", + "format": "uri" + } }, "assignees": { "type": "array", "items": { - "type": ["object", "null"], + "type": [ + "object", + "null" + ], "required": [ "id", "name", @@ -45,13 +106,27 @@ "avatar_url" ], "properties": { - "id": { "type": "integer" }, - "name": { "type": "string" }, - "username": { "type": "string" }, - "avatar_url": { "type": "uri" } + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "username": { + "type": "string" + }, + "avatar_url": { + "type": "string", + "format": "uri" + } } } }, - "subscribed": { "type": ["boolean", "null"] } + "subscribed": { + "type": [ + "boolean", + "null" + ] + } } -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/jira_connect/author.json b/spec/fixtures/api/schemas/jira_connect/author.json index bd2cff96d99..e653db9a97d 100644 --- a/spec/fixtures/api/schemas/jira_connect/author.json +++ b/spec/fixtures/api/schemas/jira_connect/author.json @@ -1,12 +1,27 @@ { "type": "object", "properties": { - "name": { "type": "string" }, - "email": { "type": "string" }, - "username": { "type": "string" }, - "url": { "type": "uri" }, - "avatar": { "type": "uri" } + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "username": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "avatar": { + "type": "string", + "format": "uri" + } }, - "required": [ "name", "email" ], + "required": [ + "name", + "email" + ], "additionalProperties": false -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/jira_connect/branch.json b/spec/fixtures/api/schemas/jira_connect/branch.json index c397d88fa91..237dc8abbc0 100644 --- a/spec/fixtures/api/schemas/jira_connect/branch.json +++ b/spec/fixtures/api/schemas/jira_connect/branch.json @@ -1,19 +1,38 @@ { "type": "object", "properties": { - "id": { "type": "string" }, - "issueKeys": { "type": "array" }, - "name": { "type": "string" }, + "id": { + "type": "string" + }, + "issueKeys": { + "type": "array" + }, + "name": { + "type": "string" + }, "lastCommit": { "$ref": "./commit.json" }, - "url": { "type": "uri" }, - "createPullRequestUrl": { "type": "uri" }, - "updateSequenceId": { "type": "integer" } + "url": { + "type": "string", + "format": "uri" + }, + "createPullRequestUrl": { + "type": "string", + "format": "uri" + }, + "updateSequenceId": { + "type": "integer" + } }, "required": [ - "id", "issueKeys", "name", "lastCommit", - "url", "createPullRequestUrl", "updateSequenceId" + "id", + "issueKeys", + "name", + "lastCommit", + "url", + "createPullRequestUrl", + "updateSequenceId" ], "additionalProperties": false -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/jira_connect/commit.json b/spec/fixtures/api/schemas/jira_connect/commit.json index 794cf9ef365..0c35d650559 100644 --- a/spec/fixtures/api/schemas/jira_connect/commit.json +++ b/spec/fixtures/api/schemas/jira_connect/commit.json @@ -1,29 +1,61 @@ { "type": "object", "properties": { - "id": { "type": "string" }, - "issueKeys": { "type": "array" }, - "hash": { "type": "string" }, - "displayId": { "type": "string" }, - "message": { "type": "string" }, - "flags": { "type": "array" }, + "id": { + "type": "string" + }, + "issueKeys": { + "type": "array" + }, + "hash": { + "type": "string" + }, + "displayId": { + "type": "string" + }, + "message": { + "type": "string" + }, + "flags": { + "type": "array" + }, "author": { "$ref": "./author.json" }, - "fileCount": { "type": "integer" }, + "fileCount": { + "type": "integer" + }, "files": { "type": "array", "items": { "$ref": "./file.json" } }, - "authorTimestamp": { "type": "timestamp" }, - "url": { "type": "uri" }, - "updateSequenceId": { "type": "integer" } + "authorTimestamp": { + "type": "string", + "format": "date-time" + }, + "url": { + "type": "string", + "format": "uri" + }, + "updateSequenceId": { + "type": "integer" + } }, "required": [ - "id", "issueKeys", "hash", "displayId", "message", "flags", "author", - "fileCount", "files", "authorTimestamp", "url", "updateSequenceId" + "id", + "issueKeys", + "hash", + "displayId", + "message", + "flags", + "author", + "fileCount", + "files", + "authorTimestamp", + "url", + "updateSequenceId" ], "additionalProperties": false -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/jira_connect/file.json b/spec/fixtures/api/schemas/jira_connect/file.json index 34718991237..3e93911ece4 100644 --- a/spec/fixtures/api/schemas/jira_connect/file.json +++ b/spec/fixtures/api/schemas/jira_connect/file.json @@ -1,14 +1,29 @@ { "type": "object", "properties": { - "path": { "type": "string" }, - "changeType": { "type": "string" }, - "linesAdded": { "type": "integer" }, - "linesRemoved": { "type": "integer" }, - "url": { "type": "uri" } + "path": { + "type": "string" + }, + "changeType": { + "type": "string" + }, + "linesAdded": { + "type": "integer" + }, + "linesRemoved": { + "type": "integer" + }, + "url": { + "type": "string", + "format": "uri" + } }, "required": [ - "path", "changeType", "linesAdded", "linesRemoved", "url" + "path", + "changeType", + "linesAdded", + "linesRemoved", + "url" ], "additionalProperties": false -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/jira_connect/pull_request.json b/spec/fixtures/api/schemas/jira_connect/pull_request.json index 56ce6faf498..430752335be 100644 --- a/spec/fixtures/api/schemas/jira_connect/pull_request.json +++ b/spec/fixtures/api/schemas/jira_connect/pull_request.json @@ -1,26 +1,63 @@ { "type": "object", "properties": { - "id": { "type": "string" }, - "issueKeys": { "type": "array" }, - "displayId": { "type": "string" }, - "title": { "type": "string" }, + "id": { + "type": "string" + }, + "issueKeys": { + "type": "array" + }, + "displayId": { + "type": "string" + }, + "title": { + "type": "string" + }, "author": { "$ref": "./author.json" }, - "commentCount": { "type": "integer" }, - "sourceBranch": { "type": "string" }, - "destinationBranch": { "type": "string" }, - "lastUpdate": { "type": "timestamp" }, - "status": { "type": "string" }, - "sourceBranchUrl": { "type": "uri" }, - "url": { "type": "uri" }, - "updateSequenceId": { "type": "integer" } + "commentCount": { + "type": "integer" + }, + "sourceBranch": { + "type": "string" + }, + "destinationBranch": { + "type": "string" + }, + "lastUpdate": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + }, + "sourceBranchUrl": { + "type": "string", + "format": "uri" + }, + "url": { + "type": "string", + "format": "uri" + }, + "updateSequenceId": { + "type": "integer" + } }, "required": [ - "id", "issueKeys", "displayId", "title", "author", "commentCount", - "sourceBranch", "destinationBranch", "lastUpdate", "status", - "sourceBranchUrl", "url", "updateSequenceId" + "id", + "issueKeys", + "displayId", + "title", + "author", + "commentCount", + "sourceBranch", + "destinationBranch", + "lastUpdate", + "status", + "sourceBranchUrl", + "url", + "updateSequenceId" ], "additionalProperties": false -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/jira_connect/repository.json b/spec/fixtures/api/schemas/jira_connect/repository.json index 9e81d77bc6a..5a45bf7cc77 100644 --- a/spec/fixtures/api/schemas/jira_connect/repository.json +++ b/spec/fixtures/api/schemas/jira_connect/repository.json @@ -1,11 +1,29 @@ { "type": "object", "properties": { - "id": { "type": "string" }, - "name": { "type": "string" }, - "description": { "type": ["string", "null"] }, - "url": { "type": "uri" }, - "avatar": { "type": "uri" }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "url": { + "type": "string", + "format": "uri" + }, + "avatar": { + "type": [ + "string", + "null" + ], + "format": "uri" + }, "commits": { "type": "array", "items": { @@ -24,11 +42,20 @@ "$ref": "./pull_request.json" } }, - "updateSequenceId": { "type": "integer" } + "updateSequenceId": { + "type": "integer" + } }, "required": [ - "id", "name", "description", "url", "avatar", - "commits", "branches", "pullRequests", "updateSequenceId" + "id", + "name", + "description", + "url", + "avatar", + "commits", + "branches", + "pullRequests", + "updateSequenceId" ], "additionalProperties": false -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/job/build_trace_line.json b/spec/fixtures/api/schemas/job/build_trace_line.json index 18726dff2bb..ada2b4edb7d 100644 --- a/spec/fixtures/api/schemas/job/build_trace_line.json +++ b/spec/fixtures/api/schemas/job/build_trace_line.json @@ -6,13 +6,23 @@ "content" ], "properties": { - "offset": { "type": "integer" }, + "offset": { + "type": "integer" + }, "content": { "type": "array", - "items": { "$ref": "./build_trace_line_content.json" } + "items": { + "$ref": "./build_trace_line_content.json" + } + }, + "section": { + "type": "string" + }, + "section_header": { + "type": "boolean" }, - "section": "string", - "section_header": "boolean", - "section_duration": "string" + "section_duration": { + "type": "string" + } } -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/merge_request.json b/spec/fixtures/api/schemas/merge_request.json index 36962660cd9..416391e454f 100644 --- a/spec/fixtures/api/schemas/merge_request.json +++ b/spec/fixtures/api/schemas/merge_request.json @@ -1,12 +1,17 @@ { "type": "object", - "required" : [ + "required": [ "iid", "url" ], - "properties" : { - "iid": { "type": "integer" }, - "url": { "type": "uri" } + "properties": { + "iid": { + "type": "integer" + }, + "url": { + "type": "string", + "format": "uri" + } }, "additionalProperties": false -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/ml/get_experiment.json b/spec/fixtures/api/schemas/ml/get_experiment.json index 482455a89e1..13630ec92e9 100644 --- a/spec/fixtures/api/schemas/ml/get_experiment.json +++ b/spec/fixtures/api/schemas/ml/get_experiment.json @@ -23,11 +23,28 @@ "type": "string" }, "lifecycle_stage": { - "type": { - "enum": [ - "active", - "deleted" - ] + "type": "string", + "enum": [ + "active", + "deleted" + ] + }, + "tags": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } } } } diff --git a/spec/fixtures/api/schemas/ml/list_experiments.json b/spec/fixtures/api/schemas/ml/list_experiments.json index 4c3e834abc6..10f512cd1eb 100644 --- a/spec/fixtures/api/schemas/ml/list_experiments.json +++ b/spec/fixtures/api/schemas/ml/list_experiments.json @@ -25,12 +25,11 @@ "type": "string" }, "lifecycle_stage": { - "type": { - "enum": [ - "active", - "deleted" - ] - } + "type": "string", + "enum": [ + "active", + "deleted" + ] } } } diff --git a/spec/fixtures/api/schemas/ml/run.json b/spec/fixtures/api/schemas/ml/run.json index 48d0ed25ce4..5591eee0800 100644 --- a/spec/fixtures/api/schemas/ml/run.json +++ b/spec/fixtures/api/schemas/ml/run.json @@ -45,24 +45,24 @@ "end_time": { "type": "integer" }, - "user_id": "", + "user_id": { + "type": "string" + }, "status": { - "type": { - "enum": [ - "RUNNING", - "SCHEDULED", - "FINISHED", - "FAILED", - "KILLED" - ] - } + "type": "string", + "enum": [ + "RUNNING", + "SCHEDULED", + "FINISHED", + "FAILED", + "KILLED" + ] }, "lifecycle_stage": { - "type": { - "enum": [ - "active" - ] - } + "type": "string", + "enum": [ + "active" + ] } } }, diff --git a/spec/fixtures/api/schemas/ml/update_run.json b/spec/fixtures/api/schemas/ml/update_run.json index b429444120f..fb1291a9bb9 100644 --- a/spec/fixtures/api/schemas/ml/update_run.json +++ b/spec/fixtures/api/schemas/ml/update_run.json @@ -20,16 +20,44 @@ "end_time" ], "properties": { - "run_id": { "type": "string" }, - "run_uuid": { "type": "string" }, - "experiment_id": { "type": "string" }, - "artifact_location": { "type": "string" }, - "start_time": { "type": "integer" }, - "end_time": { "type": "integer" }, - "user_id": { "type": "string" }, - "status": { "type": { "enum" : ["RUNNING", "SCHEDULED", "FINISHED", "FAILED", "KILLED"] } }, - "lifecycle_stage": { "type": { "enum" : ["active"] } } + "run_id": { + "type": "string" + }, + "run_uuid": { + "type": "string" + }, + "experiment_id": { + "type": "string" + }, + "artifact_location": { + "type": "string" + }, + "start_time": { + "type": "integer" + }, + "end_time": { + "type": "integer" + }, + "user_id": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "RUNNING", + "SCHEDULED", + "FINISHED", + "FAILED", + "KILLED" + ] + }, + "lifecycle_stage": { + "type": "string", + "enum": [ + "active" + ] + } } } } -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/pipeline_schedule.json b/spec/fixtures/api/schemas/pipeline_schedule.json index ef5942b7eb3..ade5a76d934 100644 --- a/spec/fixtures/api/schemas/pipeline_schedule.json +++ b/spec/fixtures/api/schemas/pipeline_schedule.json @@ -1,53 +1,142 @@ { "type": "object", - "properties" : { - "id": { "type": "integer" }, - "description": { "type": "string" }, - "ref": { "type": "string" }, - "cron": { "type": "string" }, - "cron_timezone": { "type": "string" }, - "next_run_at": { "type": "string" }, - "active": { "type": "boolean" }, - "created_at": { "type": ["string", "null"], "format": "date-time" }, - "updated_at": { "type": ["string", "null"], "format": "date-time" }, + "properties": { + "id": { + "type": "integer" + }, + "description": { + "type": "string" + }, + "ref": { + "type": "string" + }, + "cron": { + "type": "string" + }, + "cron_timezone": { + "type": "string" + }, + "next_run_at": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "created_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "updated_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, "last_pipeline": { - "type": ["object", "null"], + "type": [ + "object", + "null" + ], "properties": { - "id": { "type": "integer" }, - "iid": { "type": "integer" }, - "project_id": { "type": "integer" }, - "sha": { "type": "string" }, - "ref": { "type": "string" }, - "status": { "type": "string" }, - "source": { "type": "string" }, - "web_url": { "type": ["string", "null"] }, - "created_at": { "type": ["string", "null"], "format": "date-time" }, - "updated_at": { "type": ["string", "null"], "format": "date-time" } + "id": { + "type": "integer" + }, + "iid": { + "type": "integer" + }, + "project_id": { + "type": "integer" + }, + "sha": { + "type": "string" + }, + "ref": { + "type": "string" + }, + "status": { + "type": "string" + }, + "source": { + "type": "string" + }, + "web_url": { + "type": [ + "string", + "null" + ] + }, + "created_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "updated_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + } }, "additionalProperties": false }, "owner": { "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" + "id", + "name", + "username", + "state", + "avatar_url", + "web_url" ] }, "variables": { "type": "array", - "items": { "$ref": "pipeline_schedule_variable.json" } + "items": { + "$ref": "pipeline_schedule_variable.json" + } } }, "required": [ - "id", "description", "ref", "cron", "cron_timezone", "next_run_at", - "active", "created_at", "updated_at", "owner" + "id", + "description", + "ref", + "cron", + "cron_timezone", + "next_run_at", + "active", + "created_at", + "updated_at", + "owner" ], "additionalProperties": false -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/prometheus/additional_metrics_query_result.json b/spec/fixtures/api/schemas/prometheus/additional_metrics_query_result.json index 47b5d283b8c..f32ae3d334c 100644 --- a/spec/fixtures/api/schemas/prometheus/additional_metrics_query_result.json +++ b/spec/fixtures/api/schemas/prometheus/additional_metrics_query_result.json @@ -1,13 +1,29 @@ { + "type": "array", "items": { + "type": "object", + "required": [ + "group", + "metrics", + "priority" + ], "properties": { "group": { "type": "string" }, "metrics": { + "type": "array", "items": { + "type": "object", + "required": [ + "queries", + "title", + "weight" + ], "properties": { "queries": { + "type": "array", + "required": [], "items": { "properties": { "query_range": { @@ -16,13 +32,33 @@ "query": { "type": "string" }, + "label": { + "type": "string" + }, + "unit": { + "type": "string" + }, "result": { - "type": "any" + "type": "array", + "items": { + "type": "object", + "required": [ + "metric", + "values" + ], + "properties": { + "metric": { + "type": "object" + }, + "values": { + "type": "array" + } + } + } } }, "type": "object" - }, - "type": "array" + } }, "title": { "type": "string" @@ -33,26 +69,12 @@ "y_label": { "type": "string" } - }, - "type": "object" - }, - "required": [ - "metrics", - "title", - "weight" - ], - "type": "array" + } + } }, "priority": { "type": "integer" } - }, - "type": "object" - }, - "required": [ - "group", - "priority", - "metrics" - ], - "type": "array" + } + } }
\ No newline at end of file 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 diff --git a/spec/fixtures/api/schemas/registry/repository.json b/spec/fixtures/api/schemas/registry/repository.json index 18d2c68ac2f..078fba7a34a 100644 --- a/spec/fixtures/api/schemas/registry/repository.json +++ b/spec/fixtures/api/schemas/registry/repository.json @@ -1,6 +1,12 @@ { "type": "object", - "required": ["id", "name", "path", "location", "created_at"], + "required": [ + "id", + "name", + "path", + "location", + "created_at" + ], "properties": { "id": { "type": "integer" @@ -18,10 +24,15 @@ "type": "string" }, "created_at": { - "type": "date-time" + "type": "string", + "format": "date-time" }, "cleanup_policy_started_at": { - "type": "date-time" + "type": [ + "string", + "null" + ], + "format": "date-time" }, "tags_path": { "type": "string" @@ -31,14 +42,24 @@ }, "status": { "oneOf": [ - { "type": "null" }, - { "type": "string", "enum": ["delete_scheduled", "delete_failed"] } + { + "type": "null" + }, + { + "type": "string", + "enum": [ + "delete_scheduled", + "delete_failed" + ] + } ] }, - "tags": { "$ref": "tags.json" }, + "tags": { + "$ref": "tags.json" + }, "tags_count": { "type": "integer" } }, "additionalProperties": false -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/release.json b/spec/fixtures/api/schemas/release.json index fe4f8cd2157..11f238ffc92 100644 --- a/spec/fixtures/api/schemas/release.json +++ b/spec/fixtures/api/schemas/release.json @@ -1,22 +1,56 @@ { "type": "object", - "required": ["tag_name", "description"], + "required": [ + "tag_name", + "description" + ], "properties": { - "name": { "type": "string" }, - "tag_name": { "type": "string" }, - "ref": { "type": "string "}, - "description": { "type": "string" }, - "description_html": { "type": "string" }, - "created_at": { "type": "string", "format": "date-time" }, + "name": { + "type": "string" + }, + "tag_name": { + "type": "string" + }, + "ref": { + "type": "string" + }, + "description": { + "type": "string" + }, + "description_html": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, "commit": { - "oneOf": [{ "type": "null" }, { "$ref": "public_api/v4/commit/basic.json" }] + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "public_api/v4/commit/basic.json" + } + ] }, "author": { - "oneOf": [{ "type": "null" }, { "$ref": "public_api/v4/user/basic.json" }] + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "public_api/v4/user/basic.json" + } + ] }, "assets": { - "count": { "type": "integer" }, - "links": { "$ref": "release/links.json" }, + "count": { + "type": "integer" + }, + "links": { + "$ref": "release/links.json" + }, "sources": { "type": "array", "items": { @@ -27,4 +61,4 @@ } }, "additionalProperties": false -} +}
\ No newline at end of file diff --git a/spec/fixtures/api/schemas/variable.json b/spec/fixtures/api/schemas/variable.json index c49d7d8c5ea..440e812d95b 100644 --- a/spec/fixtures/api/schemas/variable.json +++ b/spec/fixtures/api/schemas/variable.json @@ -8,13 +8,31 @@ "protected" ], "properties": { - "id": { "type": "integer" }, - "key": { "type": "string" }, - "value": { "type": "string" }, - "masked": { "type": "boolean" }, - "protected": { "type": "boolean" }, - "variable_type": { "type": "string" }, - "environment_scope": { "type": "string", "optional": true } + "id": { + "type": "integer" + }, + "key": { + "type": "string" + }, + "value": { + "type": "string" + }, + "masked": { + "type": "boolean" + }, + "protected": { + "type": "boolean" + }, + "raw": { + "type": "boolean" + }, + "variable_type": { + "type": "string" + }, + "environment_scope": { + "type": "string", + "optional": true + } }, "additionalProperties": false -} +}
\ No newline at end of file |