Skip to content

Commit a8bd000

Browse files
i18n integrated with swagger
1 parent f3b3a26 commit a8bd000

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

src/main.ts

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
import { NestFactory } from '@nestjs/core';
22
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
3-
import { AppModule } from './app.module';
3+
import { AppModule } from './presentation/modules/app.module';
4+
import { I18nValidationExceptionFilter, I18nValidationPipe } from 'nestjs-i18n';
45

56
async function bootstrap() {
67
const app = await NestFactory.create(AppModule);
8+
app.useGlobalPipes(
9+
new I18nValidationPipe({
10+
transform: true,
11+
whitelist: true,
12+
}),
13+
);
14+
app.useGlobalFilters(
15+
new I18nValidationExceptionFilter({ detailedErrors: true }),
16+
);
717

818
const config = new DocumentBuilder()
919
.setTitle('Recipe Book AI API')
@@ -23,11 +33,14 @@ async function bootstrap() {
2333
2434
This documentation includes the following features:
2535
26-
**✔ JWT Authentication**
36+
✔ JWT Authentication
2737
✔ User registration and profile management
38+
✔ CI pipelines for automated testing
2839
✔ Recipe creation, updating, deletion, and retrieval
2940
✔ Ai-powered recipe generation from prompts (Azure AI Foundry)
30-
✔ Clean Architecture (Domain → Application → Infra → Presentation)**`,
41+
✔ I18N support with language resolution via query parameters and headers
42+
✔ Dockerfile and Docker Compose setup for containerized deployment
43+
✔ Clean Architecture (Domain → Application → Infra → Presentation)`,
3144
)
3245
.setVersion('1.0')
3346
.addTag('Auth', 'Autentication and user manegement')

0 commit comments

Comments
 (0)