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

Function addSchema

fastify.js:620–625  ·  view source on GitHub ↗
(schema)

Source from the content-addressed store, hash-verified

618
619 // wrapper that we expose to the user for schemas handling
620 function addSchema (schema) {
621 throwIfAlreadyStarted('Cannot call "addSchema"!')
622 this[kSchemaController].add(schema)
623 this[kChildren].forEach(child => child.addSchema(schema))
624 return this
625 }
626
627 // If the router does not match any route, every request will land here
628 // req and res are Node.js core objects

Callers

nothing calls this directly

Calls 3

throwIfAlreadyStartedFunction · 0.85
addMethod · 0.80
addSchemaMethod · 0.80

Tested by

no test coverage detected