NestJS 11 · Validation, guards and interceptors

Generate OpenAPI docs

Serve an OpenAPI document and Swagger UI. Install @nestjs/swagger first.

const config = new DocumentBuilder().setTitle('Cats API').setVersion('1.0').build();
SwaggerModule.setup('docs', app, SwaggerModule.createDocument(app, config));

Official NestJS 11 documentation

More validation, guards and interceptors commands

All validation, guards and interceptors commands · NestJS 11 cheatsheet

Was this page helpful?