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

Function get_yaml_sample_schema

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

Source from the content-addressed store, hash-verified

37527 C = Ss.reduce((s, o) => (o.when.test(a) ? [...s, ...o.shouldStringifyTypes] : s), Es)
37528 return gt()(C, (s) => s === x) ? JSON.stringify(w, null, 2) : w
37529 },
37530 get_yaml_sample_schema = (s) => (o, i, a, u) => {
37531 const { fn: _ } = s(),
37532 w = _.getJsonSampleSchema(o, i, a, u)
37533 let x
37534 try {
37535 ;((x = fn.dump(fn.load(w), { lineWidth: -1 }, { schema: rn })),
37536 '\n' === x[x.length - 1] && (x = x.slice(0, x.length - 1)))
37537 } catch (s) {
37538 return (console.error(s), 'error: could not generate yaml example')
37539 }
37540 return x.replace(/\t/g, ' ')
37541 },
37542 get_xml_sample_schema = (s) => (o, i, a) => {
37543 const { fn: u } = s()

Callers 1

json_schema_5_samplesFunction · 0.85

Calls 4

errorMethod · 0.80
replaceMethod · 0.80
sFunction · 0.50
loadMethod · 0.45

Tested by

no test coverage detected