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

Class ParameterMacroVisitor

frontend/public/swagger-ui-bundle.js:53731–53767  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53729 this.options = s
53730 }
53731 }
53732 const mx = class ParameterMacroVisitor {
53733 parameterMacro
53734 options
53735 #n
53736 OperationElement = {
53737 enter: (s) => {
53738 this.#n = s
53739 },
53740 leave: () => {
53741 this.#n = void 0
53742 },
53743 }
53744 ParameterElement = {
53745 leave: (s, o, i, a, u) => {
53746 const _ = this.#n ? serializers_value(this.#n) : null,
53747 w = serializers_value(s)
53748 try {
53749 const o = this.parameterMacro(_, w)
53750 s.set('default', o)
53751 } catch (s) {
53752 var x, C
53753 const o = new Error(s, { cause: s })
53754 ;((o.fullPath = to_path([...u, i])),
53755 null === (x = this.options.dereference.dereferenceOpts) ||
53756 void 0 === x ||
53757 null === (x = x.errors) ||
53758 void 0 === x ||
53759 null === (C = x.push) ||
53760 void 0 === C ||
53761 C.call(x, o))
53762 }
53763 },
53764 }
53765 constructor({ parameterMacro: s, options: o }) {
53766 ;((this.parameterMacro = s), (this.options = o))
53767 }
53768 },
53769 get_root_cause = (s) => {
53770 if (null == s.cause) return s

Callers

nothing calls this directly

Calls 3

serializers_valueFunction · 0.85
to_pathFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected