diff options
Diffstat (limited to 'spec/fixtures/lib/gitlab/metrics/dashboard/schemas')
7 files changed, 65 insertions, 2 deletions
diff --git a/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/custom_variable_full_syntax.json b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/custom_variable_full_syntax.json new file mode 100644 index 00000000000..e251e59de29 --- /dev/null +++ b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/custom_variable_full_syntax.json @@ -0,0 +1,12 @@ +{ + "type": "object", + "required": [ + "type", "options" + ], + "properties": { + "type": { "enum": ["custom"] }, + "label": { "type": "string" }, + "options": { "$ref": "custom_variable_options.json" } + }, + "additionalProperties": false +} diff --git a/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/custom_variable_options.json b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/custom_variable_options.json new file mode 100644 index 00000000000..f351d3ba340 --- /dev/null +++ b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/custom_variable_options.json @@ -0,0 +1,11 @@ +{ + "type": "object", + "required": ["values"], + "properties": { + "values": { + "type": "array", + "items": { "$ref": "custom_variable_values.json" } + } + }, + "additionalProperties": false +} diff --git a/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/custom_variable_values.json b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/custom_variable_values.json new file mode 100644 index 00000000000..430d66a9691 --- /dev/null +++ b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/custom_variable_values.json @@ -0,0 +1,10 @@ +{ + "type": "object", + "required": ["value"], + "properties": { + "value": { "type": "string" }, + "text": { "type": "string" }, + "default": { "type": "boolean" } + }, + "additionalProperties": false +} diff --git a/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/metric_label_values_variable_full_syntax.json b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/metric_label_values_variable_full_syntax.json new file mode 100644 index 00000000000..6eb2c0e51e2 --- /dev/null +++ b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/metric_label_values_variable_full_syntax.json @@ -0,0 +1,12 @@ +{ + "type": "object", + "required": [ + "type", "options" + ], + "properties": { + "type": { "enum": "metric_label_values" }, + "label": { "type": "string" }, + "options": { "$ref": "metric_label_values_variable_options.json" } + }, + "additionalProperties": false +} diff --git a/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/metric_label_values_variable_options.json b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/metric_label_values_variable_options.json new file mode 100644 index 00000000000..304372ed876 --- /dev/null +++ b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/metric_label_values_variable_options.json @@ -0,0 +1,12 @@ +{ + "type": "object", + "required": [ + "series_selector", "label", "prometheus_endpoint_path" + ], + "properties": { + "series_selector": { "type": "string" }, + "label": { "type": "string" }, + "prometheus_endpoint_path": { "type": "string" } + }, + "additionalProperties": false +} diff --git a/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/text_variable_full_syntax.json b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/text_variable_full_syntax.json index f5090dc8c88..1818b2775f0 100644 --- a/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/text_variable_full_syntax.json +++ b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/text_variable_full_syntax.json @@ -4,7 +4,7 @@ "type", "options" ], "properties": { - "type": { "type": "string" }, + "type": { "enum": ["text"] }, "label": { "type": "string" }, "options": { "$ref": "text_variable_options.json" } }, diff --git a/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/variables.json b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/variables.json index f3e0dd555a6..aec129111e0 100644 --- a/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/variables.json +++ b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/variables.json @@ -4,7 +4,13 @@ "^[a-zA-Z0-9_]*$": { "anyOf": [ { "$ref": "text_variable_full_syntax.json" }, - { "type": "string" } + { "type": "string" }, + { + "type": "array", + "items": { "type": "string" } + }, + { "$ref": "custom_variable_full_syntax.json" }, + { "$ref": "metric_label_values_variable_full_syntax.json" } ] } }, |