Something went wrong. Try again.
fork of hey-api/openapi-ts because I need some additional things
Something went wrong. Try again.
1234567891011121314151617181920212223import { readFileSync } from 'node:fs';import { join } from 'node:path';
import Fastify from 'fastify';import glue from 'fastify-openapi-glue';
import { serviceHandlers } from './handlers';
export const buildServer = async () => { const fastify = Fastify();
const specificationPath = join(__dirname, '..', 'openapi.json'); const specificationJson = JSON.parse(readFileSync(specificationPath, 'utf-8'));
fastify.register(glue, { prefix: 'v3', serviceHandlers, specification: specificationJson, });
return fastify;};