diff --git a/devops-service/app/api2/parsers/stack.rb b/devops-service/app/api2/parsers/stack.rb index de1ee1c..ef1df79 100644 --- a/devops-service/app/api2/parsers/stack.rb +++ b/devops-service/app/api2/parsers/stack.rb @@ -11,6 +11,10 @@ module Devops env_name = check_string(@body["deploy_env"], "Parameter 'deploy_env' must be a not empty string") check_string(@body["name"], "Parameter 'name' must be a not empty string", true, false) list = check_array(@body["run_list"], "Parameter 'run_list' is invalid, it should be not empty array of strings", String, true, true) + check_param(@body['launch_options'], Hash, "Parameter 'launch_options' should be a hash with 'without_bootstrap' and 'skip_rollback' keys") + if !@body['launch_options'].key?('without_bootstrap') || !@body['launch_options'].key?('skip_rollback') + raise Devops::ValidationError.new("Parameter 'launch_options' should contain 'without_bootstrap' and 'skip_rollback' keys") + end Validators::Helpers::RunList.new(list).validate! unless list.nil? @body end