Open History to see the last commit
1// Writes the service's OpenAPI document (src/server/openapi.ts) to
2// ./openapi.json — the input for client generation (task 7.4) and the
3// drift check. Run via `pnpm run openapi:emit`.
4import { writeFileSync } from 'node:fs'
5import { join } from 'node:path'
6
7import { openApiDocument } from '../src/server/openapi.ts'
8
9const out = join(import.meta.dirname, '..', 'openapi.json')
10writeFileSync(out, JSON.stringify(openApiDocument, null, 2) + '\n')
11console.log(`wrote ${out}`)