fn validate_spec(spec: &FunctionSpec, index: usize) -> Result<(), SchemaError>
Validate a function specification.