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

Function findObjectOrArraySchema

frontend/public/swagger-ui-bundle.js:56141–56160  ·  view source on GitHub ↗
(s, { recurse: o = !0, depth: i = 1 } = {})

Source from the content-addressed store, hash-verified

56139 return `${o.toLowerCase()}-${s}`
56140 }
56141 const arrayOrEmpty = (s) => (Array.isArray(s) ? s : []),
56142 findObjectOrArraySchema = (s, { recurse: o = !0, depth: i = 1 } = {}) => {
56143 if (fu(s)) {
56144 if (
56145 'object' === s.type ||
56146 'array' === s.type ||
56147 (Array.isArray(s.type) && (s.type.includes('object') || s.type.includes('array')))
56148 )
56149 return s
56150 if (!(i > Bl) && o) {
56151 const a = Array.isArray(s.oneOf)
56152 ? s.oneOf.find((s) => findObjectOrArraySchema(s, { recurse: o, depth: i + 1 }))
56153 : void 0
56154 if (a) return a
56155 const u = Array.isArray(s.anyOf)
56156 ? s.anyOf.find((s) => findObjectOrArraySchema(s, { recurse: o, depth: i + 1 }))
56157 : void 0
56158 if (u) return u
56159 }
56160 }
56161 },
56162 parseJsonObjectOrArray = ({ value: s, silentFail: o = !1 }) => {
56163 try {

Callers 1

execute_buildRequestFunction · 0.85

Calls 4

fuFunction · 0.85
isArrayMethod · 0.45
includesMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected