code: function isValidMethodSpec(methodSpec, methodName) {
    var valid = true;
    var printIgnoredMethodOnce = _.once(function() { console.log(methodName + ' from ' + path.basename(xml2js.opts.custom) + ' is omitted from JS documentation.'); });
    function checkRule(rule, errMsg) {
      if (!rule) {
        printIgnoredMethodOnce();
        console.log('  ' + errMsg);
        valid = false;
      }
    }
    checkRule(_.has(methodSpec, 'description'), 'no description given');
    checkRule(_.has(methodSpec, 'params'), 'no params given (specify "params": {} for no params)');
    _.each(methodSpec.params, function(paramSpec, paramName) {
      checkRule(_.has(paramSpec, 'type'), 'no type given for param ' + paramName);
      checkRule(_.has(paramSpec, 'description'), 'no description given for param ' + paramName);
    });
    checkRule(_.has(methodSpec, 'return'), 'no return given (specify "return": {} for no return value)');
    checkRule(_.has(methodSpec.return, 'type'), 'no type given for return value');
    checkRule(_.has(methodSpec.return, 'description'), 'no description given for return value');
    return valid;
  }
docs: verify that the json spec is well formatted