Swagger API Setup
This page aims to guide you on the setup or changes in the swagger configuration.
Swagger Config
Main.ts File
/* swagger config */
const options = new DocumentBuilder()
.setTitle(config.swaggerOptions.title)
.setDescription(config.swaggerOptions.description)
.setVersion(config.swaggerOptions.version)
.addTag(config.swaggerOptions.product_api)
.addTag(config.swaggerOptions.pagination_api)
.build();
const document = SwaggerModule.createDocument(app,options, {
/* add your modules here to list your API dynamically in the project */
include : [ProductModule],
});
SwaggerModule.setup(config.swaggerOptions.swagger_api_url,app,document);Last updated