Commit 44833dfa authored by Mikolaj Wawrzyniak's avatar Mikolaj Wawrzyniak

Add metric name suggestion to json schema

Update metric defnition json schema to include name attribute, and
apply validation that asserts that prompts has been resolved.
parent 4223146f
......@@ -5,6 +5,10 @@
"key_path": {
"type": "string"
},
"name": {
"type": ["string", "null"],
"pattern": "^([a-z]+_)*[a-z]+$"
},
"description": {
"type": "string"
},
......
......@@ -16,7 +16,8 @@ RSpec.describe Gitlab::Usage::MetricDefinition do
time_frame: 'none',
data_source: 'database',
distribution: %w(ee ce),
tier: %w(free starter premium ultimate bronze silver gold)
tier: %w(free starter premium ultimate bronze silver gold),
name: 'count_boards'
}
end
......@@ -53,6 +54,7 @@ RSpec.describe Gitlab::Usage::MetricDefinition do
:distribution | nil
:distribution | 'test'
:tier | %w(test ee)
:name | 'count_<adjective_describing>_boards'
end
with_them do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment