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

Function setSchemaController

fastify.js:741–752  ·  view source on GitHub ↗
(schemaControllerOpts)

Source from the content-addressed store, hash-verified

739 }
740
741 function setSchemaController (schemaControllerOpts) {
742 throwIfAlreadyStarted('Cannot call "setSchemaController"!')
743 const old = this[kSchemaController]
744 const schemaController = SchemaController.buildSchemaController(
745 old,
746 Object.assign({}, old.opts, schemaControllerOpts)
747 )
748 this[kSchemaController] = schemaController
749 this.getSchema = schemaController.getSchema.bind(schemaController)
750 this.getSchemas = schemaController.getSchemas.bind(schemaController)
751 return this
752 }
753
754 function setReplySerializer (replySerializer) {
755 throwIfAlreadyStarted('Cannot call "setReplySerializer"!')

Callers

nothing calls this directly

Calls 1

throwIfAlreadyStartedFunction · 0.85

Tested by

no test coverage detected