(schema, name)
| 45 | let schemaIdCounter = 0 |
| 46 | |
| 47 | function 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 | |
| 61 | function resolveRef (context, location) { |
| 62 | const ref = location.schema.$ref |
no outgoing calls
no test coverage detected
searching dependent graphs…