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

Function topSchemaObjCode

docs/scripts/ajv-validator.js:2820–2834  ·  view source on GitHub ↗
(it)

Source from the content-addressed store, hash-verified

2818 });
2819 }
2820 function topSchemaObjCode(it) {
2821 const { schema, opts, gen } = it;
2822 validateFunction(it, () => {
2823 if (opts.$comment && schema.$comment)
2824 commentKeyword(it);
2825 checkNoDefault(it);
2826 gen.let(names_1.default.vErrors, null);
2827 gen.let(names_1.default.errors, 0);
2828 if (opts.unevaluated)
2829 resetEvaluated(it);
2830 typeAndKeywords(it);
2831 returnResults(it);
2832 });
2833 return;
2834 }
2835 function resetEvaluated(it) {
2836 // TODO maybe some hook to execute it in the end to check whether props/items are Name, as in assignEvaluated
2837 const { gen, validateName } = it;

Callers 1

validateFunctionCodeFunction · 0.85

Calls 7

validateFunctionFunction · 0.85
commentKeywordFunction · 0.85
checkNoDefaultFunction · 0.85
resetEvaluatedFunction · 0.85
typeAndKeywordsFunction · 0.85
returnResultsFunction · 0.85
letMethod · 0.80

Tested by

no test coverage detected