diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 09:08:36 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 09:08:36 +0000 |
commit | 19e00b948726c0f7ca27dd92200493803499a4e1 (patch) | |
tree | 0df898db4ba20af4b4de2baf39285fe4d113d148 /spec/fixtures/api/schemas | |
parent | ca5ebd2044ce696cc1aafc8a80a606e20f2c9e4b (diff) | |
download | gitlab-ce-19e00b948726c0f7ca27dd92200493803499a4e1.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/fixtures/api/schemas')
4 files changed, 240 insertions, 90 deletions
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/merge_request_poll_widget.json b/spec/fixtures/api/schemas/entities/merge_request_poll_widget.json index d7e5a80df61..f0509f7a76f 100644 --- a/spec/fixtures/api/schemas/entities/merge_request_poll_widget.json +++ b/spec/fixtures/api/schemas/entities/merge_request_poll_widget.json @@ -35,10 +35,7 @@ "type": "boolean" }, "ff_only_enabled": { - "type": [ - "boolean", - false - ] + "type": "boolean" }, "merge_user": { "type": [ 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 |