MCPcopy
hub / github.com/fastify/fastify / setupSerializer

Method setupSerializer

lib/schema-controller.js:153–160  ·  view source on GitHub ↗

* This method will be called when a serializer must be setup. * Do not setup the compiler more than once * @param {object} serverOptions the fastify server options

(serverOptions)

Source from the content-addressed store, hash-verified

151 * @param {object} serverOptions the fastify server options
152 */
153 setupSerializer (serverOptions) {
154 const isReady = this.serializerCompiler !== undefined && !this.addedSchemas
155 if (isReady) {
156 return
157 }
158
159 this.serializerCompiler = this.getSerializerBuilder()(this.schemaBucket.getSchemas(), serverOptions.serializerOpts)
160 }
161}
162
163SchemaController.buildSchemaController = buildSchemaController

Callers 2

reply.jsFile · 0.80
addNewRouteFunction · 0.80

Calls 2

getSerializerBuilderMethod · 0.95
getSchemasMethod · 0.65

Tested by

no test coverage detected