Commit 0f37cc60 authored by Kerri Miller's avatar Kerri Miller

Merge branch 'mwaw/add_validation_of_metric_names' into 'master'

Add metric name suggestion to json schema

See merge request gitlab-org/gitlab!58287
parents c11b675f 44833dfa
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
"key_path": { "key_path": {
"type": "string" "type": "string"
}, },
"name": {
"type": ["string", "null"],
"pattern": "^([a-z]+_)*[a-z]+$"
},
"description": { "description": {
"type": "string" "type": "string"
}, },
......
...@@ -16,7 +16,8 @@ RSpec.describe Gitlab::Usage::MetricDefinition do ...@@ -16,7 +16,8 @@ RSpec.describe Gitlab::Usage::MetricDefinition do
time_frame: 'none', time_frame: 'none',
data_source: 'database', data_source: 'database',
distribution: %w(ee ce), 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 end
...@@ -53,6 +54,7 @@ RSpec.describe Gitlab::Usage::MetricDefinition do ...@@ -53,6 +54,7 @@ RSpec.describe Gitlab::Usage::MetricDefinition do
:distribution | nil :distribution | nil
:distribution | 'test' :distribution | 'test'
:tier | %w(test ee) :tier | %w(test ee)
:name | 'count_<adjective_describing>_boards'
end end
with_them do 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