Backport parameters for API::Parameters
This backports the EE specific parameters for API::Parameters, wrapping them in a conditional.
This commit is contained in:
parent
449d2bb0d8
commit
cbe21d78bf
|
@ -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
|
||||||
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
|
||||||
|
|
Loading…
Reference in New Issue