MCPcopy Create free account
hub / github.com/fastify/fastify / customValidatorCompiler

Function customValidatorCompiler

test/schema-validation.test.js:23–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23const 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
37const schemaA = {
38 $id: 'urn:schema:foo',

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected