def get_schema_for_action_parameters(action_db):
 from st2common.util.action_db import get_runnertype_by_name
 runner_type = get_runnertype_by_name(action_db.runner_type['name'])
 parameters_schema = {}
 deep_update(parameters_schema, runner_type.runner_parameters)
 deep_update(parameters_schema, action_db.parameters)
 runner_parameter_names = runner_type.runner_parameters.keys()
 for (name, schema) in six.iteritems(action_db.parameters):
  if (name not in runner_parameter_names):
   continue
  for (attribute, value) in six.iteritems(schema):
   runner_param_value = runner_type.runner_parameters[name].get(attribute)
   validate_runner_parameter_attribute_override(action_ref=action_db.ref, param_name=name, attr_name=attribute, runner_param_attr_value=runner_param_value, action_param_attr_value=value)
 schema = get_schema_for_resource_parameters(parameters_schema=parameters_schema)
 if parameters_schema:
  schema['title'] = action_db.name
  if action_db.description:
   schema['description'] = action_db.description
 return schema

def get_schema_for_action_parameters ( action_db ) : from st2common . util . action_db import get_runnertype_by_name runner_type = get_runnertype_by_name ( action_db . runner_type [ 'name' ] ) parameters_schema = { } deep_update ( parameters_schema , runner_type . runner_parameters ) deep_update ( parameters_schema , action_db . parameters ) runner_parameter_names = runner_type . runner_parameters . keys ( ) for ( name , schema ) in six . iteritems ( action_db . parameters ) : if ( name not in runner_parameter_names ) : continue for ( attribute , value ) in six . iteritems ( schema ) : runner_param_value = runner_type . runner_parameters [ name ] . get ( attribute ) validate_runner_parameter_attribute_override ( action_ref = action_db . ref , param_name = name , attr_name = attribute , runner_param_attr_value = runner_param_value , action_param_attr_value = value ) schema = get_schema_for_resource_parameters ( parameters_schema = parameters_schema ) if parameters_schema : schema [ 'title' ] = action_db . name if action_db . description : schema [ 'description' ] = action_db . description return schema
dynamically construct json schema for the provided action from the parameters metadata .