MCPcopy Create free account
hub / github.com/fastify/fast-json-stringify / isValidSchema

Function isValidSchema

index.js:47–59  ·  view source on GitHub ↗
(schema, name)

Source from the content-addressed store, hash-verified

45let schemaIdCounter = 0
46
47function isValidSchema (schema, name) {
48 if (!validate(schema)) {
49 if (name) {
50 name = `"${name}" `
51 } else {
52 name = ''
53 }
54 const first = validate.errors[0]
55 const err = new Error(`${name}schema is invalid: data${first.instancePath} ${first.message}`)
56 err.errors = isValidSchema.errors
57 throw err
58 }
59}
60
61function resolveRef (context, location) {
62 const ref = location.schema.$ref

Callers 1

buildFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…