
API Documentation & Contracts
Swagger, OpenAPI, versioning, documentation per version, Postman, collections, API contracts
1What is Swagger in the context of NestJS?
What is Swagger in the context of NestJS?
คำตอบ
Swagger is a tool that automatically generates interactive REST API documentation by analyzing NestJS decorators. This documentation allows you to visualize and test endpoints directly from a web interface accessible via /api. Installing the @nestjs/swagger package and configuring SwaggerModule in main.ts are required to use it.
2Which package should be installed to use Swagger in NestJS?
Which package should be installed to use Swagger in NestJS?
คำตอบ
The @nestjs/swagger package is the official library for integrating Swagger into a NestJS application. You also need to install swagger-ui-express which provides the interactive web interface. These two packages work together to generate OpenAPI documentation and display it in the browser.
3Where to configure SwaggerModule in a NestJS application?
Where to configure SwaggerModule in a NestJS application?
คำตอบ
SwaggerModule is configured in the main.ts file after creating the NestJS application with NestFactory.create(). The SwaggerModule.setup() method takes three parameters: the documentation path, the application instance, and the document generated by createDocument(). This configuration must be done before app.listen() so the documentation is accessible at startup.
What is the role of the @ApiTags() decorator?
What is OpenAPI?
+17 คำถามสัมภาษณ์
หัวข้อสัมภาษณ์ Node.js / NestJS อื่นๆ
Node.js Fundamentals
Node.js Core APIs
Asynchronous Programming
Express.js Basics
NestJS Fundamentals
REST API Design
Validation & DTO
Error Handling
Unit Testing
Task Scheduling
NestJS Modules & DI
Configuration & Environment Management
JWT Authentication
Authorization & RBAC
Database with TypeORM
Prisma ORM
Middleware & Interceptors
File Upload
WebSockets
GraphQL with NestJS
End-to-End Testing
Caching with Redis
Queues with Bull
DevOps, Logging & CI/CD
Docker & Containerization
Microservices
Security Best Practices
Performance & Cloud Deployment
เชี่ยวชาญ Node.js / NestJS สำหรับการสัมภาษณ์ครั้งถัดไป
เข้าถึงคำถามทั้งหมด flashcards แบบทดสอบเทคนิค แบบฝึกหัด code review และตัวจำลองสัมภาษณ์
เริ่มใช้ฟรี