diff options
author | rpereira2 <rpereira@gitlab.com> | 2019-04-17 15:35:11 +0530 |
---|---|---|
committer | syasonik <syasonik@gitlab.com> | 2019-04-24 18:23:03 +0800 |
commit | f029c3dd39a5b74c50bb9804a7f175b48cda0305 (patch) | |
tree | ff2081c354a02f604b27ec7af5af4ad445921241 | |
parent | c2818d6b23543f288db3ae5464c3f3b473522836 (diff) | |
download | gitlab-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.json | 4 |
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" }, |