code: function loadSpecification(defPath, data) {
    const resolvedPath = path.resolve(defPath);
  
    const extName = path.extname(resolvedPath);
    const loader = LOADERS[extName];
  
    // Check whether the definition file is actually a usable file
    if (loader === undefined) {
      throw new Error('Definition file should be .js, .json, .yml or .yaml');
    }
  
    const swaggerDefinition = loader(data, resolvedPath);
    return swaggerDefinition;
  }
docs: Get an object of the definition file configuration.