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

Function inlineRefSchema

docs/scripts/ajv-validator.js:5663–5675  ·  view source on GitHub ↗
(sch)

Source from the content-addressed store, hash-verified

5661 callRef(cxt, v, sch, sch.$async);
5662 }
5663 function inlineRefSchema(sch) {
5664 const schName = gen.scopeValue("schema", opts.code.source === true ? { ref: sch, code: (0, codegen_1.stringify)(sch) } : { ref: sch });
5665 const valid = gen.name("valid");
5666 const schCxt = cxt.subschema({
5667 schema: sch,
5668 dataTypes: [],
5669 schemaPath: codegen_1.nil,
5670 topSchemaRef: schName,
5671 errSchemaPath: $ref,
5672 }, valid);
5673 cxt.mergeEvaluated(schCxt);
5674 cxt.ok(valid);
5675 }
5676 },
5677 };
5678 function getValidate(cxt, sch) {

Callers 1

codeFunction · 0.85

Calls 5

scopeValueMethod · 0.80
subschemaMethod · 0.80
mergeEvaluatedMethod · 0.80
okMethod · 0.80
nameMethod · 0.45

Tested by

no test coverage detected