diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-09-04 08:08:43 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-09-04 08:08:43 +0000 |
commit | 05ee94beb70a2969b85563a0c41bf5afe48a3699 (patch) | |
tree | 5a575fa48d6e39633272602f50ab9b33977e9f7d /spec/fixtures | |
parent | 8ff02cf7c43b7f7a2f5ca46aa678cfce67eab39b (diff) | |
parent | 71433c5525c68bbf25f171e760e3817af7f217d4 (diff) | |
download | gitlab-ce-05ee94beb70a2969b85563a0c41bf5afe48a3699.tar.gz |
Merge branch '50101-add-artifact-information-to-job-api' into 'master'
Add artifact information in job API
See merge request gitlab-org/gitlab-ce!21328
Diffstat (limited to 'spec/fixtures')
-rw-r--r-- | spec/fixtures/api/schemas/ci_detailed_status.json | 24 | ||||
-rw-r--r-- | spec/fixtures/api/schemas/http_method.json | 5 | ||||
-rw-r--r-- | spec/fixtures/api/schemas/job/artifact.json | 11 | ||||
-rw-r--r-- | spec/fixtures/api/schemas/job/job.json (renamed from spec/fixtures/api/schemas/job.json) | 13 | ||||
-rw-r--r-- | spec/fixtures/api/schemas/job/job_details.json | 7 | ||||
-rw-r--r-- | spec/fixtures/api/schemas/pipeline_stage.json | 2 |
6 files changed, 57 insertions, 5 deletions
diff --git a/spec/fixtures/api/schemas/ci_detailed_status.json b/spec/fixtures/api/schemas/ci_detailed_status.json index 01e34249bf1..d74248eabef 100644 --- a/spec/fixtures/api/schemas/ci_detailed_status.json +++ b/spec/fixtures/api/schemas/ci_detailed_status.json @@ -18,7 +18,29 @@ "tooltip": { "type": "string" }, "has_details": { "type": "boolean" }, "details_path": { "type": "string" }, - "favicon": { "type": "string" } + "favicon": { "type": "string" }, + "action": { + "type": "object", + "required": [ + "icon", + "title", + "path", + "method" + ], + "properties": { + "icon": { + "type": "string", + "enum": [ + "retry", + "play", + "cancel" + ] + }, + "title": { "type": "string" }, + "path": { "type": "string" }, + "method": { "$ref": "http_method.json" } + } + } }, "additionalProperties": false } diff --git a/spec/fixtures/api/schemas/http_method.json b/spec/fixtures/api/schemas/http_method.json new file mode 100644 index 00000000000..c0f8acc5781 --- /dev/null +++ b/spec/fixtures/api/schemas/http_method.json @@ -0,0 +1,5 @@ +{ + "type": "string", + "description": "HTTP methods that the API can specify to send.", + "enum": [ "post", "get", "put", "patch" ] +} diff --git a/spec/fixtures/api/schemas/job/artifact.json b/spec/fixtures/api/schemas/job/artifact.json new file mode 100644 index 00000000000..1812e69fbd6 --- /dev/null +++ b/spec/fixtures/api/schemas/job/artifact.json @@ -0,0 +1,11 @@ +{ + "type": "object", + "properties": { + "download_path": { "type": "string"}, + "browse_path": { "type": "string"}, + "keep_path": { "type": "string"}, + "expired": { "type": "boolean" }, + "expire_at": { "type": "string", "format": "date-time" } + }, + "additionalProperties": false +} diff --git a/spec/fixtures/api/schemas/job.json b/spec/fixtures/api/schemas/job/job.json index 7b92ab25bc1..c793d93c0f6 100644 --- a/spec/fixtures/api/schemas/job.json +++ b/spec/fixtures/api/schemas/job/job.json @@ -1,4 +1,5 @@ { + "description": "Basic job information", "type": "object", "required": [ "id", @@ -13,12 +14,18 @@ "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, - "started": { "type": "boolean" } , + "started": { + "oneOf": [ + { "type": "string", "format": "date-time" }, + { "type": "boolean" } + ] + }, "build_path": { "type": "string" }, + "retry_path": { "type": "string" }, "playable": { "type": "boolean" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" }, - "status": { "$ref": "ci_detailed_status.json" } + "status": { "$ref": "../ci_detailed_status.json" } }, - "additionalProperties": false + "additionalProperties": true } diff --git a/spec/fixtures/api/schemas/job/job_details.json b/spec/fixtures/api/schemas/job/job_details.json new file mode 100644 index 00000000000..73eca83d788 --- /dev/null +++ b/spec/fixtures/api/schemas/job/job_details.json @@ -0,0 +1,7 @@ +{ + "allOf": [{ "$ref": "job.json" }], + "description": "An extension of job.json with more detailed information", + "properties": { + "artifact": { "$ref": "artifact.json" } + } +} diff --git a/spec/fixtures/api/schemas/pipeline_stage.json b/spec/fixtures/api/schemas/pipeline_stage.json index 55454200bb3..eb2667295f0 100644 --- a/spec/fixtures/api/schemas/pipeline_stage.json +++ b/spec/fixtures/api/schemas/pipeline_stage.json @@ -13,7 +13,7 @@ "groups": { "optional": true }, "latest_statuses": { "type": "array", - "items": { "$ref": "job.json" }, + "items": { "$ref": "job/job.json" }, "optional": true }, "status": { "$ref": "ci_detailed_status.json" }, |