From e6f3e8f6be6e7adeb29f8cdec0dad1bc3df803cc Mon Sep 17 00:00:00 2001 From: Igor Propisnov Date: Wed, 22 May 2024 10:11:40 +0200 Subject: [PATCH] init swagger api --- backend/src/main.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/src/main.ts b/backend/src/main.ts index e476576..4b8e604 100644 --- a/backend/src/main.ts +++ b/backend/src/main.ts @@ -4,7 +4,12 @@ import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger'; import { ValidationPipe } from '@nestjs/common'; async function setupSwagger(app) { - const config = new DocumentBuilder().build(); + const config = new DocumentBuilder() + .setTitle('Tickets API') + .setDescription('Description of the API') + .setVersion('0.0.0') + .addTag('tickets') + .build(); const document = SwaggerModule.createDocument(app, config); SwaggerModule.setup('api', app, document); }