MCPcopy Create free account
hub / github.com/dataease/SQLBot / fn_get_yaml_sample_schema

Function fn_get_yaml_sample_schema

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

Source from the content-addressed store, hash-verified

75192 C = LT.reduce((s, o) => (o.when.test(a) ? [...s, ...o.shouldStringifyTypes] : s), FT)
75193 return gt()(C, (s) => s === x) ? JSON.stringify(w, null, 2) : w
75194 },
75195 fn_get_yaml_sample_schema = (s) => (o, i, a, u) => {
75196 const { fn: _ } = s(),
75197 w = _.jsonSchema202012.getJsonSampleSchema(o, i, a, u)
75198 let x
75199 try {
75200 ;((x = fn.dump(fn.load(w), { lineWidth: -1 }, { schema: rn })),
75201 '\n' === x[x.length - 1] && (x = x.slice(0, x.length - 1)))
75202 } catch (s) {
75203 return (console.error(s), 'error: could not generate yaml example')
75204 }
75205 return x.replace(/\t/g, ' ')
75206 },
75207 fn_get_xml_sample_schema = (s) => (o, i, a) => {
75208 const { fn: u } = s()

Callers 1

Calls 4

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

Tested by

no test coverage detected