api config mongo - wwwsolutions/nestjs-starter-kit GitHub Wiki
TODO:
npm i @nestjs/mongoose@^9.0.1 mongoose@^6.0.12
// generate config lib
nx generate @nrwl/nest:library --name=swagger --directory=api/config --buildable --standaloneConfig --strict --tags=type:config --no-interactive
// libs/api/integration/rest-mongoose/src/lib/configure-api-integration-rest-mongoose.ts
/******************************************************
* ENABLE SWAGGER *
******************************************************/
configureSwagger(app, appConfig);
You do not have manually map/decorate dtos anymore. plugin does it for you
// apps/api/project.json#targets.build.options
// add
"tsPlugins": [
{
"name": "@nestjs/swagger/plugin",
"options": {
"dtoFileNameSuffix": [".dto.ts", ".model.ts"]
}
}
]
SWAGGER_UI_DIR='docs'