diff options
Diffstat (limited to 'spec/fixtures/api/schemas')
12 files changed, 316 insertions, 50 deletions
diff --git a/spec/fixtures/api/schemas/entities/diff_viewer.json b/spec/fixtures/api/schemas/entities/diff_viewer.json index b16f8d8b1a2..6fa1604e505 100644 --- a/spec/fixtures/api/schemas/entities/diff_viewer.json +++ b/spec/fixtures/api/schemas/entities/diff_viewer.json @@ -26,6 +26,12 @@ "boolean" ] }, + "generated": { + "type": [ + "boolean", + "null" + ] + }, "whitespace_only": { "type": [ "boolean", diff --git a/spec/fixtures/api/schemas/graphql/container_repository.json b/spec/fixtures/api/schemas/graphql/container_repository.json index 2bb598a14cb..95cc5e28b34 100644 --- a/spec/fixtures/api/schemas/graphql/container_repository.json +++ b/spec/fixtures/api/schemas/graphql/container_repository.json @@ -1,6 +1,19 @@ { "type": "object", - "required": ["id", "name", "path", "location", "createdAt", "updatedAt", "tagsCount", "canDelete", "expirationPolicyCleanupStatus", "project", "lastCleanupDeletedTagsCount"], + "required": [ + "id", + "name", + "path", + "location", + "createdAt", + "updatedAt", + "tagsCount", + "canDelete", + "expirationPolicyCleanupStatus", + "project", + "lastCleanupDeletedTagsCount", + "userPermissions" + ], "properties": { "id": { "type": "string" @@ -21,10 +34,16 @@ "type": "string" }, "expirationPolicyStartedAt": { - "type": ["string", "null"] + "type": [ + "string", + "null" + ] }, "status": { - "type": ["string", "null"] + "type": [ + "string", + "null" + ] }, "tagsCount": { "type": "integer" @@ -34,13 +53,30 @@ }, "expirationPolicyCleanupStatus": { "type": "string", - "enum": ["UNSCHEDULED", "SCHEDULED", "UNFINISHED", "ONGOING"] + "enum": [ + "UNSCHEDULED", + "SCHEDULED", + "UNFINISHED", + "ONGOING" + ] }, "project": { "type": "object" }, "lastCleanupDeletedTagsCount": { - "type": ["string", "null"] + "type": [ + "string", + "null" + ] + }, + "userPermissions": { + "type": "object", + "additionalProperties": false, + "properties": { + "destroyContainerRepository": { + "type": "boolean" + } + } } } } diff --git a/spec/fixtures/api/schemas/graphql/container_repository_details.json b/spec/fixtures/api/schemas/graphql/container_repository_details.json index 3156b6d58d5..dccdd85274d 100644 --- a/spec/fixtures/api/schemas/graphql/container_repository_details.json +++ b/spec/fixtures/api/schemas/graphql/container_repository_details.json @@ -1,17 +1,31 @@ { "type": "object", - "required": ["tags"], - "allOf": [{ "$ref": "./container_repository.json" }], + "required": [ + "tags" + ], + "allOf": [ + { + "$ref": "./container_repository.json" + } + ], "properties": { "tags": { "type": "object", - "required": ["nodes"], + "required": [ + "nodes" + ], "properties": { "nodes": { "type": "array", "items": { "type": "object", - "required": ["name", "path", "location", "canDelete"], + "required": [ + "name", + "path", + "location", + "canDelete", + "userPermissions" + ], "properties": { "name": { "type": "string" @@ -39,6 +53,15 @@ }, "canDelete": { "type": "boolean" + }, + "userPermissions": { + "type": "object", + "additionalProperties": false, + "properties": { + "destroyContainerRepositoryTag": { + "type": "boolean" + } + } } } } diff --git a/spec/fixtures/api/schemas/group_link/group_group_link.json b/spec/fixtures/api/schemas/group_link/group_group_link.json index 689679cbc0f..d67fdaaf762 100644 --- a/spec/fixtures/api/schemas/group_link/group_group_link.json +++ b/spec/fixtures/api/schemas/group_link/group_group_link.json @@ -1,21 +1,45 @@ { "type": "object", "allOf": [ - { "$ref": "group_link.json" }, + { + "$ref": "group_link.json" + }, { "required": [ - "source" + "source", + "valid_roles", + "can_update", + "can_remove" ], "properties": { "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" + }, + "can_update": { + "type": "boolean" + }, + "can_remove": { + "type": "boolean" } } } diff --git a/spec/fixtures/api/schemas/group_link/group_link.json b/spec/fixtures/api/schemas/group_link/group_link.json index 4db38952ecc..421864b2bd7 100644 --- a/spec/fixtures/api/schemas/group_link/group_link.json +++ b/spec/fixtures/api/schemas/group_link/group_link.json @@ -5,9 +5,6 @@ "created_at", "expires_at", "access_level", - "valid_roles", - "can_update", - "can_remove", "is_direct_member" ], "properties": { @@ -41,9 +38,6 @@ }, "additionalProperties": false }, - "valid_roles": { - "type": "object" - }, "is_shared_with_group_private": { "type": "boolean" }, @@ -82,12 +76,6 @@ }, "additionalProperties": false }, - "can_update": { - "type": "boolean" - }, - "can_remove": { - "type": "boolean" - }, "is_direct_member": { "type": "boolean" } diff --git a/spec/fixtures/api/schemas/group_link/project_group_link.json b/spec/fixtures/api/schemas/group_link/project_group_link.json index 615c808e5aa..854ae3c8693 100644 --- a/spec/fixtures/api/schemas/group_link/project_group_link.json +++ b/spec/fixtures/api/schemas/group_link/project_group_link.json @@ -1,20 +1,41 @@ { "type": "object", "allOf": [ - { "$ref": "group_link.json" }, + { + "$ref": "group_link.json" + }, { "required": [ - "source" + "source", + "valid_roles", + "can_update", + "can_remove" ], "properties": { "source": { "type": "object", - "required": ["id", "full_name"], + "required": [ + "id", + "full_name" + ], "properties": { - "id": { "type": "integer" }, - "full_name": { "type": "string" } + "id": { + "type": "integer" + }, + "full_name": { + "type": "string" + } }, "additionalProperties": false + }, + "valid_roles": { + "type": "object" + }, + "can_update": { + "type": "boolean" + }, + "can_remove": { + "type": "boolean" } } } diff --git a/spec/fixtures/api/schemas/ml/get_model.json b/spec/fixtures/api/schemas/ml/get_model.json index 6b7ced6845b..2e97fab5134 100644 --- a/spec/fixtures/api/schemas/ml/get_model.json +++ b/spec/fixtures/api/schemas/ml/get_model.json @@ -19,13 +19,13 @@ "type": "string" }, "user_id": { - "type": "integer" + "type": "string" }, "creation_timestamp": { - "type": "string" + "type": "integer" }, "last_updated_timestamp": { - "type": "string" + "type": "integer" }, "tags": { "type": "array", diff --git a/spec/fixtures/api/schemas/ml/get_model_version.json b/spec/fixtures/api/schemas/ml/get_model_version.json new file mode 100644 index 00000000000..214c993ed73 --- /dev/null +++ b/spec/fixtures/api/schemas/ml/get_model_version.json @@ -0,0 +1,75 @@ +{ + "type": "object", + "required": [ + "model_version" + ], + "properties": { + "model_version": { + "type": "object", + "required": [ + "name", + "version", + "creation_timestamp", + "last_updated_timestamp", + "user_id", + "current_stage", + "description", + "source", + "run_id", + "status", + "status_message", + "metadata", + "run_link", + "aliases" + ], + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "creation_timestamp": { + "type": "integer" + }, + "last_updated_timestamp": { + "type": "integer" + }, + "user_id": { + "type": "null" + }, + "current_stage": { + "type": "string" + }, + "description": { + "type": "string" + }, + "source": { + "type": "string" + }, + "run_id": { + "type": "string" + }, + "status": { + "type": "string" + }, + "status_message": { + "type": "string" + }, + "metadata": { + "type": "array", + "items": { + } + }, + "run_link": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + } + } + } + } + } +} diff --git a/spec/fixtures/api/schemas/ml/list_models.json b/spec/fixtures/api/schemas/ml/list_models.json new file mode 100644 index 00000000000..eaeaa268dde --- /dev/null +++ b/spec/fixtures/api/schemas/ml/list_models.json @@ -0,0 +1,53 @@ +{ + "type": "object", + "required": [ + "registered_models", + "next_page_token" + ], + "properties": { + "registered_models": { + "type": "array", + "items": { + "type": "object", + "required": [ + + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "user_id": { + "type": "string" + }, + "creation_timestamp": { + "type": "integer" + }, + "last_updated_timestamp": { + "type": "integer" + }, + "tags": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + } + } + } + } + } +} diff --git a/spec/fixtures/api/schemas/public_api/v4/project_hook.json b/spec/fixtures/api/schemas/public_api/v4/project_hook.json index b89f5af8078..c42a4cad712 100644 --- a/spec/fixtures/api/schemas/public_api/v4/project_hook.json +++ b/spec/fixtures/api/schemas/public_api/v4/project_hook.json @@ -22,9 +22,11 @@ "releases_events", "alert_status", "disabled_until", - "url_variables", "emoji_events" ], + "optional": [ + "url_variables" + ], "properties": { "id": { "type": "integer" diff --git a/spec/fixtures/api/schemas/public_api/v4/project_repository_storage_move.json b/spec/fixtures/api/schemas/public_api/v4/project_repository_storage_move.json index cfaa1c28bb7..21f466bc418 100644 --- a/spec/fixtures/api/schemas/public_api/v4/project_repository_storage_move.json +++ b/spec/fixtures/api/schemas/public_api/v4/project_repository_storage_move.json @@ -8,13 +8,32 @@ "destination_storage_name", "project" ], - "properties" : { - "id": { "type": "integer" }, - "created_at": { "type": "string", "format": "date-time" }, - "state": { "type": "string" }, - "source_storage_name": { "type": "string" }, - "destination_storage_name": { "type": "string" }, - "project": { "type": "object" } + "properties": { + "id": { + "type": "integer" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "state": { + "type": "string" + }, + "source_storage_name": { + "type": "string" + }, + "destination_storage_name": { + "type": "string" + }, + "error_message": { + "type": [ + "string", + "null" + ] + }, + "project": { + "type": "object" + } }, "additionalProperties": false } diff --git a/spec/fixtures/api/schemas/public_api/v4/snippet_repository_storage_move.json b/spec/fixtures/api/schemas/public_api/v4/snippet_repository_storage_move.json index b0633a6ff2d..65494e27f5c 100644 --- a/spec/fixtures/api/schemas/public_api/v4/snippet_repository_storage_move.json +++ b/spec/fixtures/api/schemas/public_api/v4/snippet_repository_storage_move.json @@ -8,13 +8,32 @@ "destination_storage_name", "snippet" ], - "properties" : { - "id": { "type": "integer" }, - "created_at": { "type": "string", "format": "date-time" }, - "state": { "type": "string" }, - "source_storage_name": { "type": "string" }, - "destination_storage_name": { "type": "string" }, - "snippet": { "type": "object" } + "properties": { + "id": { + "type": "integer" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "state": { + "type": "string" + }, + "source_storage_name": { + "type": "string" + }, + "destination_storage_name": { + "type": "string" + }, + "error_message": { + "type": [ + "string", + "null" + ] + }, + "snippet": { + "type": "object" + } }, "additionalProperties": false } |