NestJS integrates with Swagger/OpenAPI via @nestjs/swagger to auto-generate interactive API documentation from your code — controllers, routes, DTOs, and decorators. It produces a browsable UI where developers can explore and test endpoints, kept in sync with the code.
Setting up Swagger
{ , } ;
config = ()
.()
.()
.()
.()
.();
= .(app, config);
.(, app, );
