Commit cbe21d78 authored by Yorick Peterse's avatar Yorick Peterse

Backport parameters for API::Parameters

This backports the EE specific parameters for API::Parameters, wrapping
them in a conditional.
parent 449d2bb0
...@@ -55,6 +55,10 @@ module API ...@@ -55,6 +55,10 @@ module API
requires :key, type: String, desc: 'The key of the variable' requires :key, type: String, desc: 'The key of the variable'
requires :value, type: String, desc: 'The value of the variable' requires :value, type: String, desc: 'The value of the variable'
optional :protected, type: String, desc: 'Whether the variable is protected' optional :protected, type: String, desc: 'Whether the variable is protected'
if Gitlab.ee?
optional :environment_scope, type: String, desc: 'The environment_scope of the variable'
end
end end
post ':id/variables' do post ':id/variables' do
variable_params = declared_params(include_missing: false) variable_params = declared_params(include_missing: false)
...@@ -76,6 +80,10 @@ module API ...@@ -76,6 +80,10 @@ module API
optional :key, type: String, desc: 'The key of the variable' optional :key, type: String, desc: 'The key of the variable'
optional :value, type: String, desc: 'The value of the variable' optional :value, type: String, desc: 'The value of the variable'
optional :protected, type: String, desc: 'Whether the variable is protected' optional :protected, type: String, desc: 'Whether the variable is protected'
if Gitlab.ee?
optional :environment_scope, type: String, desc: 'The environment_scope of the variable'
end
end end
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
put ':id/variables/:key' do put ':id/variables/:key' do
......
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