mirror of
https://github.com/d3vyce/fastapi-toolsets.git
synced 2026-03-01 17:00:48 +01:00
chore: documentation (#76)
* chore: update docstring example to use python code block * docs: add documentation * feat: add docs build + fix other workdlows * fix: add missing return type
This commit is contained in:
@@ -71,7 +71,9 @@ class Response(BaseResponse, Generic[DataT]):
|
||||
"""Generic API response with data payload.
|
||||
|
||||
Example:
|
||||
```python
|
||||
Response[UserRead](data=user, message="User retrieved")
|
||||
```
|
||||
"""
|
||||
|
||||
data: DataT | None = None
|
||||
@@ -108,10 +110,12 @@ class PaginatedResponse(BaseResponse, Generic[DataT]):
|
||||
"""Paginated API response for list endpoints.
|
||||
|
||||
Example:
|
||||
```python
|
||||
PaginatedResponse[UserRead](
|
||||
data=users,
|
||||
pagination=Pagination(total_count=100, items_per_page=10, page=1, has_more=True)
|
||||
)
|
||||
```
|
||||
"""
|
||||
|
||||
data: list[DataT]
|
||||
|
||||
Reference in New Issue
Block a user