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

Function fn_get_json_sample_schema

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

Source from the content-addressed store, hash-verified

75185 api_optionAPI = (s, o) => (void 0 !== o && DT.register(s, o), DT.get(s)),
75186 LT = [{ when: /json/, shouldStringifyTypes: ['string'] }],
75187 FT = ['object'],
75188 fn_get_json_sample_schema = (s) => (o, i, a, u) => {
75189 const { fn: _ } = s(),
75190 w = _.jsonSchema202012.memoizedSampleFromSchema(o, i, u),
75191 x = typeof w,
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(),

Callers 1

Calls 3

sFunction · 0.50
gtFunction · 0.50
reduceMethod · 0.45

Tested by

no test coverage detected