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

Function resolveGenericStrategy

frontend/public/swagger-ui-bundle.js:41773–41812  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

41771 const { fetch: o, http: i } = s
41772 return o || i || http_http
41773 }
41774 async function resolveGenericStrategy(s) {
41775 const {
41776 spec: o,
41777 mode: i,
41778 allowMetaPatches: a = !0,
41779 pathDiscriminator: u,
41780 modelPropertyMacro: _,
41781 parameterMacro: w,
41782 requestInterceptor: x,
41783 responseInterceptor: C,
41784 skipNormalization: j = !1,
41785 useCircularStructures: L,
41786 strategies: B,
41787 } = s,
41788 $ = options_retrievalURI(s),
41789 U = options_httpClient(s),
41790 V = B.find((s) => s.match(o))
41791 return (async function doResolve(s) {
41792 $ && (tu.refs.docCache[$] = s)
41793 tu.refs.fetchJSON = makeFetchJSON(U, { requestInterceptor: x, responseInterceptor: C })
41794 const o = [tu.refs]
41795 'function' == typeof w && o.push(tu.parameters)
41796 'function' == typeof _ && o.push(tu.properties)
41797 'strict' !== i && o.push(tu.allOf)
41798 const B = await (function mapSpec(s) {
41799 return new SpecMap(s).dispatch()
41800 })({
41801 spec: s,
41802 context: { baseDoc: $ },
41803 plugins: o,
41804 allowMetaPatches: a,
41805 pathDiscriminator: u,
41806 parameterMacro: w,
41807 modelPropertyMacro: _,
41808 useCircularStructures: L,
41809 })
41810 j || (B.spec = V.normalize(B.spec))
41811 return B
41812 })(o)
41813 }
41814 const su = _curry2(function and(s, o) {
41815 return s && o

Callers 1

Calls 6

options_retrievalURIFunction · 0.85
options_httpClientFunction · 0.85
makeFetchJSONFunction · 0.85
dispatchMethod · 0.65
findMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected