Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Leitzen <pleitzen@gitlab.com>2018-10-10 12:43:02 +0300
committerPeter Leitzen <pleitzen@gitlab.com>2018-10-10 16:59:02 +0300
commit99a38a73a3f1f8d817e43c96ff20337a6832cc21 (patch)
treedf622f09039f469a9de8d1758489887454d8f5d6 /spec/fixtures
parent75723034cee27d387d7ac7edb88d1520bb3a6b7b (diff)
Enhance and test JSON schema for deployments
Diffstat (limited to 'spec/fixtures')
-rw-r--r--spec/fixtures/api/schemas/deployment.json27
-rw-r--r--spec/fixtures/api/schemas/entities/commit.json5
2 files changed, 27 insertions, 5 deletions
diff --git a/spec/fixtures/api/schemas/deployment.json b/spec/fixtures/api/schemas/deployment.json
index 8c8cdf8bcb2..44835386cfc 100644
--- a/spec/fixtures/api/schemas/deployment.json
+++ b/spec/fixtures/api/schemas/deployment.json
@@ -20,12 +20,35 @@
"name"
],
"properties": {
- "name": { "type": "string" }
+ "name": { "type": "string" },
+ "ref_path": { "type": "string" }
},
"additionalProperties": false
},
"sha": { "type": "string" },
- "tag": { "type": "boolean" }
+ "tag": { "type": "boolean" },
+ "user": {
+ "oneOf": [
+ { "type": "null" },
+ { "$ref": "entities/user.json" }
+ ]
+ },
+ "commit": {
+ "oneOf": [
+ { "type": "null" },
+ { "$ref": "entities/commit.json" }
+ ]
+ },
+ "deployable": {
+ "oneOf": [
+ { "type": "null" },
+ { "$ref": "job/job.json" }
+ ]
+ },
+ "manual_actions": {
+ "type": "array",
+ "items": { "$ref": "job/job.json" }
+ }
},
"additionalProperties": false
}
diff --git a/spec/fixtures/api/schemas/entities/commit.json b/spec/fixtures/api/schemas/entities/commit.json
index 686d29c97d2..324702e3f94 100644
--- a/spec/fixtures/api/schemas/entities/commit.json
+++ b/spec/fixtures/api/schemas/entities/commit.json
@@ -17,11 +17,10 @@
"author": {
"oneOf": [
{ "type": "null" },
- { "type": "user.json" }
+ { "$ref": "user.json" }
]
}
- },
- "additionalProperties": false
+ }
}
]
}