MCPcopy Index your code
hub / github.com/dataease/SQLBot / dereferenceApiDOM

Function dereferenceApiDOM

frontend/public/swagger-ui-bundle.js:52490–52510  ·  view source on GitHub ↗
(s, o)

Source from the content-addressed store, hash-verified

52488 }
52489 const Ow = class DereferenceError extends Ko {}
52490 const Aw = class UnmatchedDereferenceStrategyError extends Ow {},
52491 dereferenceApiDOM = async (s, o) => {
52492 let i = s,
52493 a = !1
52494 if (!$u(s)) {
52495 const o = cloneShallow(s)
52496 ;(o.classes.push('result'), (i = new Au([o])), (a = !0))
52497 }
52498 const u = new xw({
52499 uri: o.resolve.baseURI,
52500 parseResult: i,
52501 mediaType: o.parse.mediaType,
52502 }),
52503 _ = await plugins_filter('canDereference', [u, o], o.dereference.strategies)
52504 if (gp(_)) throw new Aw(u.uri)
52505 try {
52506 const { result: s } = await run('dereference', [u, o], _)
52507 return a ? s.get(0) : s
52508 } catch (s) {
52509 throw new Ow(`Error while dereferencing file "${u.uri}"`, { cause: s })
52510 }
52511 }
52512 const Cw = class ParseError extends Ko {}
52513 const jw = class ParserError extends Cw {}

Callers 1

resolveOpenAPI31StrategyFunction · 0.85

Calls 7

cloneShallowFunction · 0.85
plugins_filterFunction · 0.85
runFunction · 0.85
getMethod · 0.65
$uFunction · 0.50
gpFunction · 0.50
pushMethod · 0.45

Tested by

no test coverage detected