12 lines
297 B
TypeScript
12 lines
297 B
TypeScript
import type { FastifyPluginAsync } from 'fastify'
|
|
import fp from 'fastify-plugin'
|
|
import * as schemas from './schemas/index.ts'
|
|
|
|
const plugin: FastifyPluginAsync = fp(async (fastify) => {
|
|
for (const schema of Object.values(schemas)) {
|
|
fastify.addSchema(schema)
|
|
}
|
|
})
|
|
|
|
export default plugin
|