summaryrefslogtreecommitdiff
path: root/spec/fixtures
diff options
context:
space:
mode:
authorSteve Azzopardi <steveazz@outlook.com>2018-09-04 09:51:00 +0200
committerSteve Azzopardi <steveazz@outlook.com>2018-09-12 11:00:39 +0200
commit1b388c798b01d950ad8692e34938a2a457c6ad0f (patch)
tree96471170bf1da744b6c043212a78c09df768a17d /spec/fixtures
parentf87809f78de9da04f38134ba5ce0cf9ddebf2f63 (diff)
downloadgitlab-ce-1b388c798b01d950ad8692e34938a2a457c6ad0f.tar.gz
Add trigger information for job API
Create new entity called TriggerVariablesEnitity for trigger variables, to aid reuseablity in the future. Update JSON schema to include trigger information in the response. Refactor rspec tests a bit to reduce duplication and for the `context` to make sense. closes https://gitlab.com/gitlab-org/gitlab-ce/issues/50989
Diffstat (limited to 'spec/fixtures')
-rw-r--r--spec/fixtures/api/schemas/job/job_details.json7
-rw-r--r--spec/fixtures/api/schemas/job/trigger.json28
2 files changed, 33 insertions, 2 deletions
diff --git a/spec/fixtures/api/schemas/job/job_details.json b/spec/fixtures/api/schemas/job/job_details.json
index b8c099250be..b82f7413b50 100644
--- a/spec/fixtures/api/schemas/job/job_details.json
+++ b/spec/fixtures/api/schemas/job/job_details.json
@@ -1,8 +1,11 @@
{
- "allOf": [{ "$ref": "job.json" }],
+ "allOf": [
+ { "$ref": "job.json" }
+ ],
"description": "An extension of job.json with more detailed information",
"properties": {
"artifact": { "$ref": "artifact.json" },
- "terminal_path": { "type": "string" }
+ "terminal_path": { "type": "string" },
+ "trigger": { "$ref": "trigger.json" }
}
}
diff --git a/spec/fixtures/api/schemas/job/trigger.json b/spec/fixtures/api/schemas/job/trigger.json
new file mode 100644
index 00000000000..1c7e9cc7693
--- /dev/null
+++ b/spec/fixtures/api/schemas/job/trigger.json
@@ -0,0 +1,28 @@
+{
+ "type": "object",
+ "required": [
+ "short_token",
+ "variables"
+ ],
+ "properties": {
+ "short_token": { "type": "string" },
+ "variables": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "key",
+ "value",
+ "public"
+ ],
+ "properties": {
+ "key": { "type": "string" },
+ "value": { "type": "string" },
+ "public": { "type": "boolean" }
+ },
+ "additionalProperties": false
+ }
+ }
+ },
+ "additionalProperties": false
+}