mirror of
https://github.com/aleksilassila/reiverr.git
synced 2026-04-18 12:53:16 +02:00
feat: Tmdb request proxying and caching in backend
This commit is contained in:
18
backend/scripts/generate-openapi-spec.ts
Normal file
18
backend/scripts/generate-openapi-spec.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import { AppModule } from '../src/app.module';
|
||||
import 'reflect-metadata';
|
||||
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
|
||||
import * as fs from 'fs';
|
||||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule);
|
||||
|
||||
const config = new DocumentBuilder().build();
|
||||
|
||||
const document = SwaggerModule.createDocument(app, config, {
|
||||
deepScanRoutes: true,
|
||||
});
|
||||
SwaggerModule.setup('openapi', app, document, {});
|
||||
fs.writeFileSync('./swagger-spec.json', JSON.stringify(document));
|
||||
}
|
||||
bootstrap();
|
||||
Reference in New Issue
Block a user