Commit f718fa62 authored by Kamil Trzciński's avatar Kamil Trzciński

Add missing unleash strategy required by some clients

parent 89bcbdca
...@@ -16,5 +16,11 @@ module Operations ...@@ -16,5 +16,11 @@ module Operations
validates :description, allow_blank: true, length: 0..255 validates :description, allow_blank: true, length: 0..255
scope :ordered, -> { order(:name) } scope :ordered, -> { order(:name) }
def strategies
[
{ name: 'default' }
]
end
end end
end end
...@@ -432,6 +432,7 @@ module EE ...@@ -432,6 +432,7 @@ module EE
expose :name expose :name
expose :description, unless: ->(feature) { feature.description.nil? } expose :description, unless: ->(feature) { feature.description.nil? }
expose :active, as: :enabled expose :active, as: :enabled
expose :strategies
end end
class UnleashFeatures < Grape::Entity class UnleashFeatures < Grape::Entity
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
"additionalProperties": false, "additionalProperties": false,
"required": [ "required": [
"name", "name",
"enabled" "enabled",
"strategies"
], ],
"properties": { "properties": {
"name": { "name": {
...@@ -14,6 +15,13 @@ ...@@ -14,6 +15,13 @@
}, },
"description": { "description": {
"type": "string" "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