MCPcopy Create free account
hub / github.com/json-editor/json-editor / unevaluatedPropCode

Function unevaluatedPropCode

docs/scripts/ajv-validator.js:6394–6412  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

6392 it.props = true;
6393 cxt.ok((0, codegen_1._) `${errsCount} === ${names_1.default.errors}`);
6394 function unevaluatedPropCode(key) {
6395 if (schema === false) {
6396 cxt.setParams({ unevaluatedProperty: key });
6397 cxt.error();
6398 if (!allErrors)
6399 gen.break();
6400 return;
6401 }
6402 if (!(0, util_1.alwaysValidSchema)(it, schema)) {
6403 const valid = gen.name("valid");
6404 cxt.subschema({
6405 keyword: "unevaluatedProperties",
6406 dataProp: key,
6407 dataPropType: util_1.Type.Str,
6408 }, valid);
6409 if (!allErrors)
6410 gen.if((0, codegen_1.not)(valid), () => gen.break());
6411 }
6412 }
6413 function unevaluatedDynamic(evaluatedProps, key) {
6414 return (0, codegen_1._) `!${evaluatedProps} || !${evaluatedProps}[${key}]`;
6415 }

Callers 1

codeFunction · 0.85

Calls 6

setParamsMethod · 0.80
errorMethod · 0.80
breakMethod · 0.80
subschemaMethod · 0.80
nameMethod · 0.45
ifMethod · 0.45

Tested by

no test coverage detected