{
  "version": 3,
  "sources": ["../../src/utils/dereference.ts"],
  "sourcesContent": ["import type { AnyApiDefinitionFormat, DereferenceResult, Filesystem } from '@/types/index'\n\nimport { details } from './details'\nimport { getEntrypoint } from './get-entrypoint'\nimport { makeFilesystem } from './make-filesystem'\nimport { type ResolveReferencesOptions, resolveReferences } from './resolve-references'\n\nexport type DereferenceOptions = ResolveReferencesOptions\n\n/**\n * Dereferences an API definition or filesystem by resolving all references within the specification.\n *\n * @param value - The API definition or filesystem to dereference.\\\n *                Can be any supported API definition format or a filesystem object.\n *\n * @param options - Optional options for the dereferencing process.\n */\nexport function dereference(\n  value: AnyApiDefinitionFormat | Filesystem,\n  options?: DereferenceOptions,\n): DereferenceResult {\n  const filesystem = makeFilesystem(value)\n\n  const entrypoint = getEntrypoint(filesystem)\n  const result = resolveReferences(filesystem, options)\n\n  return {\n    specification: entrypoint.specification,\n    errors: result.errors,\n    schema: result.schema,\n    ...details(entrypoint.specification),\n  }\n}\n"],
  "mappings": "AAEA,SAAS,eAAe;AACxB,SAAS,qBAAqB;AAC9B,SAAS,sBAAsB;AAC/B,SAAwC,yBAAyB;AAY1D,SAAS,YACd,OACA,SACmB;AACnB,QAAM,aAAa,eAAe,KAAK;AAEvC,QAAM,aAAa,cAAc,UAAU;AAC3C,QAAM,SAAS,kBAAkB,YAAY,OAAO;AAEpD,SAAO;AAAA,IACL,eAAe,WAAW;AAAA,IAC1B,QAAQ,OAAO;AAAA,IACf,QAAQ,OAAO;AAAA,IACf,GAAG,QAAQ,WAAW,aAAa;AAAA,EACrC;AACF;",
  "names": []
}
