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 ...@@ -4,6 +4,7 @@ class VariableEntity < Grape::Entity
expose :id expose :id
expose :key expose :key
expose :value expose :value
expose :variable_type
expose :protected?, as: :protected expose :protected?, as: :protected
expose :masked?, as: :masked expose :masked?, as: :masked
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
"value": { "type": "string" }, "value": { "type": "string" },
"masked": { "type": "boolean" }, "masked": { "type": "boolean" },
"protected": { "type": "boolean" }, "protected": { "type": "boolean" },
"variable_type": { "type": "string" },
"environment_scope": { "type": "string", "optional": true } "environment_scope": { "type": "string", "optional": true }
}, },
"additionalProperties": false "additionalProperties": false
......
...@@ -10,7 +10,7 @@ describe VariableEntity do ...@@ -10,7 +10,7 @@ describe VariableEntity do
subject { entity.as_json } subject { entity.as_json }
it 'contains required fields' do 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 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