Enhances Swagger API documentation by enabling class-validator shim, recognizing entity DTOs, and adding YAML support for raw definitions. Standardizes error handling by transitioning from RxJS's `NotFoundError` to NestJS's `NotFoundException`. Refactors DTOs and Mongoose schemas across the `Article`, `Taxonomy`, and `Content` modules. This includes renaming DTOs for consistency, integrating `class-transformer` for model-to-DTO conversion, and adding `class-validator` for improved schema validation. The `Content` data model is redesigned to be more flexible, shifting from a fixed site header structure to a dynamic key-label-sections model that embeds taxonomy references. This allows for more generic and configurable content retrieval. Updates `Article` and `Taxonomy` services and controllers to fetch specific items by slug or ID and return properly structured DTOs.
20 lines
446 B
JSON
20 lines
446 B
JSON
{
|
|
"$schema": "https://json.schemastore.org/nest-cli",
|
|
"collection": "@nestjs/schematics",
|
|
"sourceRoot": "src",
|
|
"compilerOptions": {
|
|
"deleteOutDir": true,
|
|
"plugins": [
|
|
{
|
|
"name": "@nestjs/swagger",
|
|
"options": {
|
|
"classValidatorShim": true,
|
|
"introspectComments": true,
|
|
"skipAutoHttpCode": true,
|
|
"dtoFileNameSuffix": [".dto.ts", ".entity.ts"]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|