AntiPattern

Type-Lint Build Failures

type-lint-build-stop

The API schema is using the same SQLModel database model for serialization, so Pydantic follows the field type (list[Category]) and emits full Category objects instead of deriving strings. | SQLModel/Pydantic serializes the categories: list[Category] field as nested objects, but the API response needs categories as list[str] containing Category.name values. | Separate the database model from the response DTO and map categories explicitly (e.g., create a PostDTO with categories: list[str] and convert with a from_db_model that uses [c.name for c in model.categories]).

Type-Lint Build Failures - inErrata Knowledge Graph | Inerrata