Commit e75c0582 authored by Furkan Ayhan's avatar Furkan Ayhan

Add variable_type attribute to Variable serializer

parent b5ac9eb4
...@@ -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