Skip to content

feat: add pagination to item_tags index API#34

Merged
dadachi merged 1 commit intomainfrom
feat/add-pagination-item-tags
Apr 3, 2026
Merged

feat: add pagination to item_tags index API#34
dadachi merged 1 commit intomainfrom
feat/add-pagination-item-tags

Conversation

@dadachi
Copy link
Copy Markdown
Contributor

@dadachi dadachi commented Apr 3, 2026

Summary

  • Add Pagy pagination to GET /api/v1/shopkeeper/shops/{shop_id}/item_tags
  • With page param: returns 20 items per page (Pagy default)
  • Without page param: returns up to 1000 items (backward compat for ShopDetailView)
  • Response includes meta object with current_page, total_pages, total_count, limit
  • Update openapi.yaml with page query param and meta response schema
  • Add pagination-item-tags.md design doc

Test plan

  • bin/ci passes
  • Verify existing clients still work without page param
  • Verify paginated response with page=1 returns correct meta

🤖 Generated with Claude Code

- Create pagy initializer with default limit 20
- Include Pagy::Method in shopkeeper base controller with pagy_meta helper
- Paginate item_tags index: limit 20 with page param, 1000 without (backward compat)
- Add meta object (current_page, total_pages, total_count, limit) to response
- Add page query param and meta schema to openapi.yaml
- Add pagination-item-tags.md design doc
- Add pagination tests: meta presence, backward compat, paginated, overflow

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dadachi dadachi merged commit 9b08d2b into main Apr 3, 2026
3 checks passed
@dadachi dadachi deleted the feat/add-pagination-item-tags branch April 3, 2026 01:41
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