Skip to content

Add preview_images field to collection endpoints#21

Merged
amrtgaber merged 1 commit intomainfrom
feat/collection-preview-images
Feb 6, 2026
Merged

Add preview_images field to collection endpoints#21
amrtgaber merged 1 commit intomainfrom
feat/collection-preview-images

Conversation

@amrtgaber
Copy link
Contributor

Summary

  • Add ImagePreview schema (id, url) and preview_images field to CollectionReadWithCount
  • Both list_collections and get_collection endpoints return up to 4 preview images per collection
  • Preview images are the first image from each of the first 4 items that have images
  • Add 4 new tests covering preview images, max limit, single collection, and empty state

Test plan

  • uv run ruff check passes
  • uv run ruff format --check passes
  • uv run pytest passes (115 tests, 4 new)

Add ImagePreview schema and preview_images list to
CollectionReadWithCount. Both list and get endpoints now return up to
4 preview images per collection (first image from each of the first 4
items with images). Includes 4 new tests covering preview images,
max limit, and empty state.
@amrtgaber amrtgaber merged commit 981ba8f into main Feb 6, 2026
2 checks passed
@amrtgaber amrtgaber deleted the feat/collection-preview-images branch February 6, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant