Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f718fa62
Commit
f718fa62
authored
Oct 05, 2018
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing unleash strategy required by some clients
parent
89bcbdca
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
1 deletion
+28
-1
ee/app/models/operations/feature_flag.rb
ee/app/models/operations/feature_flag.rb
+6
-0
ee/lib/ee/api/entities.rb
ee/lib/ee/api/entities.rb
+1
-0
ee/spec/fixtures/api/schemas/unleash/unleash_feature.json
ee/spec/fixtures/api/schemas/unleash/unleash_feature.json
+9
-1
ee/spec/fixtures/api/schemas/unleash/unleash_strategy.json
ee/spec/fixtures/api/schemas/unleash/unleash_strategy.json
+12
-0
No files found.
ee/app/models/operations/feature_flag.rb
View file @
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
ee/lib/ee/api/entities.rb
View file @
f718fa62
...
...
@@ -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
...
...
ee/spec/fixtures/api/schemas/unleash/unleash_feature.json
View file @
f718fa62
...
...
@@ -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"
}
}
}
ee/spec/fixtures/api/schemas/unleash/unleash_strategy.json
0 → 100644
View file @
f718fa62
{
"type"
:
"object"
,
"additionalProperties"
:
false
,
"required"
:
[
"name"
],
"properties"
:
{
"name"
:
{
"type"
:
"string"
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment