feat: Add url field to PaginatedResponse and populate it using route path

Resolves: https://github.com/meta-llama/llama-stack/issues/1847
Changes:
- responses.py: added optional `url` field to PaginatedResponse
- server.py: automatically populate the URL field with route path
This commit is contained in:
Rohan Awhad 2025-06-06 22:24:30 -04:00
parent 33ecefd284
commit e28a57ad76
4 changed files with 14 additions and 1 deletions

View file

@ -23,7 +23,9 @@ class PaginatedResponse(BaseModel):
:param data: The list of items for the current page
:param has_more: Whether there are more items available after this set
:param url: The URL for accessing this list
"""
data: list[dict[str, Any]]
has_more: bool
url: str | None = None