code: function validateSpec (api) {
    if (api.openapi) {
      // We don't (yet) support validating against the OpenAPI spec
      return;
    }
  
    var paths = Object.keys(api.paths || {});
    var operationIds = [];
    paths.forEach(function (pathName) {
      var path = api.paths[pathName];
      var pathId = "/paths" + pathName;
  
      if (path && pathName.indexOf("/") === 0) {
        validatePath(api, path, pathId, operationIds);
      }
    });
    var definitions = Object.keys(api.definitions || {});
    definitions.forEach(function (definitionName) {
      var definition = api.definitions[definitionName];
      var definitionId = "/definitions/" + definitionName;
      validateRequiredPropertiesExist(definition, definitionId);
    });
  }
docs: Validates parts of the Swagger 2.0 spec that aren't covered by the Swagger 2.0 JSON Schema.
  
  @param {SwaggerObject} api