mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
12 lines
439 B
TypeScript
12 lines
439 B
TypeScript
import fs from 'fs';
|
|
import path from 'path';
|
|
import swaggerJsdoc from 'swagger-jsdoc';
|
|
|
|
import { swaggerOptions } from '../src/utils/swagger';
|
|
|
|
const specs = swaggerJsdoc(swaggerOptions);
|
|
const outputPath = path.resolve(__dirname, '../openapi.json');
|
|
fs.mkdirSync(path.dirname(outputPath), { recursive: true });
|
|
fs.writeFileSync(outputPath, JSON.stringify(specs, null, 2));
|
|
|
|
console.log(`OpenAPI specification written to ${outputPath}`);
|