feat: Add quick tag editing endpoint for Item resources (#199)
Commit: 4a3cf137e3a2538fa60a269393fc23bc66285216
Date: 2025-07-07 16:04:21 +0200
Author: PascalHavelange
Commit Message
feat: Add quick tag editing endpoint for Item resources (#199)
feat: Add quick tag editing endpoint for items
- Add PATCH /api/item/{item}/tags endpoint for efficient tag management
- Support both attach and detach operations in single request
- Prevent duplicate tag attachments and handle non-existent detachments gracefully
- Comprehensive validation for tag UUIDs and existence checks
- Returns updated item with all relationships loaded
- Complete test coverage with 15 test cases covering all scenarios
- Laravel 12 compliant with proper validation, resource responses, and error handling
- Updated CHANGELOG.md with feature documentation
Co-authored-by: Pascal HAVELANGE <havelangep@hotmail.com>
Files Changed
- 📝 Modified:
CHANGELOG.md
- 📝 Modified:
app/Http/Controllers/ItemController.php
- 📝 Modified:
docs/_openapi/api.json
- 📝 Modified:
routes/api.php
- ✅ Added:
tests/Feature/Api/Item/UpdateTagsTest.php
Links
This documentation was automatically generated from Git commit data.