Commit 5db335de authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'fix-unleash-strategies' into 'master'

Add missing unleash strategy required by some clients

See merge request gitlab-org/gitlab-ee!7813
parents 0ca85e61 f718fa62
......@@ -16,5 +16,11 @@ module Operations
validates :description, allow_blank: true, length: 0..255
scope :ordered, -> { order(:name) }
def strategies
[
{ name: 'default' }
]
end
end
end
......@@ -432,6 +432,7 @@ module EE
expose :name
expose :description, unless: ->(feature) { feature.description.nil? }
expose :active, as: :enabled
expose :strategies
end
class UnleashFeatures < Grape::Entity
......
......@@ -3,7 +3,8 @@
"additionalProperties": false,
"required": [
"name",
"enabled"
"enabled",
"strategies"
],
"properties": {
"name": {
......@@ -14,6 +15,13 @@
},
"description": {
"type": "string"
},
"strategies": {
"items": {
"$ref": "unleash_strategy.json"
},
"minItems": 1,
"type": "array"
}
}
}
{
"type": "object",
"additionalProperties": false,
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
}
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