| 21 | } |
| 22 | |
| 23 | const customValidatorCompiler = req => { |
| 24 | if (!req.httpPart) { |
| 25 | throw new Error('Missing httpPart') |
| 26 | } |
| 27 | |
| 28 | const compiler = customSchemaCompilers[req.httpPart] |
| 29 | |
| 30 | if (!compiler) { |
| 31 | throw new Error(`Missing compiler for ${req.httpPart}`) |
| 32 | } |
| 33 | |
| 34 | return compiler.compile(req.schema) |
| 35 | } |
| 36 | |
| 37 | const schemaA = { |
| 38 | $id: 'urn:schema:foo', |
nothing calls this directly
no outgoing calls
no test coverage detected