Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-01-30 04:01:53 +0300
committerMatija Čupić <matteeyah@gmail.com>2018-02-05 20:58:19 +0300
commit9be519c199b01d4b4b1c69ec4d74a1e99345eb47 (patch)
tree117f601dda66d48671a3e83b7ed93f8a00c72805 /app/serializers
parentb48d8c8ad0bb2874db6b4c9accb3bebd19e9f2c8 (diff)
Add VariableSerializer for Ci::Variable
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/variable_entity.rb7
-rw-r--r--app/serializers/variable_serializer.rb3
2 files changed, 10 insertions, 0 deletions
diff --git a/app/serializers/variable_entity.rb b/app/serializers/variable_entity.rb
new file mode 100644
index 00000000000..d576745c073
--- /dev/null
+++ b/app/serializers/variable_entity.rb
@@ -0,0 +1,7 @@
+class VariableEntity < Grape::Entity
+ expose :id
+ expose :key
+ expose :value
+
+ expose :protected?, as: :protected
+end
diff --git a/app/serializers/variable_serializer.rb b/app/serializers/variable_serializer.rb
new file mode 100644
index 00000000000..32ae82ab51c
--- /dev/null
+++ b/app/serializers/variable_serializer.rb
@@ -0,0 +1,3 @@
+class VariableSerializer < BaseSerializer
+ entity VariableEntity
+end