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

Class JSONSchemaVisitor

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

Source from the content-addressed store, hash-verified

46092 (a) =>
46093 a instanceof ld || (s(a) && o('linkDescription', a) && i('object', a))
46094 )
46095 class JSONSchemaVisitor extends Mixin(Md, Rd, yd) {
46096 constructor(s) {
46097 ;(super(s),
46098 (this.element = new sd()),
46099 (this.specPath = fc(['document', 'objects', 'JSONSchema'])))
46100 }
46101 get defaultDialectIdentifier() {
46102 return 'http://json-schema.org/draft-04/schema#'
46103 }
46104 ObjectElement(s) {
46105 return (
46106 this.handleDialectIdentifier(s),
46107 this.handleSchemaIdentifier(s),
46108 (this.parent = this.element),
46109 Md.prototype.ObjectElement.call(this, s)
46110 )
46111 }
46112 handleDialectIdentifier(s) {
46113 if (bc(this.parent) && !ju(s.get('$schema')))
46114 this.element.setMetaProperty(
46115 'inheritedDialectIdentifier',
46116 this.defaultDialectIdentifier
46117 )
46118 else if (Dd(this.parent) && !ju(s.get('$schema'))) {
46119 const s = Na(
46120 serializers_value(this.parent.meta.get('inheritedDialectIdentifier')),
46121 serializers_value(this.parent.$schema)
46122 )
46123 this.element.setMetaProperty('inheritedDialectIdentifier', s)
46124 }
46125 }
46126 handleSchemaIdentifier(s, o = 'id') {
46127 const i =
46128 void 0 !== this.parent
46129 ? cloneDeep(this.parent.getMetaProperty('ancestorsSchemaIdentifiers', []))
46130 : new Su.wE(),
46131 a = serializers_value(s.get(o))
46132 ;(Id(a) && i.push(a), this.element.setMetaProperty('ancestorsSchemaIdentifiers', i))
46133 }
46134 }
46135 const $d = JSONSchemaVisitor,
46136 isJSONReferenceLikeElement = (s) => Nu(s) && s.hasKey('$ref')

Callers

nothing calls this directly

Calls 1

MixinFunction · 0.85

Tested by

no test coverage detected