litestar icon indicating copy to clipboard operation
litestar copied to clipboard

docs: mention `id` field in `1-abstract-dto.rst`

Open sobolevn opened this issue 1 year ago • 5 comments

It caught my attention that it was never explained: why do we have an extra id field in the response. Since this part is dedicated to explaining how request / response fields are marked, I think that it is important to mention that id is special: Снимок экрана 2024-10-15 в 18 50 23

I had to grep what .my_lib is and how class _Base(CommonTableAttributes, UUIDPrimaryKey, DeclarativeBase): is constructed. Only finding UUIDPrimaryKey and its id: Mapped[UUID] = mapped_column(default=uuid4, primary_key=True) has anwsered my question :)

sobolevn avatar Oct 15 '24 15:10 sobolevn