When I run...
civix generate:api foo bar
...civix generates the following code:
function _civicrm_api3_foo_Bar_spec(&$spec) {
$spec['magicword']['api.required'] = 1;
}
From this example, I can see how to make fields required when writing APIs. Cool. But what else can I do with this $spec
array? Can I set default values? Can I indicate what type of value to accept? Can I specify an array of valid values? Or a regex pattern to test for validity?
Really, I'm not looking for answers to those specific questions, I'm looking for a comprehensive list of everything I can type in place of 'api.required'
above (and an explanation of how each one works).