MCPcopy
hub / github.com/ajv-validator/ajv / addInitialKeywords

Function addInitialKeywords

lib/core.ts:793–807  ·  view source on GitHub ↗
(
  this: Ajv,
  defs: Vocabulary | {[K in string]?: KeywordDefinition}
)

Source from the content-addressed store, hash-verified

791}
792
793function addInitialKeywords(
794 this: Ajv,
795 defs: Vocabulary | {[K in string]?: KeywordDefinition}
796): void {
797 if (Array.isArray(defs)) {
798 this.addVocabulary(defs)
799 return
800 }
801 this.logger.warn("keywords option as map is deprecated, pass array")
802 for (const keyword in defs) {
803 const def = defs[keyword] as KeywordDefinition
804 if (!def.keyword) def.keyword = keyword
805 this.addKeyword(def)
806 }
807}
808
809function getMetaSchemaOptions(this: Ajv): InstanceOptions {
810 const metaOpts = {...this.opts}

Callers

nothing calls this directly

Calls 3

addVocabularyMethod · 0.80
warnMethod · 0.80
addKeywordMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…