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
e75c0582
Commit
e75c0582
authored
Jan 28, 2020
by
Furkan Ayhan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add variable_type attribute to Variable serializer
parent
b5ac9eb4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
1 deletion
+3
-1
app/serializers/variable_entity.rb
app/serializers/variable_entity.rb
+1
-0
spec/fixtures/api/schemas/variable.json
spec/fixtures/api/schemas/variable.json
+1
-0
spec/serializers/variable_entity_spec.rb
spec/serializers/variable_entity_spec.rb
+1
-1
No files found.
app/serializers/variable_entity.rb
View file @
e75c0582
...
...
@@ -4,6 +4,7 @@ class VariableEntity < Grape::Entity
expose
:id
expose
:key
expose
:value
expose
:variable_type
expose
:protected?
,
as: :protected
expose
:masked?
,
as: :masked
...
...
spec/fixtures/api/schemas/variable.json
View file @
e75c0582
...
...
@@ -13,6 +13,7 @@
"value"
:
{
"type"
:
"string"
},
"masked"
:
{
"type"
:
"boolean"
},
"protected"
:
{
"type"
:
"boolean"
},
"variable_type"
:
{
"type"
:
"string"
},
"environment_scope"
:
{
"type"
:
"string"
,
"optional"
:
true
}
},
"additionalProperties"
:
false
...
...
spec/serializers/variable_entity_spec.rb
View file @
e75c0582
...
...
@@ -10,7 +10,7 @@ describe VariableEntity do
subject
{
entity
.
as_json
}
it
'contains required fields'
do
expect
(
subject
).
to
include
(
:id
,
:key
,
:value
,
:protected
,
:environment_scope
)
expect
(
subject
).
to
include
(
:id
,
:key
,
:value
,
:protected
,
:environment_scope
,
:variable_type
)
end
end
end
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