3.8.2022
Generate Swagger Documentation from Nest API
- Add nestjs swagger dependency
$ npm install --save @nestjs/swagger
- create Swagger Document and setup
const config = new DocumentBuilder()
.setTitle(title)
.setDescription(description)
.setVersion(version)
.build();
const document = SwaggerModule.createDocument(app, config);
SwaggerModule.setup('api', app, document);
//Swagger Doc is available at: http://localhost:${port}/api
- Add Decorators to your Controllers and API Model
- See examples and documentation
Standort Hannover
newcubator GmbH
Bödekerstraße 22
30161 Hannover
Standort Dortmund
newcubator GmbH
Westenhellweg 85-89
44137 Dortmund