diff options
author | Marcia Ramos <virtua.creative@gmail.com> | 2019-04-10 17:05:46 +0100 |
---|---|---|
committer | Marcia Ramos <virtua.creative@gmail.com> | 2019-04-10 17:05:46 +0100 |
commit | cbd6841cac8185f181a5dcec33704f6e7c040732 (patch) | |
tree | 423bbc4fb873ab51590d0be4ae594769c80b739b /spec/fixtures/api | |
parent | 3402f8c817e9798eed9d86555f3f85fd10f49abf (diff) | |
parent | 490b31f740d23b54a62588cd9fd0e0cf7fdd9370 (diff) | |
download | gitlab-ce-docs-pages-intro.tar.gz |
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into docs-pages-introdocs-pages-intro
Diffstat (limited to 'spec/fixtures/api')
10 files changed, 276 insertions, 6 deletions
diff --git a/spec/fixtures/api/graphql/introspection.graphql b/spec/fixtures/api/graphql/introspection.graphql new file mode 100644 index 00000000000..7b712068fcd --- /dev/null +++ b/spec/fixtures/api/graphql/introspection.graphql @@ -0,0 +1,92 @@ +# pulled from GraphiQL query +query IntrospectionQuery { + __schema { + queryType { name } + mutationType { name } + subscriptionType { name } + types { + ...FullType + } + directives { + name + description + locations + args { + ...InputValue + } + } + } +} + +fragment FullType on __Type { + kind + name + description + fields(includeDeprecated: true) { + name + description + args { + ...InputValue + } + type { + ...TypeRef + } + isDeprecated + deprecationReason + } + inputFields { + ...InputValue + } + interfaces { + ...TypeRef + } + enumValues(includeDeprecated: true) { + name + description + isDeprecated + deprecationReason + } + possibleTypes { + ...TypeRef + } +} + +fragment InputValue on __InputValue { + name + description + type { ...TypeRef } + defaultValue +} + +fragment TypeRef on __Type { + kind + name + ofType { + kind + name + ofType { + kind + name + ofType { + kind + name + ofType { + kind + name + ofType { + kind + name + ofType { + kind + name + ofType { + kind + name + } + } + } + } + } + } + } +} diff --git a/spec/fixtures/api/schemas/entities/issue_board.json b/spec/fixtures/api/schemas/entities/issue_board.json index f7b270ffa8d..7cb65e1f2f5 100644 --- a/spec/fixtures/api/schemas/entities/issue_board.json +++ b/spec/fixtures/api/schemas/entities/issue_board.json @@ -9,6 +9,9 @@ "project_id": { "type": "integer" }, "relative_position": { "type": ["integer", "null"] }, "time_estimate": { "type": "integer" }, + "total_time_spent": { "type": "integer" }, + "human_time_estimate": { "type": ["string", "null"] }, + "human_total_time_spent": { "type": ["string", "null"] }, "weight": { "type": ["integer", "null"] }, "project": { "type": "object", diff --git a/spec/fixtures/api/schemas/entities/merge_request_basic.json b/spec/fixtures/api/schemas/entities/merge_request_basic.json index 3006b482d41..88a600398b1 100644 --- a/spec/fixtures/api/schemas/entities/merge_request_basic.json +++ b/spec/fixtures/api/schemas/entities/merge_request_basic.json @@ -6,14 +6,14 @@ "source_branch_exists": { "type": "boolean" }, "merge_error": { "type": ["string", "null"] }, "rebase_in_progress": { "type": "boolean" }, - "assignee_id": { "type": ["integer", "null"] }, "allow_collaboration": { "type": "boolean"}, "allow_maintainer_to_push": { "type": "boolean"}, - "assignee": { - "oneOf": [ - { "type": "null" }, - { "$ref": "user.json" } - ] + "assignees": { + "type": ["array"], + "items": { + "type": "object", + "$ref": "../public_api/v4/user/basic.json" + } }, "milestone": { "type": [ "object", "null" ] diff --git a/spec/fixtures/api/schemas/public_api/v4/artifact.json b/spec/fixtures/api/schemas/public_api/v4/artifact.json new file mode 100644 index 00000000000..9df957b1498 --- /dev/null +++ b/spec/fixtures/api/schemas/public_api/v4/artifact.json @@ -0,0 +1,16 @@ +{ + "type": "object", + "required": [ + "file_type", + "size", + "filename", + "file_format" + ], + "properties": { + "file_type": { "type": "string"}, + "size": { "type": "integer"}, + "filename": { "type": "string"}, + "file_format": { "type": "string"} + }, + "additionalProperties": false +} diff --git a/spec/fixtures/api/schemas/public_api/v4/artifact_file.json b/spec/fixtures/api/schemas/public_api/v4/artifact_file.json new file mode 100644 index 00000000000..4017e6bdabc --- /dev/null +++ b/spec/fixtures/api/schemas/public_api/v4/artifact_file.json @@ -0,0 +1,12 @@ +{ + "type": "object", + "required": [ + "filename", + "size" + ], + "properties": { + "filename": { "type": "string"}, + "size": { "type": "integer"} + }, + "additionalProperties": false +} diff --git a/spec/fixtures/api/schemas/public_api/v4/deployment.json b/spec/fixtures/api/schemas/public_api/v4/deployment.json new file mode 100644 index 00000000000..3af2dc27d55 --- /dev/null +++ b/spec/fixtures/api/schemas/public_api/v4/deployment.json @@ -0,0 +1,32 @@ +{ + "type": "object", + "required": [ + "id", + "iid", + "ref", + "sha", + "created_at", + "user", + "deployable" + ], + "properties": { + "id": { "type": "integer" }, + "iid": { "type": "integer" }, + "ref": { "type": "string" }, + "sha": { "type": "string" }, + "created_at": { "type": "string" }, + "user": { + "oneOf": [ + { "type": "null" }, + { "$ref": "user/basic.json" } + ] + }, + "deployable": { + "oneOf": [ + { "type": "null" }, + { "$ref": "job.json" } + ] + } + }, + "additionalProperties": false +} diff --git a/spec/fixtures/api/schemas/public_api/v4/environment.json b/spec/fixtures/api/schemas/public_api/v4/environment.json new file mode 100644 index 00000000000..242e90fb7ac --- /dev/null +++ b/spec/fixtures/api/schemas/public_api/v4/environment.json @@ -0,0 +1,23 @@ +{ + "type": "object", + "required": [ + "id", + "name", + "slug", + "external_url", + "last_deployment" + ], + "properties": { + "id": { "type": "integer" }, + "name": { "type": "string" }, + "slug": { "type": "string" }, + "external_url": { "$ref": "../../types/nullable_string.json" }, + "last_deployment": { + "oneOf": [ + { "type": "null" }, + { "$ref": "deployment.json" } + ] + } + }, + "additionalProperties": false +} diff --git a/spec/fixtures/api/schemas/public_api/v4/job.json b/spec/fixtures/api/schemas/public_api/v4/job.json new file mode 100644 index 00000000000..454935422a0 --- /dev/null +++ b/spec/fixtures/api/schemas/public_api/v4/job.json @@ -0,0 +1,63 @@ +{ + "type": "object", + "required": [ + "id", + "status", + "stage", + "name", + "ref", + "tag", + "coverage", + "created_at", + "started_at", + "finished_at", + "duration", + "user", + "commit", + "pipeline", + "web_url", + "artifacts", + "artifacts_expire_at", + "runner" + ], + "properties": { + "id": { "type": "integer" }, + "status": { "type": "string" }, + "stage": { "type": "string" }, + "name": { "type": "string" }, + "ref": { "type": "string" }, + "tag": { "type": "boolean" }, + "coverage": { "type": ["number", "null"] }, + "created_at": { "type": "string" }, + "started_at": { "type": ["null", "string"] }, + "finished_at": { "type": ["null", "string"] }, + "duration": { "type": ["null", "number"] }, + "user": { "$ref": "user/basic.json" }, + "commit": { + "oneOf": [ + { "type": "null" }, + { "$ref": "commit/basic.json" } + ] + }, + "pipeline": { "$ref": "pipeline/basic.json" }, + "web_url": { "type": "string" }, + "artifacts": { + "type": "array", + "items": { "$ref": "artifact.json" } + }, + "artifacts_file": { + "oneOf": [ + { "type": "null" }, + { "$ref": "artifact_file.json" } + ] + }, + "artifacts_expire_at": { "type": ["null", "string"] }, + "runner": { + "oneOf": [ + { "type": "null" }, + { "$ref": "runner.json" } + ] + } + }, + "additionalProperties":false +} 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 918f2c4b47d..a423bf70b69 100644 --- a/spec/fixtures/api/schemas/public_api/v4/merge_request.json +++ b/spec/fixtures/api/schemas/public_api/v4/merge_request.json @@ -64,6 +64,11 @@ }, "additionalProperties": false }, + "assignees": { + "items": { + "$ref": "./merge_request.json" + } + }, "source_project_id": { "type": "integer" }, "target_project_id": { "type": "integer" }, "labels": { diff --git a/spec/fixtures/api/schemas/public_api/v4/runner.json b/spec/fixtures/api/schemas/public_api/v4/runner.json new file mode 100644 index 00000000000..d97d74a93f2 --- /dev/null +++ b/spec/fixtures/api/schemas/public_api/v4/runner.json @@ -0,0 +1,24 @@ +{ + "type": "object", + "required": [ + "id", + "description", + "ip_address", + "active", + "is_shared", + "name", + "online", + "status" + ], + "properties": { + "id": { "type": "integer" }, + "description": { "type": "string" }, + "ip_address": { "type": "string" }, + "active": { "type": "boolean" }, + "is_shared": { "type": "boolean" }, + "name": { "type": ["null", "string"] }, + "online": { "type": "boolean" }, + "status": { "type": "string" } + }, + "additionalProperties": false +} |