Commit a2242dfb authored by Robert Speicher's avatar Robert Speicher

Merge branch '198661-variable_type-to-serializer' into 'master'

Add variable_type attribute to Variable serializer

See merge request gitlab-org/gitlab!23843
parents 0c5304da 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
......
......@@ -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
......
......@@ -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
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