summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrpereira2 <rpereira@gitlab.com>2019-04-17 15:35:11 +0530
committersyasonik <syasonik@gitlab.com>2019-04-24 18:23:03 +0800
commitf029c3dd39a5b74c50bb9804a7f175b48cda0305 (patch)
treeff2081c354a02f604b27ec7af5af4ad445921241
parentc2818d6b23543f288db3ae5464c3f3b473522836 (diff)
downloadgitlab-ce-f029c3dd39a5b74c50bb9804a7f175b48cda0305.tar.gz
Make query or query_range required in metrics
Either the query or query_range attribute needs to be present in the metrics yml. The yml is invalid if both are present or neither is present.
-rw-r--r--spec/fixtures/lib/gitlab/metrics_dashboard/schemas/metrics.json4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/fixtures/lib/gitlab/metrics_dashboard/schemas/metrics.json b/spec/fixtures/lib/gitlab/metrics_dashboard/schemas/metrics.json
index 4da1004dedd..2d0af57ec2c 100644
--- a/spec/fixtures/lib/gitlab/metrics_dashboard/schemas/metrics.json
+++ b/spec/fixtures/lib/gitlab/metrics_dashboard/schemas/metrics.json
@@ -4,6 +4,10 @@
"unit",
"label"
],
+ "oneOf": [
+ { "required": ["query"] },
+ { "required": ["query_range"] }
+ ],
"properties": {
"id": { "type": "string" },
"query_range": { "type": "string" },