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

Function checkReportMissingProp

lib/vocabularies/code.ts:8–14  ·  view source on GitHub ↗
(cxt: KeywordCxt, prop: string)

Source from the content-addressed store, hash-verified

6import N from "../compile/names"
7import {useFunc} from "../compile/util"
8export function checkReportMissingProp(cxt: KeywordCxt, prop: string): void {
9 const {gen, data, it} = cxt
10 gen.if(noPropertyInData(gen, data, prop, it.opts.ownProperties), () => {
11 cxt.setParams({missingProperty: _`${prop}`}, true)
12 cxt.error()
13 })
14}
15
16export function checkMissingProp(
17 {gen, data, it: {opts}}: KeywordCxt,

Callers 2

validatePropertyDepsFunction · 0.90
allErrorsModeFunction · 0.90

Calls 5

_Function · 0.90
noPropertyInDataFunction · 0.85
ifMethod · 0.80
setParamsMethod · 0.80
errorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…