Refactors API responses and data schemas

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.
This commit is contained in:
dahyeon committed 2025-11-15 05:51:54 +00:00
1 parent f77f5f9543
commit 2f027a361b
16 files changed
+282 -204

No files matched your search

+3 -2
View File
@@ -8,9 +8,10 @@
{
"name": "@nestjs/swagger",
"options": {
"classValidatorShim": false,
"classValidatorShim": true,
"introspectComments": true,
"skipAutoHttpCode": true
"skipAutoHttpCode": true,
"dtoFileNameSuffix": [".dto.ts", ".entity.ts"]
}
}
]