MCPcopy
hub / github.com/fastify/fastify / decorator

Function decorator

test/decorator.test.js:588–596  ·  view source on GitHub ↗
(instance, opts, done)

Source from the content-addressed store, hash-verified

586 const fastify = Fastify()
587
588 const decorator = function (instance, opts, done) {
589 instance.decorate('decoratorAddSchema', function (whereAddTheSchema) {
590 instance.addSchema({
591 $id: 'schema',
592 type: 'string'
593 })
594 })
595 done()
596 }
597
598 fastify.register(fp(decorator))
599

Callers

nothing calls this directly

Calls 2

addSchemaMethod · 0.80
doneFunction · 0.50

Tested by

no test coverage detected